Sourceforge.net - The VCF's Project Host
   The VCF Website Home   |   Online Discussion Forums   |   Sourceforge.net Project Page   

VCF::DictionaryEnumerator Class Reference

The DictionaryEnumerator simply iterates through all of the items in a Dictionary. More...

#include <vcf/FoundationKit/Dictionary.h>

Inheritance diagram for VCF::DictionaryEnumerator:

VCF::Enumerator< std::pair< const String, VariantData > > List of all members.

Public Types

typedef String KeyType
typedef VariantData ValueType
typedef std::map< KeyType,
ValueType
MapType
typedef std::pair< const KeyType,
ValueType
PairType

Public Member Functions

 DictionaryEnumerator (MapType &container)
 DictionaryEnumerator ()
virtual ~DictionaryEnumerator ()
virtual void initContainer (MapType &container)
virtual Enumerator< PairType > * getEnumerator () const
virtual bool hasMoreElements (const bool &backward=false) const
 indicates whether there are any more children to enumerate through
virtual PairType nextElement ()
 returns the next element in the enumeration.
virtual PairType prevElement ()
 returns the previous element in the enumeration.
virtual void reset (const bool &backward=false) const
 Resets the Enumerator's internal iterator back to the beginning (or end, if backward is true).

Detailed Description

The DictionaryEnumerator simply iterates through all of the items in a Dictionary.

See also:
Dictionary

Enumerator


Member Typedef Documentation

typedef String VCF::DictionaryEnumerator::KeyType
 

typedef std::map<KeyType,ValueType> VCF::DictionaryEnumerator::MapType
 

typedef std::pair<const KeyType,ValueType> VCF::DictionaryEnumerator::PairType
 

typedef VariantData VCF::DictionaryEnumerator::ValueType
 


Constructor & Destructor Documentation

VCF::DictionaryEnumerator::DictionaryEnumerator MapType container  )  [inline]
 

VCF::DictionaryEnumerator::DictionaryEnumerator  )  [inline]
 

virtual VCF::DictionaryEnumerator::~DictionaryEnumerator  )  [inline, virtual]
 


Member Function Documentation

virtual Enumerator<PairType>* VCF::DictionaryEnumerator::getEnumerator  )  const [inline, virtual]
 

virtual bool VCF::DictionaryEnumerator::hasMoreElements const bool &  backward = false  )  const [inline, virtual]
 

indicates whether there are any more children to enumerate through

Parameters:
bool specifies whether the enumeration should be forwards or backwards. The default value is true for enumerating forwards.
Returns:
bool true if there are any elements left to enumerate, otherwise returns false.

Implements VCF::Enumerator< std::pair< const String, VariantData > >.

virtual void VCF::DictionaryEnumerator::initContainer MapType container  )  [inline, virtual]
 

virtual PairType VCF::DictionaryEnumerator::nextElement  )  [inline, virtual]
 

returns the next element in the enumeration.

Moves the internal iterator forward

Returns:
COLLECTION_TYPE returns a COLLECTION_TYPE value of whatever type was specified in the template argument to the Enumerator

Implements VCF::Enumerator< std::pair< const String, VariantData > >.

virtual PairType VCF::DictionaryEnumerator::prevElement  )  [inline, virtual]
 

returns the previous element in the enumeration.

Moves the internal iterator backward

Returns:
COLLECTION_TYPE returns a COLLECTION_TYPE value of whatever type was specified in the template argument to the Enumerator

Implements VCF::Enumerator< std::pair< const String, VariantData > >.

virtual void VCF::DictionaryEnumerator::reset const bool &  backward = false  )  const [inline, virtual]
 

Resets the Enumerator's internal iterator back to the beginning (or end, if backward is true).

Parameters:
bool specifies which direction to reset to

Implements VCF::Enumerator< std::pair< const String, VariantData > >.


The documentation for this class was generated from the following file:
   Comments or Suggestions?    License Information