#include <KeyedObjectManager.h>
Collaboration diagram for Containers::KeyedObjectManager< SETUP >:
Public Member Functions | |
| KeyedObjectManager () | |
| Standard Constructor. | |
| virtual | ~KeyedObjectManager () |
| Standard Destructor. | |
| void | clearDirect () |
| Clear all direct access fields. | |
| long | insertDirect (ObjectContainerBase *b, ContainedObject *c, void *o, long k) |
| Insert element into direct access map. | |
| long | isDirect () const |
| Check if the container is dirty. | |
| void * | object (long key) const |
| Retrieve object identified by a key from the container. | |
| long | insert (ObjectContainerBase *b, ContainedObject *c, void *o, long *k) |
| Insert new object into container. | |
| long | insert (ObjectContainerBase *b, ContainedObject *c, void *o, long k) |
| Insert new object into container. | |
| void * | erase (long key, const void *obj) |
| Remove object from container (very inefficient if key is invalid). | |
| long | erase (seq_type::iterator beg, seq_type::iterator end) |
| Remove object by sequential iterators. | |
| void | reserve (long size) |
| Reserve buffer space. | |
| void | clear () |
| Clear content of the vector. | |
| void | setup (void *seq, void **rndm) |
| Setup of the Map and the parent object. | |
Static Public Member Functions | |
| static CLID | classID () |
| Access CLID for this type of container. | |
Private Types | |
| typedef std::vector< void * > | seq_type |
Private Member Functions | |
| void | onDirty () const |
| Callbck when the container becomes dirty. | |
Private Attributes | |
| seq_type * | m_seq |
| Container holding array like container. | |
| long | m_direct |
| Dirty flag. | |
| long | m_keyCtxt |
| union { | |
| char buffer [128] | |
| Buffer space to hold keyed container. | |
| SETUP * s | |
| } | m_setup |
This class is instantiated for two container types: map and hashmap. Other typeas are possible, but currently not supported. Other implementations may be achieved by specializing the SETUP class.
As an example below the specialization for a vector like implementation is shown.
Definition at line 46 of file KeyedObjectManager.h.
typedef std::vector<void*> Containers::KeyedObjectManager< SETUP >::seq_type [private] |
Definition at line 48 of file KeyedObjectManager.h.
| Containers::KeyedObjectManager< SETUP >::KeyedObjectManager | ( | ) |
Standard Constructor.
| virtual Containers::KeyedObjectManager< SETUP >::~KeyedObjectManager | ( | ) | [virtual] |
Standard Destructor.
| void Containers::KeyedObjectManager< SETUP >::onDirty | ( | ) | const [private] |
Callbck when the container becomes dirty.
| void Containers::KeyedObjectManager< SETUP >::clearDirect | ( | ) |
Clear all direct access fields.
| long Containers::KeyedObjectManager< SETUP >::insertDirect | ( | ObjectContainerBase * | b, | |
| ContainedObject * | c, | |||
| void * | o, | |||
| long | k | |||
| ) |
Insert element into direct access map.
| long Containers::KeyedObjectManager< SETUP >::isDirect | ( | ) | const [inline] |
Check if the container is dirty.
Definition at line 73 of file KeyedObjectManager.h.
00073 { return m_direct; }
| void* Containers::KeyedObjectManager< SETUP >::object | ( | long | key | ) | const |
Retrieve object identified by a key from the container.
| long Containers::KeyedObjectManager< SETUP >::insert | ( | ObjectContainerBase * | b, | |
| ContainedObject * | c, | |||
| void * | o, | |||
| long * | k | |||
| ) |
Insert new object into container.
| long Containers::KeyedObjectManager< SETUP >::insert | ( | ObjectContainerBase * | b, | |
| ContainedObject * | c, | |||
| void * | o, | |||
| long | k | |||
| ) |
Insert new object into container.
| void* Containers::KeyedObjectManager< SETUP >::erase | ( | long | key, | |
| const void * | obj | |||
| ) |
Remove object from container (very inefficient if key is invalid).
| long Containers::KeyedObjectManager< SETUP >::erase | ( | seq_type::iterator | beg, | |
| seq_type::iterator | end | |||
| ) |
Remove object by sequential iterators.
| void Containers::KeyedObjectManager< SETUP >::reserve | ( | long | size | ) |
Reserve buffer space.
| void Containers::KeyedObjectManager< SETUP >::clear | ( | ) |
Clear content of the vector.
| void Containers::KeyedObjectManager< SETUP >::setup | ( | void * | seq, | |
| void ** | rndm | |||
| ) |
Setup of the Map and the parent object.
| static CLID Containers::KeyedObjectManager< SETUP >::classID | ( | ) | [static] |
Access CLID for this type of container.
seq_type* Containers::KeyedObjectManager< SETUP >::m_seq [private] |
long Containers::KeyedObjectManager< SETUP >::m_direct [mutable, private] |
long Containers::KeyedObjectManager< SETUP >::m_keyCtxt [mutable, private] |
Definition at line 53 of file KeyedObjectManager.h.
char Containers::KeyedObjectManager< SETUP >::buffer[128] [private] |
SETUP* Containers::KeyedObjectManager< SETUP >::s [private] |
Definition at line 57 of file KeyedObjectManager.h.
union { ... } Containers::KeyedObjectManager< SETUP >::m_setup [private] |
1.4.7