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

VCF::Enumerator< COLLECTION_TYPE > Class Template Reference

This is a template class that provides an interface for iterating through a collection, and provides a standard set of methods. More...

#include <vcf/FoundationKit/Dictionary.h>

Inheritance diagram for VCF::Enumerator< COLLECTION_TYPE >:

VCF::EnumeratorContainer< COLLECTION, COLLECTION_TYPE > VCF::EnumeratorMapContainer< COLLECTION, COLLECTION_TYPE > VCF::OrderedEnumerator< ItemType, std::list< ItemType > > VCF::OrderedEnumerator< ItemType, std::vector< ItemType > > VCF::AssociativeEnumerator< KeyType, ValueType, std::map< KeyType, ValueType > > VCF::List< ItemType > VCF::Array< ItemType > VCF::Map< KeyType, ValueType > List of all members.

Public Member Functions

 Enumerator ()
virtual ~Enumerator ()
virtual bool hasMoreElements (const bool &backward=false) const =0
 indicates whether there are any more children to enumerate through
virtual COLLECTION_TYPE nextElement ()=0
 returns the next element in the enumeration.
virtual COLLECTION_TYPE prevElement ()=0
 returns the previous element in the enumeration.
virtual void reset (const bool &backward=false) const =0
 Resets the Enumerator's internal iterator back to the beginning (or end, if backward is true).
bool supportsEditing () const
 Currently not used.

Protected Attributes

bool supportsEditing_

Detailed Description

template<class COLLECTION_TYPE>
class VCF::Enumerator< COLLECTION_TYPE >

This is a template class that provides an interface for iterating through a collection, and provides a standard set of methods.

Either multiply inherited by classes that want to public expose a single set of children, or as a returned object for safe enumeration of data collections.


Constructor & Destructor Documentation

template<class COLLECTION_TYPE>
VCF::Enumerator< COLLECTION_TYPE >::Enumerator  )  [inline]
 

template<class COLLECTION_TYPE>
virtual VCF::Enumerator< COLLECTION_TYPE >::~Enumerator  )  [inline, virtual]
 


Member Function Documentation

template<class COLLECTION_TYPE>
virtual bool VCF::Enumerator< COLLECTION_TYPE >::hasMoreElements const bool &  backward = false  )  const [pure 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.

Implemented in VCF::DictionaryEnumerator, VCF::EnumeratorContainer< COLLECTION, COLLECTION_TYPE >, VCF::EnumeratorMapContainer< COLLECTION, COLLECTION_TYPE >, VCF::StringTokenizer, VCF::Regex::Host, VCF::EnumeratorContainer< std::vector< String >, String >, VCF::EnumeratorContainer< std::vector< FontInfo >, FontInfo >, VCF::EnumeratorContainer< std::vector< uint32 >, uint32 >, VCF::EnumeratorContainer< std::vector< Control * >, Control * >, VCF::EnumeratorContainer< std::vector< TabPage * >, TabPage * >, VCF::EnumeratorContainer< std::vector< MIMEType >, MIMEType >, VCF::EnumeratorContainer< std::vector< String >, String >, VCF::EnumeratorContainer< std::vector< Document * >, Document * >, VCF::EnumeratorContainer< std::vector< ColumnItem * >, ColumnItem * >, VCF::EnumeratorContainer< std::vector< View * >, View * >, VCF::EnumeratorContainer< std::vector< XMLNode * >, XMLNode * >, VCF::EnumeratorContainer< std::vector< UIComponent * >, UIComponent * >, VCF::EnumeratorContainer< std::vector< XMLAttr >, XMLAttr >, VCF::EnumeratorContainer< std::vector< ListItem * >, ListItem * >, VCF::EnumeratorContainer< std::vector< VCF::PackageInfo * >, VCF::PackageInfo * >, VCF::EnumeratorContainer< std::vector< RegistryValueInfo * >, RegistryValueInfo * >, VCF::EnumeratorContainer< std::vector< ToolbarItem * >, ToolbarItem * >, VCF::EnumeratorContainer< std::vector< Class * >, Class * >, VCF::EnumeratorContainer< std::vector< VariantData >, VariantData >, VCF::EnumeratorContainer< CollectionType, ItemType >, VCF::EnumeratorContainer< std::list< ItemType >, ItemType >, VCF::EnumeratorContainer< std::vector< MenuItem * >, MenuItem * >, VCF::EnumeratorContainer< std::vector< Component * >, Component * >, VCF::EnumeratorContainer< std::vector< ItemType >, ItemType >, VCF::EnumeratorMapContainer< std::map< String, DelegateProperty * >, DelegateProperty * >, VCF::EnumeratorMapContainer< std::map< String, Property * >, Property * >, VCF::EnumeratorMapContainer< std::map< String, Field * >, Field * >, VCF::EnumeratorMapContainer< std::map< KeyType, ValueType >, ValueType >, VCF::EnumeratorMapContainer< std::map< String, LibraryApplication * >, LibraryApplication * >, VCF::EnumeratorMapContainer< std::map< String, Class * >, Class * >, VCF::EnumeratorMapContainer< CollectionType, ValueType >, VCF::EnumeratorMapContainer< DocumentInfoMap, DocumentInfo >, VCF::EnumeratorMapContainer< std::map< uint32, TableCellItem * >, TableCellItem * >, VCF::EnumeratorMapContainer< std::map< String, Method * >, Method * >, VCF::EnumeratorMapContainer< std::map< String, InterfaceClass * >, InterfaceClass * >, and VCF::EnumeratorMapContainer< std::map< ColorID, String >, String >.

template<class COLLECTION_TYPE>
virtual COLLECTION_TYPE VCF::Enumerator< COLLECTION_TYPE >::nextElement  )  [pure 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

Implemented in VCF::DictionaryEnumerator, VCF::EnumeratorContainer< COLLECTION, COLLECTION_TYPE >, VCF::EnumeratorMapContainer< COLLECTION, COLLECTION_TYPE >, VCF::StringTokenizer, VCF::Regex::Host, VCF::EnumeratorContainer< std::vector< String >, String >, VCF::EnumeratorContainer< std::vector< FontInfo >, FontInfo >, VCF::EnumeratorContainer< std::vector< uint32 >, uint32 >, VCF::EnumeratorContainer< std::vector< Control * >, Control * >, VCF::EnumeratorContainer< std::vector< TabPage * >, TabPage * >, VCF::EnumeratorContainer< std::vector< MIMEType >, MIMEType >, VCF::EnumeratorContainer< std::vector< String >, String >, VCF::EnumeratorContainer< std::vector< Document * >, Document * >, VCF::EnumeratorContainer< std::vector< ColumnItem * >, ColumnItem * >, VCF::EnumeratorContainer< std::vector< View * >, View * >, VCF::EnumeratorContainer< std::vector< XMLNode * >, XMLNode * >, VCF::EnumeratorContainer< std::vector< UIComponent * >, UIComponent * >, VCF::EnumeratorContainer< std::vector< XMLAttr >, XMLAttr >, VCF::EnumeratorContainer< std::vector< ListItem * >, ListItem * >, VCF::EnumeratorContainer< std::vector< VCF::PackageInfo * >, VCF::PackageInfo * >, VCF::EnumeratorContainer< std::vector< RegistryValueInfo * >, RegistryValueInfo * >, VCF::EnumeratorContainer< std::vector< ToolbarItem * >, ToolbarItem * >, VCF::EnumeratorContainer< std::vector< Class * >, Class * >, VCF::EnumeratorContainer< std::vector< VariantData >, VariantData >, VCF::EnumeratorContainer< CollectionType, ItemType >, VCF::EnumeratorContainer< std::list< ItemType >, ItemType >, VCF::EnumeratorContainer< std::vector< MenuItem * >, MenuItem * >, VCF::EnumeratorContainer< std::vector< Component * >, Component * >, VCF::EnumeratorContainer< std::vector< ItemType >, ItemType >, VCF::EnumeratorMapContainer< std::map< String, DelegateProperty * >, DelegateProperty * >, VCF::EnumeratorMapContainer< std::map< String, Property * >, Property * >, VCF::EnumeratorMapContainer< std::map< String, Field * >, Field * >, VCF::EnumeratorMapContainer< std::map< KeyType, ValueType >, ValueType >, VCF::EnumeratorMapContainer< std::map< String, LibraryApplication * >, LibraryApplication * >, VCF::EnumeratorMapContainer< std::map< String, Class * >, Class * >, VCF::EnumeratorMapContainer< CollectionType, ValueType >, VCF::EnumeratorMapContainer< DocumentInfoMap, DocumentInfo >, VCF::EnumeratorMapContainer< std::map< uint32, TableCellItem * >, TableCellItem * >, VCF::EnumeratorMapContainer< std::map< String, Method * >, Method * >, VCF::EnumeratorMapContainer< std::map< String, InterfaceClass * >, InterfaceClass * >, and VCF::EnumeratorMapContainer< std::map< ColorID, String >, String >.

template<class COLLECTION_TYPE>
virtual COLLECTION_TYPE VCF::Enumerator< COLLECTION_TYPE >::prevElement  )  [pure 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

Implemented in VCF::DictionaryEnumerator, VCF::EnumeratorContainer< COLLECTION, COLLECTION_TYPE >, VCF::EnumeratorMapContainer< COLLECTION, COLLECTION_TYPE >, VCF::StringTokenizer, VCF::Regex::Host, VCF::EnumeratorContainer< std::vector< String >, String >, VCF::EnumeratorContainer< std::vector< FontInfo >, FontInfo >, VCF::EnumeratorContainer< std::vector< uint32 >, uint32 >, VCF::EnumeratorContainer< std::vector< Control * >, Control * >, VCF::EnumeratorContainer< std::vector< TabPage * >, TabPage * >, VCF::EnumeratorContainer< std::vector< MIMEType >, MIMEType >, VCF::EnumeratorContainer< std::vector< String >, String >, VCF::EnumeratorContainer< std::vector< Document * >, Document * >, VCF::EnumeratorContainer< std::vector< ColumnItem * >, ColumnItem * >, VCF::EnumeratorContainer< std::vector< View * >, View * >, VCF::EnumeratorContainer< std::vector< XMLNode * >, XMLNode * >, VCF::EnumeratorContainer< std::vector< UIComponent * >, UIComponent * >, VCF::EnumeratorContainer< std::vector< XMLAttr >, XMLAttr >, VCF::EnumeratorContainer< std::vector< ListItem * >, ListItem * >, VCF::EnumeratorContainer< std::vector< VCF::PackageInfo * >, VCF::PackageInfo * >, VCF::EnumeratorContainer< std::vector< RegistryValueInfo * >, RegistryValueInfo * >, VCF::EnumeratorContainer< std::vector< ToolbarItem * >, ToolbarItem * >, VCF::EnumeratorContainer< std::vector< Class * >, Class * >, VCF::EnumeratorContainer< std::vector< VariantData >, VariantData >, VCF::EnumeratorContainer< CollectionType, ItemType >, VCF::EnumeratorContainer< std::list< ItemType >, ItemType >, VCF::EnumeratorContainer< std::vector< MenuItem * >, MenuItem * >, VCF::EnumeratorContainer< std::vector< Component * >, Component * >, VCF::EnumeratorContainer< std::vector< ItemType >, ItemType >, VCF::EnumeratorMapContainer< std::map< String, DelegateProperty * >, DelegateProperty * >, VCF::EnumeratorMapContainer< std::map< String, Property * >, Property * >, VCF::EnumeratorMapContainer< std::map< String, Field * >, Field * >, VCF::EnumeratorMapContainer< std::map< KeyType, ValueType >, ValueType >, VCF::EnumeratorMapContainer< std::map< String, LibraryApplication * >, LibraryApplication * >, VCF::EnumeratorMapContainer< std::map< String, Class * >, Class * >, VCF::EnumeratorMapContainer< CollectionType, ValueType >, VCF::EnumeratorMapContainer< DocumentInfoMap, DocumentInfo >, VCF::EnumeratorMapContainer< std::map< uint32, TableCellItem * >, TableCellItem * >, VCF::EnumeratorMapContainer< std::map< String, Method * >, Method * >, VCF::EnumeratorMapContainer< std::map< String, InterfaceClass * >, InterfaceClass * >, and VCF::EnumeratorMapContainer< std::map< ColorID, String >, String >.

template<class COLLECTION_TYPE>
virtual void VCF::Enumerator< COLLECTION_TYPE >::reset const bool &  backward = false  )  const [pure 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

Implemented in VCF::DictionaryEnumerator, VCF::EnumeratorContainer< COLLECTION, COLLECTION_TYPE >, VCF::EnumeratorMapContainer< COLLECTION, COLLECTION_TYPE >, VCF::StringTokenizer, VCF::Regex::Host, VCF::EnumeratorContainer< std::vector< String >, String >, VCF::EnumeratorContainer< std::vector< FontInfo >, FontInfo >, VCF::EnumeratorContainer< std::vector< uint32 >, uint32 >, VCF::EnumeratorContainer< std::vector< Control * >, Control * >, VCF::EnumeratorContainer< std::vector< TabPage * >, TabPage * >, VCF::EnumeratorContainer< std::vector< MIMEType >, MIMEType >, VCF::EnumeratorContainer< std::vector< String >, String >, VCF::EnumeratorContainer< std::vector< Document * >, Document * >, VCF::EnumeratorContainer< std::vector< ColumnItem * >, ColumnItem * >, VCF::EnumeratorContainer< std::vector< View * >, View * >, VCF::EnumeratorContainer< std::vector< XMLNode * >, XMLNode * >, VCF::EnumeratorContainer< std::vector< UIComponent * >, UIComponent * >, VCF::EnumeratorContainer< std::vector< XMLAttr >, XMLAttr >, VCF::EnumeratorContainer< std::vector< ListItem * >, ListItem * >, VCF::EnumeratorContainer< std::vector< VCF::PackageInfo * >, VCF::PackageInfo * >, VCF::EnumeratorContainer< std::vector< RegistryValueInfo * >, RegistryValueInfo * >, VCF::EnumeratorContainer< std::vector< ToolbarItem * >, ToolbarItem * >, VCF::EnumeratorContainer< std::vector< Class * >, Class * >, VCF::EnumeratorContainer< std::vector< VariantData >, VariantData >, VCF::EnumeratorContainer< CollectionType, ItemType >, VCF::EnumeratorContainer< std::list< ItemType >, ItemType >, VCF::EnumeratorContainer< std::vector< MenuItem * >, MenuItem * >, VCF::EnumeratorContainer< std::vector< Component * >, Component * >, VCF::EnumeratorContainer< std::vector< ItemType >, ItemType >, VCF::EnumeratorMapContainer< std::map< String, DelegateProperty * >, DelegateProperty * >, VCF::EnumeratorMapContainer< std::map< String, Property * >, Property * >, VCF::EnumeratorMapContainer< std::map< String, Field * >, Field * >, VCF::EnumeratorMapContainer< std::map< KeyType, ValueType >, ValueType >, VCF::EnumeratorMapContainer< std::map< String, LibraryApplication * >, LibraryApplication * >, VCF::EnumeratorMapContainer< std::map< String, Class * >, Class * >, VCF::EnumeratorMapContainer< CollectionType, ValueType >, VCF::EnumeratorMapContainer< DocumentInfoMap, DocumentInfo >, VCF::EnumeratorMapContainer< std::map< uint32, TableCellItem * >, TableCellItem * >, VCF::EnumeratorMapContainer< std::map< String, Method * >, Method * >, VCF::EnumeratorMapContainer< std::map< String, InterfaceClass * >, InterfaceClass * >, and VCF::EnumeratorMapContainer< std::map< ColorID, String >, String >.

template<class COLLECTION_TYPE>
bool VCF::Enumerator< COLLECTION_TYPE >::supportsEditing  )  const [inline]
 

Currently not used.

Will allow editing of the Enumerator in the future, in which case this will return whether or not this instance of the enumerator allows adding or removing of elements

Returns:
bool true if the enumerator allows editing, otherwise false.


Member Data Documentation

template<class COLLECTION_TYPE>
bool VCF::Enumerator< COLLECTION_TYPE >::supportsEditing_ [protected]
 


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