![]() |
VR-Link API Documentation for HLA 1.3
|
Instances of DtGlobalIdHashlist are hash lists, where you can store associations between DtGlobalObjectDesignators and arbitrary pieces of data. More...
Collaboration diagram for DtGlobalIdHashlist:Public Member Functions | |
| DtGlobalIdHashlist (bool intrusive=false) | |
| Default constructor. | |
| virtual | ~DtGlobalIdHashlist () |
| destructor | |
| virtual DtListItem * | add (const DtGlobalObjectDesignator &key, void *data) |
| If an item with key already exists, then add will replace the data and move it to the location in list. | |
| virtual void * | remove (const DtGlobalObjectDesignator &key) |
| Remove the current association involving key from the list. | |
| virtual void * | lookup (const DtGlobalObjectDesignator &key) const |
| Lookup the data associated with key. | |
| virtual void * | operator[] (const DtGlobalObjectDesignator &key) const |
| virtual const DtList * | list () const |
| Get a DtList containing all of the void* data that you have listed, regardless of keys. | |
Protected Member Functions | |
| DtGlobalIdHashlist (const DtGlobalIdHashlist &orig) | |
| copy constructor | |
| DtGlobalIdHashlist & | operator= (const DtGlobalIdHashlist &orig) |
| assignment operator | |
Protected Attributes | |
| DtList * | myList |
| DtHashlist * | myHashlist |
Instances of DtGlobalIdHashlist are hash lists, where you can store associations between DtGlobalObjectDesignators and arbitrary pieces of data.
| DtGlobalIdHashlist::DtGlobalIdHashlist | ( | bool | intrusive = false | ) |
Default constructor.
Pass true only if the data that you are listing are instances of a class derived from DtListedObject.
| virtual DtGlobalIdHashlist::~DtGlobalIdHashlist | ( | ) | [virtual] |
destructor
| DtGlobalIdHashlist::DtGlobalIdHashlist | ( | const DtGlobalIdHashlist & | orig | ) | [protected] |
copy constructor
| virtual DtListItem* DtGlobalIdHashlist::add | ( | const DtGlobalObjectDesignator & | key, |
| void * | data | ||
| ) | [virtual] |
If an item with key already exists, then add will replace the data and move it to the location in list.
If your data was alloc'ed, do not add unless you know key is unique, or a memory leak will result. Add an association between key and data to the list.
| virtual const DtList* DtGlobalIdHashlist::list | ( | ) | const [virtual] |
Get a DtList containing all of the void* data that you have listed, regardless of keys.
| virtual void* DtGlobalIdHashlist::lookup | ( | const DtGlobalObjectDesignator & | key | ) | const [virtual] |
Lookup the data associated with key.
Referenced by operator[]().
| DtGlobalIdHashlist& DtGlobalIdHashlist::operator= | ( | const DtGlobalIdHashlist & | orig | ) | [protected] |
assignment operator
| void * DtGlobalIdHashlist::operator[] | ( | const DtGlobalObjectDesignator & | key | ) | const [inline, virtual] |
References lookup().
| virtual void* DtGlobalIdHashlist::remove | ( | const DtGlobalObjectDesignator & | key | ) | [virtual] |
Remove the current association involving key from the list.
Returns the data that was associated with key.
DtHashlist* DtGlobalIdHashlist::myHashlist [protected] |
DtList* DtGlobalIdHashlist::myList [protected] |