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

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.
DtListoperator= (const DtList &orig)
 Assignment operator.
DtListItemfirst () const
 Return first and last item on the list.
DtListItemlast () const
unsigned count () const
 Returns the number of elements in the list.
DtListItemadd (void *data)
 Add element to the end of the list.
DtListItemaddToStart (void *data)
 Add element to the beginning of the list.
DtListItemaddToEnd (void *data)
 Add element to the end of the list.
DtListItemaddBefore (void *data, DtListItem *before)
 Add element to the list just before the indicated item.
DtListItemaddAfter (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.
DtListItemitemLookup (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

DtListItemmyFirst
DtListItemmyLast
unsigned myCount

Detailed Description

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(); }

Constructor & Destructor Documentation

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.

Member Function Documentation

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 
)
protectedvirtual

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().

DtListItem* DtList::itemLookup ( const void *  data) const

Returns the DtListItem envelope object containing the indicated data element.

DtListItem * DtList::last ( ) const
inline
DtList& DtList::operator= ( const DtList orig)

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)
protectedvirtual

Remove item from the list.

Does NOT delete the data contained in item.

Reimplemented in DtIntrusiveList.

Member Data Documentation

unsigned DtList::myCount
protected
DtListItem* DtList::myFirst
protected
DtListItem* DtList::myLast
protected

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

Document ID: Generated on Wed Oct 23 22:25:48 EDT 2013 from SVN revision 132765
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)