Public Methods
- TMBagAsVector ( unsigned sz = DEFAULT_BAG_SIZE )
- int Add ( const T& t )
- int Detach ( const T& t )
- int HasMember ( const T& t ) const
- const T * Find ( const T& t ) const
- void ForEach ( IterFunc iter, void *args )
- T * FirstThat ( CondFunc cond, void *args ) const
- T * LastThat ( CondFunc cond, void *args ) const
- void Flush ()
Public Members
Private Types
- typedef TBagAsVectorImp,T> Parent
[private]
friend class TMBagAsVectorIterator
| TMBagAsVectorIterator |
typedef void (*IterFunc) (T&, void *)
| (*IterFunc) |
typedef int (*CondFunc) (const T&, void *)
| (*CondFunc) |
TMBagAsVector ( unsigned sz = DEFAULT_BAG_SIZE )
| TMBagAsVector |
int Add ( const T& t )
| Add |
int Detach ( const T& t )
| Detach |
int HasMember ( const T& t )
| HasMember |
[const]
return true if the item is in the bag
const T * Find ( const T& t )
| Find |
[const]
find an element in the bag; return the address if found or NULL
void ForEach ( IterFunc iter, void *args )
| ForEach |
auto iterator: use an iterator function calling it for every element of the bag;
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 bag;
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
tested 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 bag;
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
tested successful will be returned or NULL if no elements is ok
Discarge every element in the bag
Generated by: nicola on gulliver.wadahome.it on Sun May 25 13:54:34 2003, using kdoc 2.0a53. |