CoreLinux++  0.4.32
Public Member Functions | Protected Attributes | List of all members
corelinux::CoreLinuxAssociativeIterator< TraverseType, KeyType, ElementType > Class Template 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>

Public Member Functions

 throw (InvalidIteratorException)
 Default constructor

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

 
 CoreLinuxAssociativeIterator (TraverseType aBegin, TraverseType aEnd)
 Initializing constructor. More...
 
 CoreLinuxAssociativeIterator (const CoreLinuxAssociativeIterator &aRef)
 Copy constructor. More...
 
virtual ~CoreLinuxAssociativeIterator (void)
 Destructor.
 
CoreLinuxAssociativeIteratoroperator= (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

Exceptions
IteratorBoundsExceptionif attempt to position past end of elements.

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

Exceptions
IteratorBoundsExceptionif attempt to position before begining of elements.

 
virtual void setLast (void) throw (IteratorBoundsException)
 Set AssociativeIterator to last element.
 
- Public Member Functions inherited from corelinux::AssociativeIterator< KeyType, ElementType >
 AssociativeIterator (void)
 Default constructor.
 
 AssociativeIterator (const AssociativeIterator &aRef)
 Copy constructor. More...
 
virtual ~AssociativeIterator (void)
 Destructor.
 
AssociativeIteratoroperator= (const AssociativeIterator &)
 Assignment operator. More...
 
bool operator== (const AssociativeIterator &aRef) const
 Equality operator. More...
 
- 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 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 ( TraverseType  aBegin,
TraverseType  aEnd 
)
inline

Initializing constructor.

Parameters
TraverseTypeaBegin first position
TraverseTypeaEnd 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
CoreLinuxAssociativeIteratorconst reference

Member Function Documentation

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

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

Returns
ElementType
Exceptions
IteratorBoundsExceptionif the AssociativeIterator is not positioned correctley.

Implements corelinux::Iterator< ElementType >.

References corelinux::CoreLinuxAssociativeIterator< TraverseType, KeyType, ElementType >::isValid().

template<class TraverseType , class KeyType , class ElementType >
virtual KeyType corelinux::CoreLinuxAssociativeIterator< TraverseType, KeyType, ElementType >::getKey ( void  ) const
throw (IteratorBoundsException
)
inlinevirtual

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

Returns
KeyType
Exceptions
IteratorBoundsExceptionif the AssociativeIterator is not positioned correctly.

Implements corelinux::AssociativeIterator< KeyType, ElementType >.

References corelinux::CoreLinuxAssociativeIterator< TraverseType, KeyType, ElementType >::isValid().

template<class TraverseType , class KeyType , class ElementType >
virtual bool corelinux::CoreLinuxAssociativeIterator< TraverseType, KeyType, ElementType >::isValid ( void  ) const
inlinevirtual
template<class TraverseType , class KeyType , class ElementType >
CoreLinuxAssociativeIterator& corelinux::CoreLinuxAssociativeIterator< TraverseType, KeyType, ElementType >::operator= ( const CoreLinuxAssociativeIterator< TraverseType, KeyType, ElementType > &  aRef)
inline
template<class TraverseType , class KeyType , class ElementType >
bool corelinux::CoreLinuxAssociativeIterator< TraverseType, KeyType, ElementType >::operator== ( const CoreLinuxAssociativeIterator< TraverseType, KeyType, ElementType > &  aRef) const
inline

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

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