CoreLinux++  0.4.32
Public Member Functions | Protected Attributes | List of all members
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>

Public Member Functions

 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.
 
CoreLinuxIteratoroperator= (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.
 
- Public Member Functions inherited from corelinux::Iterator< ElementType >
 Iterator (void)
 Default constructor.
 
 Iterator (const Iterator &aRef)
 Copy constructor. More...
 
virtual ~Iterator (void)
 Destructor.
 
Iteratoroperator= (const Iterator &)
 Assignment operator. More...
 
bool operator== (const Iterator &aRef) const
 Equality operator. More...
 
- Public Member Functions inherited from corelinux::CoreLinuxObject
 CoreLinuxObject (void)
 Default Constructor.
 
 CoreLinuxObject (CoreLinuxObjectCref)
 Copy Constructor. More...
 
virtual ~CoreLinuxObject (void)
 Virtual Destructor.
 
CoreLinuxObjectRef operator= (CoreLinuxObjectCref)
 Assignment operator overload. More...
 
bool operator== (CoreLinuxObjectCref) const
 Equality operator overload. More...
 
bool operator!= (CoreLinuxObjectCref) const
 Non-equality operator overload. More...
 

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

§ CoreLinuxIterator() [1/3]

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

§ CoreLinuxIterator() [2/3]

template<class TraverseType , class ElementType >
corelinux::CoreLinuxIterator< TraverseType, ElementType >::CoreLinuxIterator ( TraverseType  aBegin,
TraverseType  aEnd 
)
inline

Initializing constructor.

Parameters
TraverseTypeaBegin first position
TraverseTypeaEnd last position

§ CoreLinuxIterator() [3/3]

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

Copy constructor.

Parameters
CoreLinuxIteratorconst reference

Member Function Documentation

§ getElement()

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

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

Returns
ElementType
Exceptions
IteratorBoundsExceptionif the Iterator is not positioned correctley.

Implements corelinux::Iterator< ElementType >.

References corelinux::CoreLinuxIterator< TraverseType, ElementType >::isValid(), and corelinux::CoreLinuxIterator< TraverseType, ElementType >::theCurrent.

§ isValid()

template<class TraverseType , class ElementType >
virtual bool corelinux::CoreLinuxIterator< TraverseType, ElementType >::isValid ( void  ) const
inlinevirtual

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 >.

References corelinux::CoreLinuxIterator< TraverseType, ElementType >::theCurrent, and corelinux::CoreLinuxIterator< TraverseType, ElementType >::theEnd.

Referenced by corelinux::CoreLinuxIterator< TraverseType, ElementType >::getElement().

§ operator=()

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

§ operator==()

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

Equality operator.

Parameters
CoreLinuxIteratorconst reference
Returns
bool - true if the respective positions are equal.

References corelinux::CoreLinuxIterator< TraverseType, ElementType >::theBegin, and corelinux::CoreLinuxIterator< TraverseType, ElementType >::theEnd.

§ setNext()

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

§ setPrevious()

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

The documentation for this class was generated from the following file:

This is the CoreLinux++ reference manual
Provided by The CoreLinux Consortium