![]() |
VR-Link API Documentation for HLA 1.3
|
DtList is deprecated, please use std::list<T>. More...
Inheritance diagram for DtList:
Collaboration diagram for DtList:Public Member Functions | |
| DtList () | |
| Constructor. | |
| virtual | ~DtList () |
| Destructor - does NOT free memory of data associated with the items. | |
| DtList (const DtList &orig) | |
| Copy constructor. | |
| DtList & | operator= (const DtList &orig) |
| Assignment operator. | |
| DtListItem * | first () const |
| Return first and last item on the list. | |
| DtListItem * | last () const |
| unsigned | count () const |
| Returns the number of elements in the list. | |
| DtListItem * | add (void *data) |
| Add element to the end of the list. | |
| DtListItem * | addToStart (void *data) |
| Add element to the beginning of the list. | |
| DtListItem * | addToEnd (void *data) |
| Add element to the end of the list. | |
| DtListItem * | addBefore (void *data, DtListItem *before) |
| Add element to the list just before the indicated item. | |
| DtListItem * | addAfter (void *data, DtListItem *after) |
| Add element to the list just after the indicated item. | |
| void * | remove (DtListItem *item) |
| Remove an element from the list. | |
| void | removeAll () |
| Calls remove for all elements in the list. | |
| DtListItem * | itemLookup (const void *data) const |
| Returns the DtListItem envelope object containing the indicated data element. | |
Protected Member Functions | |
| virtual void | addToList (DtListItem *item, DtListItem *after) |
| Add item to the list after after. | |
| virtual void | removeFromList (DtListItem *item) |
| Remove item from the list. | |
Protected Attributes | |
| DtListItem * | myFirst |
| DtListItem * | myLast |
| unsigned | myCount |
DtList is deprecated, please use std::list<T>.
The DtList class continues to be used in the VR-Link API for backwards compatibility.
A DtList is a list of elements of arbitrary type. Data elements are added to, and extracted from a DtList as void*. DtList encloses each element in a DtListItem object. You can iterate through the elements in a DtList like this:
for (DtListItem* item = list.first(); item; item = item->next()) { void* dataElement = item->data(); }
| DtList::DtList | ( | ) |
Constructor.
| virtual DtList::~DtList | ( | ) | [virtual] |
Destructor - does NOT free memory of data associated with the items.
It only frees the items.
| DtList::DtList | ( | const DtList & | orig | ) |
Copy constructor.
Shallow copy. Copies the pointers you've added to the list, but not the items that are pointed to.
| DtListItem * DtList::add | ( | void * | data | ) | [inline] |
Add element to the end of the list.
Returns the DtListItem envelope object that contains your new element.
| DtListItem* DtList::addAfter | ( | void * | data, |
| DtListItem * | after | ||
| ) |
Add element to the list just after the indicated item.
Returns the DtListItem envelope object that contains your new element.
| DtListItem * DtList::addBefore | ( | void * | data, |
| DtListItem * | before | ||
| ) | [inline] |
Add element to the list just before the indicated item.
Returns the DtListItem envelope object that contains your new element.
References DtListItem::myPrev.
| DtListItem * DtList::addToEnd | ( | void * | data | ) | [inline] |
Add element to the end of the list.
Returns the DtListItem envelope object that contains your new element.
| virtual void DtList::addToList | ( | DtListItem * | item, |
| DtListItem * | after | ||
| ) | [protected, virtual] |
Add item to the list after after.
Reimplemented in DtIntrusiveList.
| DtListItem * DtList::addToStart | ( | void * | data | ) | [inline] |
Add element to the beginning of the list.
Returns the DtListItem envelope object that contains your new element.
| unsigned DtList::count | ( | ) | const [inline] |
Returns the number of elements in the list.
| DtListItem * DtList::first | ( | ) | const [inline] |
Return first and last item on the list.
DtListItem is an envelope for your data. The data can be obtained using DtListItem::data().
Referenced by DtReflectedObjectList::firstObj().
| DtListItem* DtList::itemLookup | ( | const void * | data | ) | const |
Returns the DtListItem envelope object containing the indicated data element.
| DtListItem * DtList::last | ( | ) | const [inline] |
Referenced by DtReflectedObjectList::lastObj().
Assignment operator.
Shallow copy. Copies the pointers you've added to the list, but not the items that are pointed to. Old list items are removed from the list, and the elements they contain are not deleted.
| void* DtList::remove | ( | DtListItem * | item | ) |
Remove an element from the list.
Item is the envelope containing the data element you would like to remove. Note: remove does not free memory of data associated with the item. It only frees the item. The data is returned to the caller for deletion if required.
| void DtList::removeAll | ( | ) |
Calls remove for all elements in the list.
It does NOT delete the data in the list. Merely removes the data from the list.
| virtual void DtList::removeFromList | ( | DtListItem * | item | ) | [protected, virtual] |
Remove item from the list.
Does NOT delete the data contained in item.
Reimplemented in DtIntrusiveList.
unsigned DtList::myCount [protected] |
DtListItem* DtList::myFirst [protected] |
DtListItem* DtList::myLast [protected] |