vdk 2.4.0
Public Member Functions | List of all members
VDKValueListIterator Class 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

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]

VDKValueListIterator::VDKValueListIterator ( )
inline

Default constructor (unuseful)

◆ VDKValueListIterator() [2/2]

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

Constructor

Parameters
la VDKValueList reference

◆ ~VDKValueListIterator()

virtual VDKValueListIterator::~VDKValueListIterator ( )
inlinevirtual

Destructor

Member Function Documentation

◆ current()

T& VDKValueListIterator::current ( )
inline

Returns type T currently accessed

◆ first()

void VDKValueListIterator::first ( )
inline

Goes to list head

◆ last()

void VDKValueListIterator::last ( )
inline

Goes to list tail

◆ operator int()

VDKValueListIterator::operator int ( )
inline

Returns 0 at list end

◆ operator++() [1/2]

void VDKValueListIterator::operator++ ( )
inline

Incremental operator (postfix)

◆ operator++() [2/2]

void VDKValueListIterator::operator++ ( int  )
inline

Incremental operator (infix)

◆ operator--() [1/2]

void VDKValueListIterator::operator-- ( )
inline

Decremental operator (postfix)

◆ operator--() [2/2]

void VDKValueListIterator::operator-- ( int  )
inline

Decremental operator (infix)

◆ restart()

void VDKValueListIterator::restart ( )
inline

Rewinds operator


The documentation for this class was generated from the following file:
VDKValueListIterator
provides a VDKValueList iterator
Definition: value_sem_list.h:55
VDKValueList
provides a templatized double-linked list
Definition: value_sem_list.h:54