Main Page   Modules   Class Hierarchy   Compound List   File List   Compound Members  

cLinkedListIterator Class Reference

#include <cllist.h>

List of all members.

Public Methods

 cLinkedListIterator (const cLinkedList &q, int athead=1)
void init (const cLinkedList &q, int athead=1)
void* operator() () const
bool end () const
void* operator++ (int)
void* operator-- (int)


Detailed Description

Walks along a cLinkedList object. To examine each element in the list, the cLinkedListIterator iterator class can be used. Once a cLinkedListIterator object is created for the list (the cLinkedList object), the ++ and -- operators can be used to step from one element of the list to the next/previous one.

NOTE: not a cObject descendant!


Constructor & Destructor Documentation

cLinkedListIterator::cLinkedListIterator ( const cLinkedList & q,
int athead = 1 ) [inline]
 

Constructor. Takes the cLinkedList object as argument. The current item will be the first (if athead==1, default) or the last (if athead==0) item in the list.


Member Function Documentation

bool cLinkedListIterator::end ( ) const [inline]
 

Returns true if we have reached the end (with operator++) or the beginning (with operator--) of the list.

void cLinkedListIterator::init ( const cLinkedList & q,
int athead = 1 ) [inline]
 

Reinitializes the iterator object.

void * cLinkedListIterator::operator() ( ) const [inline]
 

Returns the current item.

void * cLinkedListIterator::operator++ ( int ) [inline]
 

Returns the current item and steps to the next one.

void * cLinkedListIterator::operator-- ( int ) [inline]
 

Returns the current item and steps to the previous one.


The documentation for this class was generated from the following file:
Generated at Sat May 4 15:45:50 2002 for OMNeT++ by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001