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

corelinux::CoreLinuxIterator 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::

corelinux::Iterator corelinux::CoreLinuxObject List of all members.

Public Methods

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

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

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

virtual ~CoreLinuxIterator (void)
 Destructor.

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

bool operator== (const CoreLinuxIterator &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 CoreLinuxIterator. More...

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

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

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

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 void    throw (InvalidIteratorException) [inline]
 

Default constructor.

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

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.

Reimplemented from corelinux::Iterator.

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

Reimplemented from corelinux::Iterator.

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.

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

Set iterator to next element.

Exceptions:
IteratorBoundsException  if attempt to position past end of elements

Reimplemented from corelinux::Iterator.

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

Set iterator 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