Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-21 10:05:33

0001 /*
0002  *  smap.h  --
0003  *  Define String Table, a String Vector with Hashed lookup
0004  *  which creates a fixed mapping between a string and an integer
0005  *
0006  *  Original: 10-Jan-1996 11:48
0007  *
0008  *  Author:   Maarten Ballintijn <Maarten.Ballintijn@cern.ch>
0009  *
0010  *  $Id$
0011  *
0012  *  $Log$
0013  *  Revision 1.8  2001/09/18 13:55:19  couet
0014  *  - smap_sort is not used anymore. It has been removed.
0015  *
0016  *  Revision 1.7  1996/04/23 18:39:10  maartenb
0017  *  - Add RCS keywords
0018  *
0019  *
0020  */
0021 
0022 #ifndef CERN_SMAP
0023 #define CERN_SMAP
0024 
0025 
0026 #include    "cern_types.h"
0027 #include    "hash_int_table.h"
0028 #include    "svec.h"
0029 
0030 typedef struct _smap_struct_ {
0031     int     fSize;
0032     int     fEntries;
0033     SVec        fV;
0034     HashIntTable    fT;
0035 } SMapStruct;
0036 
0037 typedef SMapStruct  *SMap;
0038 
0039 
0040 extern SMap
0041 smap_new( int max );
0042 
0043 extern SMap
0044 smap_copy( SMap old );
0045 
0046 extern int
0047 smap_add( SMap st, String s );
0048 
0049 extern int
0050 smap_entries( SMap st );
0051 
0052 extern String
0053 smap_get( SMap st, const int i );
0054 
0055 extern bool
0056 smap_map( SMap st, String s, int * ip );
0057 
0058 extern void
0059 smap_del( SMap st );
0060 
0061 #endif  /*  CERN_SMAP   */