CoreLinux++
0.4.32
|
The Iterator provides a way to access the elements of an collection type sequentially without exposing its underlying representation. More...
#include <Iterator.hpp>
Public Member Functions | |
Iterator (void) | |
Default constructor. | |
Iterator (const Iterator &aRef) | |
Copy constructor. More... | |
virtual | ~Iterator (void) |
Destructor. | |
Iterator & | operator= (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. More... | |
virtual void | setPrevious (void)=0 throw (IteratorBoundsException) |
Set iterator to previous element. More... | |
virtual void | setLast (void)=0 throw (IteratorBoundsException) |
Set iterator to last element. More... | |
![]() | |
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... | |
The Iterator provides a way to access the elements of an collection type sequentially without exposing its underlying representation.
The implementation requires a template argument that describes the ElementType being iterated over.
|
inline |
Copy constructor.
Iterator | const reference |
|
pure virtual |
getElement returns the ElementType instance that is currently pointed to by the Iterator
IteratorBoundsException | if the Iterator is not positioned correctley. |
Implemented in corelinux::CoreLinuxAssociativeIterator< TraverseType, KeyType, ElementType >, and corelinux::CoreLinuxIterator< TraverseType, ElementType >.
Referenced by corelinux::Subject::notifyAllObservers(), corelinux::Subject::notifyObservers(), corelinux::Mediator::operator==(), and corelinux::Iterator< ElementType >::operator==().
|
pure virtual |
isValid abstract interface for implementation to determine if the current position points to a valid EntityType instance
Implemented in corelinux::CoreLinuxAssociativeIterator< TraverseType, KeyType, ElementType >, and corelinux::CoreLinuxIterator< TraverseType, ElementType >.
Referenced by corelinux::Subject::notifyAllObservers(), corelinux::Subject::notifyObservers(), corelinux::Mediator::operator==(), and corelinux::Iterator< ElementType >::operator==().
|
inline |
|
inline |
Equality operator.
Iterator | const reference |
References corelinux::Iterator< ElementType >::getElement(), corelinux::Iterator< ElementType >::isValid(), corelinux::Iterator< ElementType >::setFirst(), corelinux::Iterator< ElementType >::setLast(), corelinux::Iterator< ElementType >::setNext(), and corelinux::Iterator< ElementType >::setPrevious().
|
pure virtual |
Set iterator to last element.
IteratorBoundsException | if it is the iterator is over an empty collection |
Implemented in corelinux::CoreLinuxAssociativeIterator< TraverseType, KeyType, ElementType >, and corelinux::CoreLinuxIterator< TraverseType, ElementType >.
Referenced by corelinux::Iterator< ElementType >::operator==().
|
pure virtual |
Set iterator to next element.
IteratorBoundsException | if attempt to position past end of elements |
Implemented in corelinux::CoreLinuxAssociativeIterator< TraverseType, KeyType, ElementType >, and corelinux::CoreLinuxIterator< TraverseType, ElementType >.
Referenced by corelinux::Subject::notifyAllObservers(), corelinux::Subject::notifyObservers(), corelinux::Mediator::operator==(), and corelinux::Iterator< ElementType >::operator==().
|
pure virtual |
Set iterator to previous element.
IteratorBoundsException | if attempt to position before begining of elements |
Implemented in corelinux::CoreLinuxAssociativeIterator< TraverseType, KeyType, ElementType >, and corelinux::CoreLinuxIterator< TraverseType, ElementType >.
Referenced by corelinux::Iterator< ElementType >::operator==().