Reference

corelinux_CoreLinuxAssociativeIterator(3)

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.

NAME

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.

SYNOPSIS

#include <CoreLinuxAssociativeIterator.hpp>

Inherits corelinux::AssociativeIterator< KeyType, ElementType >< KeyType, ElementType >.

Public Member Functions

CoreLinuxAssociativeIterator (void) throw (InvalidIteratorException)
Default constructor. CoreLinuxAssociativeIterator (TraverseType aBegin, TraverseType aEnd)
Initializing constructor. CoreLinuxAssociativeIterator (const CoreLinuxAssociativeIterator &aRef)
Copy constructor. virtual ~CoreLinuxAssociativeIterator (void)
Destructor. CoreLinuxAssociativeIterator & operator= (const CoreLinuxAssociativeIterator &aRef)
Assignment operator. bool operator== (const CoreLinuxAssociativeIterator &aRef) const
Equality operator. virtual bool isValid (void) const
isValid implementation for determining if the current position points to a valid EntityType instance virtual ElementType getElement (void) const throw (IteratorBoundsException)
getElement returns the ElementType instance that is currently managed by the CoreLinuxAssociativeIterator virtual KeyType getKey (void) const throw (IteratorBoundsException)
getKey returns the KeyType instance that is currently pointed to by the AssociativeIterator virtual void setFirst (void)
Set AssociativeIterator to first element. virtual void setNext (void) throw (IteratorBoundsException)
Set AssociativeIterator to next element. virtual void setPrevious (void) throw (IteratorBoundsException)
Set AssociativeIterator to previous element. 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> class corelinux::CoreLinuxAssociativeIterator< TraverseType, KeyType, ElementType >

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<class TraverseType, class KeyType, class ElementType> corelinux::CoreLinuxAssociativeIterator< TraverseType, KeyType, ElementType >::CoreLinuxAssociativeIterator (void) throw (InvalidIteratorException) [inline]

Default constructor. Exceptions:

InvalidIteratorException - the CoreLinuxAssociativeIterator requires being constructed with a valid collection

template<class TraverseType, class KeyType, class ElementType> corelinux::CoreLinuxAssociativeIterator< TraverseType, KeyType, ElementType >::CoreLinuxAssociativeIterator (TraverseType aBegin, TraverseType aEnd) [inline]

Initializing constructor. Parameters:

TraverseType aBegin first position
TraverseType aEnd last position

template<class TraverseType, class KeyType, class ElementType> corelinux::CoreLinuxAssociativeIterator< TraverseType, KeyType, ElementType >::CoreLinuxAssociativeIterator (const CoreLinuxAssociativeIterator< TraverseType, KeyType, ElementType > & aRef) [inline]

Copy constructor. Parameters:

CoreLinuxAssociativeIterator const reference

Member Function Documentation

template<class TraverseType, class KeyType, class ElementType> virtual 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.

Implements corelinux::Iterator< ElementType >.

template<class TraverseType, class KeyType, class ElementType> virtual 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.

Implements corelinux::AssociativeIterator< KeyType, ElementType >.

template<class TraverseType, class KeyType, class ElementType> virtual 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

Implements corelinux::Iterator< ElementType >.

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

Assignment operator. Parameters:

CoreLinuxAssociativeIterator const reference

Returns:

CoreLinuxAssociativeIterator reference

template<class TraverseType, class KeyType, class ElementType> 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<class TraverseType, class KeyType, class ElementType> virtual 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

Implements corelinux::Iterator< ElementType >.

template<class TraverseType, class KeyType, class ElementType> virtual 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

Implements corelinux::Iterator< ElementType >.

Author

Generated automatically by Doxygen for CoreLinux++ from the source code.

History