Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Examples  

corelinux::CoreLinuxAssociativeIterator Template Class Reference

The CoreLinuxAssociativeIterator provides a way to access the elements of any of the associative STL collections, by defining a CoreLinuxAssociativeIterator with a CORELINUX_COLLECTION nameAssociativeIterator definition, the KeyType and the Element Type. More...

#include <CoreLinuxAssociativeIterator.hpp>

Inheritance diagram for corelinux::CoreLinuxAssociativeIterator

Inheritance graph
[legend]
Collaboration diagram for corelinux::CoreLinuxAssociativeIterator:

Collaboration graph
[legend]
List of all members.

Public Methods

 CoreLinuxAssociativeIterator ( void ) throw (InvalidIteratorException)
 Default constructor. More...

 CoreLinuxAssociativeIterator ( TraverseType aBegin, TraverseType aEnd )
 Initializing constructor. More...

 CoreLinuxAssociativeIterator ( const CoreLinuxAssociativeIterator &aRef )
 Copy constructor. More...

virtual ~CoreLinuxAssociativeIterator ( void )
 Destructor.

CoreLinuxAssociativeIterator& operator= ( const CoreLinuxAssociativeIterator & aRef )
 Assignment operator. More...

bool operator== ( const CoreLinuxAssociativeIterator & aRef ) const
 Equality operator. More...

virtual bool isValid ( void ) const
 isValid implementation for determining if the current position points to a valid EntityType instance. More...

virtual ElementType getElement ( void ) const throw (IteratorBoundsException)
 getElement returns the ElementType instance that is currently managed by the CoreLinuxAssociativeIterator. More...

virtual KeyType getKey ( void ) const throw (IteratorBoundsException)
 getKey returns the KeyType instance that is currently pointed to by the AssociativeIterator. More...

virtual void setFirst ( void )
 Set AssociativeIterator to first element.

virtual void setNext ( void ) throw (IteratorBoundsException)
 Set AssociativeIterator to next element. More...

virtual void setPrevious ( void ) throw (IteratorBoundsException)
 Set AssociativeIterator to previous element. More...

virtual void setLast ( void ) throw (IteratorBoundsException)
 Set AssociativeIterator to last element.


Protected Attributes

TraverseType theBegin
 The first position.

TraverseType theEnd
 The last position.

TraverseType theCurrent
 The current position.


Detailed Description

template<class TraverseType, class KeyType, class ElementType> template class corelinux::CoreLinuxAssociativeIterator

The CoreLinuxAssociativeIterator provides a way to access the elements of any of the associative STL collections, by defining a CoreLinuxAssociativeIterator with a CORELINUX_COLLECTION nameAssociativeIterator definition, the KeyType and the Element Type.


Constructor & Destructor Documentation

template<classTraverseType, classKeyType, classElementType>
corelinux::CoreLinuxAssociativeIterator<TraverseType, KeyType, ElementType>::CoreLinuxAssociativeIterator<TraverseType, KeyType, ElementType> ( void ) throw (InvalidIteratorException)
 

Default constructor.

Exceptions:
InvalidIteratorException   - the CoreLinuxAssociativeIterator requires being constructed with a valid collection

template<classTraverseType, classKeyType, classElementType>
corelinux::CoreLinuxAssociativeIterator<TraverseType, KeyType, ElementType>::CoreLinuxAssociativeIterator<TraverseType, KeyType, ElementType> ( TraverseType aBegin,
TraverseType aEnd )
 

Initializing constructor.

Parameters:
TraverseType   aBegin first position
TraverseType   aEnd last position

template<classTraverseType, classKeyType, classElementType>
corelinux::CoreLinuxAssociativeIterator<TraverseType, KeyType, ElementType>::CoreLinuxAssociativeIterator<TraverseType, KeyType, ElementType> ( const CoreLinuxAssociativeIterator<TraverseType, KeyType, ElementType> & aRef )
 

Copy constructor.

Parameters:
CoreLinuxAssociativeIterator   const reference


Member Function Documentation

template<classTraverseType, classKeyType, classElementType>
ElementType corelinux::CoreLinuxAssociativeIterator<TraverseType, KeyType, ElementType>::getElement ( void ) const throw (IteratorBoundsException) [inline, virtual]
 

getElement returns the ElementType instance that is currently managed by the CoreLinuxAssociativeIterator.

Returns:
ElementType
Exceptions:
IteratorBoundsException   if the AssociativeIterator is not positioned correctley.

Reimplemented from corelinux::Iterator.

template<classTraverseType, classKeyType, classElementType>
KeyType corelinux::CoreLinuxAssociativeIterator<TraverseType, KeyType, ElementType>::getKey ( void ) const throw (IteratorBoundsException) [inline, virtual]
 

getKey returns the KeyType instance that is currently pointed to by the AssociativeIterator.

Returns:
KeyType
Exceptions:
IteratorBoundsException   if the AssociativeIterator is not positioned correctly.

Reimplemented from corelinux::AssociativeIterator.

template<classTraverseType, classKeyType, classElementType>
bool corelinux::CoreLinuxAssociativeIterator<TraverseType, KeyType, ElementType>::isValid ( void ) const [inline, virtual]
 

isValid implementation for determining if the current position points to a valid EntityType instance.

Returns:
bool true if valid, false otherwise

Reimplemented from corelinux::Iterator.

template<classTraverseType, classKeyType, classElementType>
CoreLinuxAssociativeIterator<TraverseType, KeyType, ElementType> & corelinux::CoreLinuxAssociativeIterator<TraverseType, KeyType, ElementType>::operator= ( const CoreLinuxAssociativeIterator<TraverseType, KeyType, ElementType> & aRef ) [inline]
 

Assignment operator.

Parameters:
CoreLinuxAssociativeIterator   const reference
Returns:
CoreLinuxAssociativeIterator reference

template<classTraverseType, classKeyType, classElementType>
bool corelinux::CoreLinuxAssociativeIterator<TraverseType, KeyType, ElementType>::operator== ( const CoreLinuxAssociativeIterator<TraverseType, KeyType, ElementType> & aRef ) const [inline]
 

Equality operator.

Parameters:
CoreLinuxAssociativeIterator   const reference
Returns:
bool - true if the respective positions are equal.

template<classTraverseType, classKeyType, classElementType>
void corelinux::CoreLinuxAssociativeIterator<TraverseType, KeyType, ElementType>::setNext ( void ) throw (IteratorBoundsException) [inline, virtual]
 

Set AssociativeIterator to next element.

Exceptions:
IteratorBoundsException   if attempt to position past end of elements

Reimplemented from corelinux::Iterator.

template<classTraverseType, classKeyType, classElementType>
void corelinux::CoreLinuxAssociativeIterator<TraverseType, KeyType, ElementType>::setPrevious ( void ) throw (IteratorBoundsException) [inline, virtual]
 

Set AssociativeIterator to previous element.

Exceptions:
IteratorBoundsException   if attempt to position before begining of elements

Reimplemented from corelinux::Iterator.


The documentation for this class was generated from the following file:
This is the CoreLinux++ reference manual
Provided by The CoreLinux Consortium