VCF::EnumeratorContainer< COLLECTION, COLLECTION_TYPE > Class Template Reference
EnumeratorContainer is based on some COLLECTION class that represents a collection class of some sort, i.e. More...
#include <vcf/FoundationKit/Enumerator.h>
Inheritance diagram for VCF::EnumeratorContainer< COLLECTION, COLLECTION_TYPE >:

Public Member Functions | |
| EnumeratorContainer (COLLECTION &container) | |
| EnumeratorContainer () | |
| virtual | ~EnumeratorContainer () |
| virtual void | initContainer (COLLECTION &container) |
| Initializes the container with a reference to an existing collection. | |
| virtual bool | hasMoreElements (const bool &backward=false) |
| indicates whether there are any more children to enumerate through | |
| virtual COLLECTION_TYPE | nextElement () |
| returns the next element in the enumeration. | |
| virtual COLLECTION_TYPE | prevElement () |
| returns the previous element in the enumeration. | |
| virtual void | reset (const bool &backward=false) |
| Resets the Enumerator's internal iterator back to the beginning (or end, if backward is true). | |
| virtual Enumerator< COLLECTION_TYPE > * | getEnumerator () |
| returns a pointer to the Enumerator interface of this container. | |
Detailed Description
template<class COLLECTION, class COLLECTION_TYPE>
class VCF::EnumeratorContainer< COLLECTION, COLLECTION_TYPE >
EnumeratorContainer is based on some COLLECTION class that represents a collection class of some sort, i.e.
std::vector<>, std::list, et al.
The internal implementation counts on the collection having a common interface to STL's collection classes.
The collection must support forward and reverse iterators
The COLLECTION type specifies the full collection associated with the enumerator.
For example, an enumerator container of Object* using a std::vector as it's collection type would look like this:
EnumeratorContainer<std::vector<Object*>,Object*> objectVecEnumerator;
Constructor & Destructor Documentation
|
||||||||||
|
|
|
|||||||||
|
|
|
|||||||||
|
|
Member Function Documentation
|
|||||||||
|
returns a pointer to the Enumerator interface of this container. Automatically resets the collection before returning the pointer.
|
|
||||||||||
|
indicates whether there are any more children to enumerate through
Implements VCF::Enumerator< COLLECTION_TYPE >. |
|
||||||||||
|
Initializes the container with a reference to an existing collection.
|
|
|||||||||
|
returns the next element in the enumeration. Moves the internal iterator forward
Implements VCF::Enumerator< COLLECTION_TYPE >. |
|
|||||||||
|
returns the previous element in the enumeration. Moves the internal iterator backward
Implements VCF::Enumerator< COLLECTION_TYPE >. |
|
||||||||||
|
Resets the Enumerator's internal iterator back to the beginning (or end, if backward is true).
Implements VCF::Enumerator< COLLECTION_TYPE >. |
The documentation for this class was generated from the following file:
- vcf/FoundationKit/Enumerator.h
