VR-Link API Documentation for DIS
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
DtGlobalIdHashlist Class Reference

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 DtListItemadd (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 DtListlist () 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
DtGlobalIdHashlistoperator= (const DtGlobalIdHashlist &orig)
 assignment operator

Protected Attributes

DtListmyList
DtHashlistmyHashlist

Detailed Description

Instances of DtGlobalIdHashlist are hash lists, where you can store associations between DtGlobalObjectDesignators and arbitrary pieces of data.

Constructor & Destructor Documentation

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

Member Function Documentation

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
inlinevirtual

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.

Member Data Documentation

DtHashlist* DtGlobalIdHashlist::myHashlist
protected
DtList* DtGlobalIdHashlist::myList
protected

The documentation for this class was generated from the following file:

Document ID: Generated on Wed Aug 14 15:35:11 EDT 2013 from SVN revision 130445
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)