Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

UniConfGen::Iter Class Reference

#include <uniconfgen.h>

Inherited by UniConfGen::NullIter, UniListGen::IterIter, UniMountTreeGen::KeyIter, and UniWvConfGen::WvConfIter.

List of all members.


Detailed Description

An abstract iterator over keys and values in a generator.

Unlike other WvStreams iterators, this one declares virtual methods so that UniConfGen implementations can supply the right behaviour through a common interface that does not depend on static typing.

The precise traversal sequence is defined by the iterator implementation.

The iterator need not support concurrent modifications of the underlying data structures.

TODO: Consider changing this rule depending on observed usage patterns.

Definition at line 237 of file uniconfgen.h.

Public Member Functions

virtual ~Iter ()
 Destroys the iterator.
virtual void rewind ()=0
 Rewinds the iterator.
virtual bool next ()=0
 Seeks to the next element in the sequence.
virtual UniConfKey key () const =0
 Returns the current key.


Constructor & Destructor Documentation

virtual UniConfGen::Iter::~Iter  )  [inline, virtual]
 

Destroys the iterator.

Definition at line 241 of file uniconfgen.h.


Member Function Documentation

virtual UniConfKey UniConfGen::Iter::key  )  const [pure virtual]
 

Returns the current key.

Implemented in UniConfGen::NullIter, UniListGen::IterIter, UniMountTreeGen::KeyIter, and UniWvConfGen::WvConfIter.

Referenced by UniMountTreeGen::KeyIter::rewind().

virtual bool UniConfGen::Iter::next  )  [pure virtual]
 

Seeks to the next element in the sequence.

Returns true if that element exists. Must be called prior to the first invocation of key().

Implemented in UniConfGen::NullIter, UniListGen::IterIter, UniMountTreeGen::KeyIter, and UniWvConfGen::WvConfIter.

Referenced by UniConfGen::haschildren(), UniCacheGen::loadtree(), and UniMountTreeGen::KeyIter::rewind().

virtual void UniConfGen::Iter::rewind  )  [pure virtual]
 

Rewinds the iterator.

Must be called prior to the first invocation of next().

Implemented in UniConfGen::NullIter, UniListGen::IterIter, UniMountTreeGen::KeyIter, and UniWvConfGen::WvConfIter.

Referenced by UniConfGen::haschildren(), UniCacheGen::loadtree(), and UniMountTreeGen::KeyIter::rewind().


The documentation for this class was generated from the following file:
Generated on Wed Dec 15 15:08:25 2004 for WvStreams by  doxygen 1.3.9.1