9 #ifndef uniqEntryArr_H_
10 #define uniqEntryArr_H_
15 #ifndef _MachineTypes_h
16 #include <vlutil/vlMachineTypes.h>
31 key( _key ), val( _val ) {}
33 key( src.key ), val( src.val ) {}
40 key = src.
key; val = src.
val;
47 if (
this == &rhs )
return ( 1 == 1 );
48 return ( key == rhs.
key && val == rhs.
val );
52 if (
this == &rhs )
return ( 1 == 0 );
53 return ( key != rhs.
key || val != rhs.
val );
58 if ( ix < 0 || ix > 1 )
60 return (~(
unsigned int)0);
64 return ( ( ix ) ? val : key );
102 inline unsigned int operator[](
int ix )
const;
105 inline int count()
const;
106 inline bool isOK()
const;
107 inline unsigned int error()
const;
108 inline unsigned int minVal()
const;
109 inline unsigned int maxVal()
const;
112 int lookup(
unsigned int val )
const;
113 int remove(
unsigned int val );
114 int append(
unsigned int val );
118 void removeAt(
int ix );
119 bool insertAt(
int ix );
120 bool resizeTo(
int ix );
135 return ( ( ix < 0 || ix >=
sz_nu ) ? (~(
unsigned int)0) :
myArray[ix] );
147 return (
_isOK != 0 );
159 return ( (
sz_nu <= 0 ) ? (~(
unsigned int)0) :
myArray[0] );
204 inline unsigned int operator()(
int ix,
int jx )
const;
206 inline int count()
const;
207 inline bool isOK()
const;
208 inline unsigned int error()
const;
209 inline unsigned int minVal()
const;
210 inline unsigned int maxVal()
const;
212 int lookup(
unsigned int key,
unsigned int* pval=0 )
const;
213 int remove(
unsigned int key,
unsigned int* pval=0 );
214 int append(
unsigned int key,
unsigned int val,
unsigned int* pval=0 );
215 bool setVal(
int ix,
unsigned int val,
unsigned int* pval=0 );
219 void removeAt(
int ix );
220 bool insertAt(
int ix );
221 bool resizeTo(
int ix );
238 return ( ( ix < 0 || ix >=
sz_nu ) ?
245 return ( ( ix < 0 || ix >=
sz_nu ) ?
258 return (
_isOK != 0 );
270 return ( (
sz_nu <= 0 ) ? (~(
unsigned int)0) :
arr[0].key );
276 return ( (
sz_nu <= 0 ) ? (~(
unsigned int)0) :
arr[(
sz_nu - 1 )].key );
298 typedef int ( *cmpEntries )(
void*,
void* );
299 typedef void* ( *copyEntry )(
void* );
300 typedef void ( *deleteEntry )(
void* );
315 inline void* operator[](
int ix )
const;
319 bool init( cmpEntries cmpFnc, copyEntry cpyFnc, deleteEntry delFnc );
321 inline int count()
const;
322 inline bool isOK()
const;
323 inline unsigned int error()
const;
324 inline void* minVal()
const;
325 inline void* maxVal()
const;
327 int lookup(
void* val )
const;
328 int remove(
void* val );
329 int append(
void* val );
335 void reset(
bool all );
336 void removeAt(
int ix );
337 bool insertAt(
int ix );
338 bool resizeTo(
int ix );
int count() const
Definition: uniqEntryArr.h:359
int count() const
Definition: uniqEntryArr.h:250
Definition: uniqEntryArr.h:22
DtKeyValuePair * arr
Definition: uniqEntryArr.h:226
Defines IMPORT/EXPORT macros for lgrSim library.
#define DT_DLL_LGRSIM
Definition: lgrSim.h:21
int sz_nu
Definition: uniqEntryArr.h:344
unsigned int val
Definition: uniqEntryArr.h:25
DtKeyValuePair()
Definition: uniqEntryArr.h:28
unsigned int operator()(int ix, int jx) const
Definition: uniqEntryArr.h:243
unsigned int error() const
Definition: uniqEntryArr.h:262
cmpEntries myCmpFnc
Definition: uniqEntryArr.h:340
class 'DtUniqueEntryArray'
Definition: uniqEntryArr.h:85
unsigned int operator[](int ix) const
Subscript operator.
Definition: uniqEntryArr.h:133
unsigned int maxVal() const
Definition: uniqEntryArr.h:274
unsigned int operator[](int ix) const
Subscript operator.
Definition: uniqEntryArr.h:56
class 'DtUniqueEntryArrWData'
Definition: uniqEntryArr.h:187
DtKeyValuePair(const DtKeyValuePair &src)
Definition: uniqEntryArr.h:32
int count() const
Definition: uniqEntryArr.h:139
unsigned int key
Definition: uniqEntryArr.h:24
bool isOK() const
Definition: uniqEntryArr.h:145
void * minVal() const
Definition: uniqEntryArr.h:377
void * operator[](int ix) const
Subscript operator.
Definition: uniqEntryArr.h:353
int sz_nu
Definition: uniqEntryArr.h:227
~DtKeyValuePair()
Definition: uniqEntryArr.h:29
bool operator==(const DtKeyValuePair &rhs)
Comparison operators.
Definition: uniqEntryArr.h:45
deleteEntry myDelFnc
Definition: uniqEntryArr.h:342
unsigned int myErrorFlag
Definition: uniqEntryArr.h:345
DtKeyValuePair & operator=(const DtKeyValuePair &src)
Assignment operator.
Definition: uniqEntryArr.h:36
bool isOK() const
Definition: uniqEntryArr.h:256
class 'DtUniqueEntryArrayVPtr'
Definition: uniqEntryArr.h:295
bool isOK() const
Definition: uniqEntryArr.h:365
void ** myEntries
Definition: uniqEntryArr.h:343
int _isOK
Definition: uniqEntryArr.h:124
int myOkFlag
Definition: uniqEntryArr.h:344
unsigned int minVal() const
Definition: uniqEntryArr.h:268
unsigned int error() const
Definition: uniqEntryArr.h:151
int sz_nu
Definition: uniqEntryArr.h:124
unsigned int * myArray
Definition: uniqEntryArr.h:123
int _isOK
Definition: uniqEntryArr.h:227
static const DtKeyValuePair dfltDummyEntry
Definition: uniqEntryArr.h:223
unsigned int maxVal() const
Definition: uniqEntryArr.h:163
unsigned int ErrFlg
Definition: uniqEntryArr.h:125
copyEntry myCpyFnc
Definition: uniqEntryArr.h:341
const DtKeyValuePair & operator[](int ix) const
Subscript operators.
Definition: uniqEntryArr.h:236
unsigned int error() const
Definition: uniqEntryArr.h:371
void * maxVal() const
Definition: uniqEntryArr.h:383
DtKeyValuePair(unsigned int _key, unsigned int _val)
Definition: uniqEntryArr.h:30
unsigned int minVal() const
Definition: uniqEntryArr.h:157
bool operator!=(const DtKeyValuePair &rhs)
Definition: uniqEntryArr.h:50
unsigned int ErrFlg
Definition: uniqEntryArr.h:228