UniConfGen::Iter Class Reference

#include <uniconfgen.h>

Inheritance diagram for UniConfGen::Iter:

[legend]
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 323 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.
virtual WvString value () const =0
 Returns the value of the current key.


Member Function Documentation

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

Rewinds the iterator.

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

Implemented in UniConfGen::NullIter, UniListIter, UniRegistryGenIter, UniFileSystemGenIter, UniListGen::IterIter, _UniSecureIter, GenStyleValueTreeIter, GenStyleChangeTreeIter, UniUnwrapGen::Iter, UniUnwrapGen::RecursiveIter, and UniWvConfGen::WvConfIter.

Referenced by UniTransactionGen::apply_values(), UniTransactionGen::cancel_values(), UniTransactionGen::deletion_simulator(), UniTransactionGen::deletion_simulator2(), UniConfGen::haschildren(), UniCacheGen::loadtree(), GenStyleChangeTreeIter::next(), and UniReplicateGen::replicate().

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, UniListIter, UniRegistryGenIter, UniFileSystemGenIter, UniListGen::IterIter, _UniSecureIter, GenStyleValueTreeIter, GenStyleChangeTreeIter, UniUnwrapGen::Iter, UniUnwrapGen::RecursiveIter, and UniWvConfGen::WvConfIter.

Referenced by UniTransactionGen::apply_values(), UniTransactionGen::cancel_values(), UniTransactionGen::deletion_simulator(), UniTransactionGen::deletion_simulator2(), UniConfGen::haschildren(), UniCacheGen::loadtree(), GenStyleChangeTreeIter::next(), and UniReplicateGen::replicate().

virtual WvString UniConfGen::Iter::value (  )  const [pure virtual]

Returns the value of the current key.

You could just do a get(), but maybe your generator has a more efficient way.

Implemented in UniConfGen::NullIter, UniListIter, UniRegistryGenIter, UniFileSystemGenIter, UniListGen::IterIter, _UniSecureIter, GenStyleValueTreeIter, GenStyleChangeTreeIter, UniUnwrapGen::Iter, UniUnwrapGen::RecursiveIter, and UniWvConfGen::WvConfIter.

Referenced by UniCacheGen::loadtree(), UniReplicateGen::replicate(), and GenStyleChangeTreeIter::value().


The documentation for this class was generated from the following file:
Generated on Sun Sep 24 20:10:59 2006 for WvStreams by  doxygen 1.4.7