class TMBagAsVector


Definition#include <classlib/include/classlib/bags.h>
Template formTMBagAsVector<class T>
InheritsTBagAsVectorImp [public ]
Inherited byTBag, TBagAsVector, TMSetAsVector, TSet, TSetAsVector
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Public Members

Private Types


Detailed Description

typedef TBagAsVectorImp<TMCVectorImp,T> Parent

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

void  Flush ()

Flush

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.