VDKValueList< T > Class Template Reference

provides a templatized double-linked list More...

#include <value_sem_list.h>

List of all members.

Public Member Functions

Friends


Detailed Description

template<class T>
class VDKValueList< T >

provides a templatized double-linked list

Overview
VDKValueList has a value semantic, so all managed object are copied from original ones values. VDKValueList can manage all T type object provided that:
  • T t has a default constructor: T::T()
  • T t has a copy initializer: T::T(T& t)
  • T t has an assignement operator: T& T::operator=(T& t)
  • T t has an equality operator: int T::operator==(T& t)
  • T t has a less-than operator: int T::operator<(T& t)
Implementation notes
I suggest to use typedef's like:
  typedef VDKValueList<someClass>         SomeClassVDKValueListList;
  typedef VDKValueListIterator<SomeClass> SomeClassVDKValueListIterator;

Constructor & Destructor Documentation

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

Constructor makes an empty list

template<class T>
VDKValueList< T >::VDKValueList ( const VDKValueList< T > &  l  )  [inline]

Copy-initializer

template<class T>
VDKValueList< T >::~VDKValueList (  )  [inline, virtual]

Destructor


Member Function Documentation

template<class T>
VDKValueList< T > & VDKValueList< T >::operator= ( const VDKValueList< T > &  l  )  [inline]

Assignement operator

template<class T>
void VDKValueList< T >::add ( const T &  t  )  [inline]

Append a type T to list

template<class T>
void VDKValueList< T >::push ( const T &  t  )  [inline]

Prepend a type T to list

template<class T>
int VDKValueList< T >::insert ( const T &  t,
bool  unique = false 
) [inline]

Insert in order

Parameters:
unique if true denies duplicate key

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

Flushes list

template<class T>
T & VDKValueList< T >::operator[] ( int  n  )  [inline]

Ordinal access

template<class T>
T * VDKValueList< T >::find ( T &  t  )  [inline]

membership operator Returns T* NULL if not found

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

Returns list size

template<class T>
bool VDKValueList< T >::unlink ( int  ndx  )  [inline]

Unlink an element form list

Parameters:
ndx ordinal position of the element to be removed

template<class T>
int VDKValueList< T >::at ( T &  t  )  [inline]

Returns ordinal position of an element


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

Generated on Tue May 6 03:40:11 2008 for vdk 2.4.0 by  doxygen 1.5.5