COVISE Core
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
covise::coDLList< T > Class Template Reference

#include <coDLList.h>

Inheritance diagram for covise::coDLList< T >:
Inheritance graph
[legend]

Public Member Functions

 coDLList (void)
 constructor: construct empty list More...
 
virtual ~coDLList (void)
 destructor : virtual for all derived classes More...
 
int num (void) const
 number of items in this list More...
 
 operator bool ()
 are there elements in my list ? More...
 
virtual void remove (coDLListElem< T > *whichElem)
 remove specific item from list : virtual for coDLPtrList More...
 
coDLList< T > & append (const T &)
 add new item to end of list More...
 
item (int)
 return the Nth item: prefer usage of [] or iterator More...
 
T & operator[] (int)
 return the Nth item More...
 
const T & operator[] (int) const
 return the Nth item, const version More...
 
virtual void clean ()
 cleanuop everything More...
 
coDLListIter< T > first ()
 get an Iterator placed on the first element More...
 
coDLListIter< T > last ()
 get an Iterator placed on the last element More...
 
coDLListIter< T > findElem (const T &)
 get an Iterator placed to specific element More...
 
coDLListIter< T > findElem (const T &, const coDLListCompare< T > &comp)
 get an Iterator placed to specific element with compare-object More...
 
coDLListIter< T > findElem (int i)
 get an Iterator placed to specific element number More...
 
coDLListElem< T > * getHeadStruct ()
 get the head ot the chain: primarily used for defining own iterators More...
 
coDLListElem< T > * getTailStruct ()
 get the tail ot the chain: primarily used for defining own iterators More...
 

Protected Member Functions

void addIter (coDLListSafeIter< T > *iter)
 
void removeIter (coDLListSafeIter< T > *iter)
 
void invalidateIterators (void)
 
void correctIteratorsFor (coDLListElem< T > *whichElem)
 

Protected Attributes

coDLListElem< T > * head
 
coDLListElem< T > * tail
 
int listItems
 
std::list< coDLListSafeIter< T > * > m_iterators
 

Friends

class coDLListIter< T >
 friendly iterator More...
 
class coDLListSafeIter< T >
 

Detailed Description

template<class T>
class covise::coDLList< T >

Template coDLList : Double linked list of T Elements (not pointers)

Author
Andreas Werner, 23.03.1999
See Also
coDLList
coDLListIter
coDLPtrList

Constructor & Destructor Documentation

template<class T >
INLINE covise::coDLList< T >::coDLList ( void  )

constructor: construct empty list

template<class T >
INLINE covise::coDLList< T >::~coDLList ( void  )
virtual

destructor : virtual for all derived classes

Member Function Documentation

template<class T>
void covise::coDLList< T >::addIter ( coDLListSafeIter< T > *  iter)
inlineprotected
template<class T>
INLINE coDLList< T > & covise::coDLList< T >::append ( const T &  a)

add new item to end of list

template<class T >
INLINE void covise::coDLList< T >::clean ( void  )
virtual

cleanuop everything

Reimplemented in covise::coDLPtrList< T >.

template<class T>
void covise::coDLList< T >::correctIteratorsFor ( coDLListElem< T > *  whichElem)
inlineprotected
template<class T>
INLINE coDLListIter< T > covise::coDLList< T >::findElem ( const T &  searchItem)

get an Iterator placed to specific element

template<class T>
INLINE coDLListIter< T > covise::coDLList< T >::findElem ( const T &  searchItem,
const coDLListCompare< T > &  comp 
)

get an Iterator placed to specific element with compare-object

template<class T>
INLINE coDLListIter< T > covise::coDLList< T >::findElem ( int  i)

get an Iterator placed to specific element number

template<class T >
INLINE coDLListIter< T > covise::coDLList< T >::first ( )

get an Iterator placed on the first element

template<class T>
coDLListElem<T>* covise::coDLList< T >::getHeadStruct ( )
inline

get the head ot the chain: primarily used for defining own iterators

template<class T>
coDLListElem<T>* covise::coDLList< T >::getTailStruct ( )
inline

get the tail ot the chain: primarily used for defining own iterators

template<class T>
void covise::coDLList< T >::invalidateIterators ( void  )
inlineprotected
template<class T >
INLINE T covise::coDLList< T >::item ( int  n)

return the Nth item: prefer usage of [] or iterator

template<class T >
INLINE coDLListIter< T > covise::coDLList< T >::last ( )

get an Iterator placed on the last element

template<class T>
int covise::coDLList< T >::num ( void  ) const
inline

number of items in this list

template<class T>
covise::coDLList< T >::operator bool ( )
inline

are there elements in my list ?

template<class T >
INLINE T & covise::coDLList< T >::operator[] ( int  n)

return the Nth item

template<class T >
INLINE const T & covise::coDLList< T >::operator[] ( int  n) const

return the Nth item, const version

template<class T>
INLINE void covise::coDLList< T >::remove ( coDLListElem< T > *  whichElem)
virtual

remove specific item from list : virtual for coDLPtrList

Reimplemented in covise::coDLPtrList< T >.

template<class T>
void covise::coDLList< T >::removeIter ( coDLListSafeIter< T > *  iter)
inlineprotected

Friends And Related Function Documentation

template<class T>
friend class coDLListIter< T >
friend

friendly iterator

template<class T>
friend class coDLListSafeIter< T >
friend

Member Data Documentation

template<class T>
coDLListElem<T>* covise::coDLList< T >::head
protected
template<class T>
int covise::coDLList< T >::listItems
protected
template<class T>
std::list<coDLListSafeIter<T> *> covise::coDLList< T >::m_iterators
protected
template<class T>
coDLListElem<T> * covise::coDLList< T >::tail
protected

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