18 #ifndef DtStringIntMapper_H_
19 #define DtStringIntMapper_H_
21 #include <vlutil/vlHashlist.h>
22 #include <vlutil/vlString.h>
79 bool useStringHashlist =
true);
95 virtual bool createIntToStringMap();
100 virtual bool createStringToIntMap();
111 virtual bool addMapping(
const DtString& stringVal,
116 virtual bool removeMapping(
const DtString& stringVal,
122 virtual bool getStringFromInt(
int intVal,
DtString& stringVal)
const;
127 virtual bool getIntFromString(
const DtString& stringVal,
int& intVal)
const;
134 void emptyIntToStringArray();
135 void emptyStringToIntHashlist();
136 void emptyIntToStringHashlist();
144 virtual bool checkString(
const DtString& stringVal,
int intVal)
const;
148 virtual bool checkInteger(
int intVal,
const DtString& stringVal)
const;
151 bool checkMapArrayInit(
const DtString& caller)
const;
152 bool checkStringToIntHashlistInit(
const DtString& caller)
const;
153 bool checkIntToStringHashlistInit(
const DtString& caller)
const;
154 bool checkMapArrayIndexRange(
int index,
int intVal,
DtString ** myIntToStringArray
This will be an array allocated to have mapSize entries. When a string constant is sought...
Definition: stringIntMapper.h:178
unsigned myMapSize
This argument is the total size of the myIntToStringArray array. Since the integer constants being ma...
Definition: stringIntMapper.h:162
DtStringIntMapper(const DtStringIntMapper &orig)
Copy and Assignment operators undefined.
Definition: stringIntMapper.h:83
DtHashList * myIntToStringHashlist
This is only used if myMapSize == 0. Then createIntToStringMap() will allocate this hash list...
Definition: stringIntMapper.h:187
int myOffset
This argument to the constructor is subtracted from integers on the way in and added on the way out w...
Definition: stringIntMapper.h:171
Description: Maps string constants to integer constants and vice versa. String / integer pairs are re...
Definition: stringIntMapper.h:74
bool myUseStringHashlist
This argument to the constructor indicates whether to use a hash list for string lookup. It is ignored if mapSize == 0, since in this case a hash list is required.
Definition: stringIntMapper.h:167
#define DT_DLL_vrfutil
This file is used to determine how to build Disable inconsistent dll linkage warning Visual Studio 6...
Definition: vrfutilDefines.h:34
DtHashlist * myStringToIntHashlist
This is only used if useStringHashlist == true. In this case, a hashlist of strings will be maintaine...
Definition: stringIntMapper.h:183
voidpf uLong offset
Definition: ioapi.h:42
DtStringIntMapper & operator=(const DtStringIntMapper &orig)
Definition: stringIntMapper.h:84