corelinux::CoreLinuxIterator< TraverseType, ElementType > Class Template Reference

The CoreLinuxIterator provides a way to access the elements of any of the non-associative STL collections. More...

#include <CoreLinuxIterator.hpp>

Inheritance diagram for corelinux::CoreLinuxIterator< TraverseType, ElementType >:

corelinux::Iterator< ElementType > corelinux::CoreLinuxObject List of all members.

Public Member Functions

 CoreLinuxIterator (void) throw (InvalidIteratorException)
 Default constructor
Exceptions:
InvalidIteratorException - the CoreLinuxIterator requires being constructed with a valid collection.

 CoreLinuxIterator (TraverseType aBegin, TraverseType aEnd)
 Initializing constructor.
 CoreLinuxIterator (const CoreLinuxIterator &aRef)
 Copy constructor.
virtual ~CoreLinuxIterator (void)
 Destructor.
CoreLinuxIteratoroperator= (const CoreLinuxIterator &aRef)
 Assignment operator.
bool operator== (const CoreLinuxIterator &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 CoreLinuxIterator
virtual void setFirst (void)
 Set iterator to first element.
virtual void setNext (void) throw (IteratorBoundsException)
 Set iterator to next element
Exceptions:
IteratorBoundsException if attempt to position past end of elements.

virtual void setPrevious (void) throw (IteratorBoundsException)
 Set iterator to previous element
Exceptions:
IteratorBoundsException if attempt to position before begining of elements.

virtual void setLast (void) throw (IteratorBoundsException)
 Set iterator 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 ElementType>
class corelinux::CoreLinuxIterator< TraverseType, ElementType >

The CoreLinuxIterator provides a way to access the elements of any of the non-associative STL collections.

By defining a CoreLinuxIterator with a CORELINUX_COLLECTION nameIterator definition and the Element Type.


Constructor & Destructor Documentation

template<class TraverseType, class ElementType>
corelinux::CoreLinuxIterator< TraverseType, ElementType >::CoreLinuxIterator TraverseType  aBegin,
TraverseType  aEnd
[inline]
 

Initializing constructor.

Parameters:
TraverseType aBegin first position
TraverseType aEnd last position

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

Copy constructor.

Parameters:
CoreLinuxIterator const reference


Member Function Documentation

template<class TraverseType, class ElementType>
virtual ElementType corelinux::CoreLinuxIterator< TraverseType, ElementType >::getElement void   )  const throw (IteratorBoundsException) [inline, virtual]
 

getElement returns the ElementType instance that is currently managed by the CoreLinuxIterator

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

Implements corelinux::Iterator< ElementType >.

template<class TraverseType, class ElementType>
virtual bool corelinux::CoreLinuxIterator< TraverseType, 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 ElementType>
CoreLinuxIterator& corelinux::CoreLinuxIterator< TraverseType, ElementType >::operator= const CoreLinuxIterator< TraverseType, ElementType > &  aRef  )  [inline]
 

Assignment operator.

Parameters:
CoreLinuxIterator const reference
Returns:
CoreLinuxIterator reference

template<class TraverseType, class ElementType>
bool corelinux::CoreLinuxIterator< TraverseType, ElementType >::operator== const CoreLinuxIterator< TraverseType, ElementType > &  aRef  )  const [inline]
 

Equality operator.

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


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