#include <rtiterator.h>
Inheritance diagram for lrt::IIteratorImpl:

Public Methods | |
| virtual | ~IIteratorImpl () |
| Destroys the iterator implementation. | |
| virtual void | goToNext ()=0 |
| Move the iterator to the next element. More... | |
| virtual void | goToPrev ()=0 |
| Move the iterator to the previous element. More... | |
| virtual bool | equals (const IIteratorImpl< T > *) const=0 |
| Check if this iterator implementation is at the same position of the same collection as the given one. More... | |
| virtual bool | hasElement () const=0 |
| Return true if the current iterator position denotes a valid element. | |
| virtual bool | hasNext () const=0 |
Return true iff goToNext(); hasElement(); would return true. | |
| virtual bool | hasPrev () const=0 |
Return true iff goToPrev(); hasElement(); would return true. | |
| virtual T & | get ()=0 |
| Return a modifyable reference to the element at the current iterator position, or any nonsense element if the current position is invalid. | |
| virtual const T & | get () const=0 |
| Return a constant reference to the element at the current iterator position, or any nonsense element if the current position is invalid. | |
| virtual bool | canModify ()=0 |
Return true if the iterator can modify its collection. More... | |
| virtual void | remove ()=0 |
| Remove the element at the current iterator position, and advance to the next element. | |
| virtual IIteratorImpl< T > * | clone () const=0 |
| Return a copy of your concrete iterator implementation, pointing to the same collection element. | |
This interface must be implemented by whatever class serving as a concrete iterator for a collection in libRT.
|
|||||||||
|
Return (e.g. remove elements from it, modify its elements,...) Implemented in lrt::List::IteratorImpl. |
|
||||||||||
|
Check if this iterator implementation is at the same position of the same collection as the given one.
Note: You should first check that the other implementation is of your same class, by using a Implemented in lrt::List::IteratorImpl. |
|
|||||||||
|
Move the iterator to the next element. If there is no next element, the iterator should move to an invalid position. Implemented in lrt::List::IteratorImpl. |
|
|||||||||
|
Move the iterator to the previous element. If there is no previous element, the iterator should move to an invalid position. Implemented in lrt::List::IteratorImpl. |