CoreLinux++  0.4.32
Public Member Functions | List of all members
corelinux::AssociativeIterator< KeyType, ElementType > Class Template Referenceabstract

The AssociativeIterator that extends Iterator to include the interface for describing an associative collection type without exposing its underlying representation. More...

#include <AssociativeIterator.hpp>

Public Member Functions

 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...
 
virtual KeyType getKey (void) const =0 throw (IteratorBoundsException)
 getKey returns the KeyType instance that is currently pointed to by the AssociativeIterator 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...
 
virtual bool isValid (void) const =0
 isValid abstract interface for implementation to determine if the current position points to a valid EntityType instance More...
 
virtual ElementType getElement (void) const =0 throw (IteratorBoundsException)
 getElement returns the ElementType instance that is currently pointed to by the Iterator More...
 
virtual void setFirst (void)=0
 Set iterator to first element.
 
virtual void setNext (void)=0 throw (IteratorBoundsException)
 Set iterator to next element

Exceptions
IteratorBoundsExceptionif attempt to position past end of elements.

 
virtual void setPrevious (void)=0 throw (IteratorBoundsException)
 Set iterator to previous element

Exceptions
IteratorBoundsExceptionif attempt to position before begining of elements.

 
virtual void setLast (void)=0 throw (IteratorBoundsException)
 Set iterator to last element

Exceptions
IteratorBoundsExceptionif it is the iterator is over an empty collection.

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

Detailed Description

template<class KeyType, class ElementType>
class corelinux::AssociativeIterator< KeyType, ElementType >

The AssociativeIterator that extends Iterator to include the interface for describing an associative collection type without exposing its underlying representation.

The implementation requires a template arguments that describes the KeyType and ElementType being iterated over.

Constructor & Destructor Documentation

template<class KeyType , class ElementType >
corelinux::AssociativeIterator< KeyType, ElementType >::AssociativeIterator ( const AssociativeIterator< KeyType, ElementType > &  aRef)
inline

Copy constructor.

Parameters
AssociativeIteratorconst reference

Member Function Documentation

template<class KeyType , class ElementType >
virtual KeyType corelinux::AssociativeIterator< KeyType, ElementType >::getKey ( void  ) const
throw (IteratorBoundsException
)
pure virtual

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

Returns
KeyType
Exceptions
IteratorBoundsExceptionif the AssociativeIterator is not positioned correctly.

Implemented in corelinux::CoreLinuxAssociativeIterator< TraverseType, KeyType, ElementType >.

template<class KeyType , class ElementType >
AssociativeIterator& corelinux::AssociativeIterator< KeyType, ElementType >::operator= ( const AssociativeIterator< KeyType, ElementType > &  )
inline

Assignment operator.

Parameters
AssociativeIteratorconst reference
Returns
AssociativeIterator reference
template<class KeyType , class ElementType >
bool corelinux::AssociativeIterator< KeyType, ElementType >::operator== ( const AssociativeIterator< KeyType, ElementType > &  aRef) const
inline

Equality operator.

Parameters
AssociativeIteratorconst reference
Returns
bool - true if instances are equal

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

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