class TMIBagAsVector


Definition#include <classlib/include/classlib/bags.h>
Template formTMIBagAsVector<class T>
InheritsTBagAsVectorImp [public ], TShouldDelete [public ]
Inherited byTIBag, TIBagAsVector, TISet, TISetAsVector, TMISetAsVector
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Public Members

Private Types


Detailed Description

typedef TBagAsVectorImp<TMICVectorImp,T *> Parent

Parent

[private]

typedef void  (*IterFunc) (T&, void *)

(*IterFunc)

typedef int  (*CondFunc) (const T&, void *)

(*CondFunc)

friend class TMIBagAsVectorIterator

TMIBagAsVectorIterator

 TMIBagAsVector ( unsigned sz = DEFAULT_BAG_SIZE )

TMIBagAsVector

 ~TMIBagAsVector ()

~TMIBagAsVector

int  Add ( T *t )

Add

int  Detach ( T *t, DeleteType dt = NoDelete )

Detach

int  HasMember ( const T *t )

HasMember

[const]

void  Flush ( TShouldDelete::DeleteType dt = TShouldDelete::DefDelete )

Flush

empty the bag; if the ownership is on also the elements in the bag will be destroyed

T * Find ( 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


Generated by: nicola on gulliver.wadahome.it on Sun May 25 13:54:34 2003, using kdoc 2.0a53.