![]() |
VR-Link API Documentation for DIS
|
An intrusive list is a list that assumes that the elements that you add are pointers to instances of classes derived from DtListedObject. More...
Inheritance diagram for DtIntrusiveList:
Collaboration diagram for DtIntrusiveList:Protected Member Functions | |
| virtual void | addToList (DtListItem *item, DtListItem *after) |
| Override of virtual function. | |
| virtual void | removeFromList (DtListItem *item) |
| Override of virtual function. | |
| void | removeAndDelete (const DtListedObj *data) |
| Remove and delete an element from the list. | |
| virtual void | removeAndDelete (DtListItem *item) |
| Remove and delete an element from the list. | |
| virtual void | removeAllAndDelete () |
| Same as removeAll, except that this DOES delete the data in the list. | |
An intrusive list is a list that assumes that the elements that you add are pointers to instances of classes derived from DtListedObject.
When an intrusive list is use, you can get previous and next pointers directly from the listed elements, (through the base DtListedObject class), without having to go through the DtList itself.
| virtual void DtIntrusiveList::addToList | ( | DtListItem * | item, |
| DtListItem * | after | ||
| ) | [protected, virtual] |
Override of virtual function.
Saves pointer to the list and to the item in the DtListedObj.
Reimplemented from DtList.
| virtual void DtIntrusiveList::removeAllAndDelete | ( | ) | [protected, virtual] |
Same as removeAll, except that this DOES delete the data in the list.
| void DtIntrusiveList::removeAndDelete | ( | const DtListedObj * | data | ) | [protected] |
Remove and delete an element from the list.
| virtual void DtIntrusiveList::removeAndDelete | ( | DtListItem * | item | ) | [protected, virtual] |
Remove and delete an element from the list.
Item is the envelope containing the data element you would like to remove.
| virtual void DtIntrusiveList::removeFromList | ( | DtListItem * | item | ) | [protected, virtual] |
Override of virtual function.
Removes the item from this list, and cleans up the DtListedObj's item and list pointers.
Reimplemented from DtList.