VDKList< T > Class Template Reference

Provides a reference semantic double linked list. More...

#include <dlist.h>

List of all members.

Public Member Functions


Detailed Description

template<class T>
class VDKList< T >

Provides a reference semantic double linked list.

VDKList has a reference semantic, all managed objects are pointers to their original values. This calls is widely used for vdk internals.

Implementation notes
I suggest to use typedef like this:
  typedef VDKList<someClass> SomeClassList;
  typedef VDKListIterator<someClass> SomeClassListIterator;

Constructor & Destructor Documentation

template<class T>
VDKList< T >::VDKList (  )  [inline]

Constructor, makes an empty lis

template<class T>
VDKList< T >::~VDKList (  )  [inline]

Destructor. VDKList does not owns object pointed thus not provide to their destruction. Destruction of pointed objects must be explicit.

    // delete pointed objects
    SomeClassListIterator li(list);
    for(li;li++)
    delete li.current();


Member Function Documentation

template<class T>
void VDKList< T >::add ( T *  t  )  [inline]

Appends a pointer to type T to the list. To mantain reference integrity no same pointer will be added twice.

Parameters:
t type T pointer

Prepends a pointer to type T to the list. To mantain reference integrity no same pointer will be added twice.

Parameters:
t type T pointer

template<class T>
void VDKList< T >::insertAt ( T *  t,
int  pos 
) [inline]

Insert a pointer to type T to the list. To mantain reference integrity no same pointer will be added twice.

Parameters:
t type T pointer
pos ordinal position

template<class T>
T * VDKList< T >::find ( T *  x  )  [inline]

Membership operator, return NULL if not found

Parameters:
x address to be searched for

template<class T>
int VDKList< T >::at ( T *  x  )  [inline]

find position of type<T> object, returns ordinal position, -1 on failure

Parameters:
x address to be searched for

template<class T>
T* VDKList< T >::operator[] ( int  n  )  [inline]

Ordinal access operator

Reimplemented in PageList.

template<class T>
int VDKList< T >::remove ( T *  x  )  [inline]

Remove a pointer from list

Parameters:
x address to be removed

template<class T>
int VDKList< T >::size (  )  [inline]

Returns list size

Reimplemented in PageList.

template<class T>
void VDKList< T >::flush (  )  [inline]

Flushes list


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

Generated on Wed Mar 19 22:40:39 2008 for vdk 2.4.0 by  doxygen 1.5.5