|
|
[INTERNAL USE ONLY]
template
Implements the fundamental array operations for indirect arrays, using a vector as the underlying implementation.
The array is by default autodelete: the destructor destroy every element in the array trough the delete operator. The default behavory can be changed using the OwnsElements(int) member function inherit form TShouldDelete.
typedef void (*IterFunc) (T&, void *) | (*IterFunc) |
typedef int (*CondFunc) (const T&, void *) | (*CondFunc) |
TIArrayAsVectorImp ( int upper, int lower, int delta )
| TIArrayAsVectorImp |
~TIArrayAsVectorImp ()
| ~TIArrayAsVectorImp |
int Add ( T *t )
| Add |
int Detach ( T *t,
TShouldDelete::DeleteType dt = TShouldDelete::NoDelete )
| Detach |
remove an element from array without destroing it if need
int Detach ( int loc,
TShouldDelete::DeleteType dt = TShouldDelete::NoDelete )
| Detach |
remove an element from array without destroing it if need
int Destroy ( T *t )
| Destroy |
remove an element from array; the element will be destroyed is the ownership is on
int Destroy ( int loc )
| Destroy |
remove an element from array; the element will be destroyed is the ownership is on
int HasMember ( const T *t )
| HasMember |
[const]
true if the element is in the array
int Find ( const T *t )
| Find |
[const]
find an element in the array; return the index or UINT_MAX if not found
T *& operator [] ( int loc )
| operator [] |
convenience operator for extract elements from array
T *& operator [] ( int loc )
| operator [] |
[const]
convenience operator for extract elements from array
T *& Get ( int loc )
| Get |
[const]
extract elements from array
void ForEach ( IterFunc iter, void *args )
| ForEach |
auto iterator: use an iterator function calling it for every element of the array; the function must have a prototype like this: void iterFunc(T&, void* args);
T * FirstThat ( CondFunc cond, void *args )
| FirstThat |
[const]
auto iterator: use a test function calling it for every element of the array; the function must have a prototype like this: int testFunc(const T&, void* args); the function must return 0 if the test fail, != 0 if test is ok; the first element that testing successful will be returned or NULL if no elements is ok
T * LastThat ( CondFunc cond, void *args )
| LastThat |
[const]
auto iterator: use a test function calling it for every element of the array; the function must have a prototype like this: int testFunc(const T&, void* args); the function must return 0 if the test fail, != 0 if test is ok; the last element that testing successful will be returned or NULL if no elements is ok
void Flush ( DeleteType dt = DefDelete )
| Flush |
empty the array; if the ownership is on also the elements in the array will be destroyed
T *& ItemAt ( int i )
| ItemAt |
[protected const]
Generated by: nicola on gulliver.wadahome.it on Sun May 25 13:54:34 2003, using kdoc 2.0a53. |