vdk 2.4.0
Public Member Functions | List of all members
VDKValueListIterator< T > Class Template Reference

provides a VDKValueList iterator More...

#include <value_sem_list.h>

Public Member Functions

 VDKValueListIterator ()
 
 VDKValueListIterator (const VDKValueList< T > &l)
 
virtual ~VDKValueListIterator ()
 
void operator++ ()
 
void operator++ (int)
 
void operator-- ()
 
void operator-- (int)
 
void first ()
 
void last ()
 
 operator int ()
 
T & current ()
 
void restart ()
 

Detailed Description

template<class T>
class VDKValueListIterator< T >

provides a VDKValueList iterator

Programming tips
Using iterators is straightforward:
typedef VDKValueList<int> IntList;
typedef VDKValueListIterator<int> IntListIterator;
IntList list;
// some code to fill list goes here..
// ...
// ...
IntListIterator li(list);
while(li)
{
// make whatever
makewhatever(li.current());
li++;
}
// or
// for(IntListIterator li(list);li;li++)
// printf("\n%d",li.current();

Constructor & Destructor Documentation

◆ VDKValueListIterator() [1/2]

template<class T >
VDKValueListIterator< T >::VDKValueListIterator ( )
inline

Default constructor (unuseful)

◆ VDKValueListIterator() [2/2]

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

Constructor

Parameters
la VDKValueList reference

◆ ~VDKValueListIterator()

template<class T >
virtual VDKValueListIterator< T >::~VDKValueListIterator ( )
inlinevirtual

Destructor

Member Function Documentation

◆ current()

template<class T >
T& VDKValueListIterator< T >::current ( )
inline

Returns type T currently accessed

◆ first()

template<class T >
void VDKValueListIterator< T >::first ( )
inline

Goes to list head

◆ last()

template<class T >
void VDKValueListIterator< T >::last ( )
inline

Goes to list tail

◆ operator int()

template<class T >
VDKValueListIterator< T >::operator int ( )
inline

Returns 0 at list end

◆ operator++() [1/2]

template<class T >
void VDKValueListIterator< T >::operator++ ( )
inline

Incremental operator (postfix)

◆ operator++() [2/2]

template<class T >
void VDKValueListIterator< T >::operator++ ( int  )
inline

Incremental operator (infix)

◆ operator--() [1/2]

template<class T >
void VDKValueListIterator< T >::operator-- ( )
inline

Decremental operator (postfix)

◆ operator--() [2/2]

template<class T >
void VDKValueListIterator< T >::operator-- ( int  )
inline

Decremental operator (infix)

◆ restart()

template<class T >
void VDKValueListIterator< T >::restart ( )
inline

Rewinds operator


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