biu::VirtualList< T >::Iterator Class Reference
#include <VirtualList.hh>
Detailed Description
template<class T>
class biu::VirtualList< T >::Iterator
the iterator for traversing a listthe iterator can be used in an STL-ish way: e.g. for(Iterator it=list->begin(); list->end()!=it; ++it) {...*it...}
since the iterator holds a pointer to its associated list and uses virtual methods of VirtualList<T>, it behaves "polymorph" due to the polymorphism of its associated list
Definition at line 74 of file VirtualList.hh.
Public Member Functions | |
Iterator (const Iterator &it) | |
const T & | operator * () const |
bool | operator!= (const Iterator &it) const |
const Iterator & | operator++ () |
const T * | operator-> () const |
Iterator & | operator= (const Iterator &it) |
virtual | ~Iterator () |
Data Fields | |
T * | elem |
ItState * | itstate |
const VirtualList< T > * | parent |
Private Member Functions | |
Iterator (const VirtualList< T > *parent_, ItState *itstate_, T *elem_) | |
Friends | |
class | VirtualList< T > |
Constructor & Destructor Documentation
biu::VirtualList< T >::Iterator::Iterator | ( | const VirtualList< T > * | parent_, | |
ItState * | itstate_, | |||
T * | elem_ | |||
) | [inline, private] |
Constructor that is used in begin() and end()
Since only VirtualList<T> should use this, this constructor is private
Definition at line 84 of file VirtualList.hh.
biu::VirtualList< T >::Iterator::Iterator | ( | const Iterator & | it | ) | [inline] |
copying iterators. Since element and iterator state are cloned we get an independent iterator
Definition at line 92 of file VirtualList.hh.
biu::VirtualList< T >::Iterator::~Iterator | ( | ) | [virtual] |
Definition at line 188 of file VirtualList.hh.
Member Function Documentation
const T& biu::VirtualList< T >::Iterator::operator * | ( | ) | const [inline] |
bool biu::VirtualList< T >::Iterator::operator!= | ( | const Iterator & | it | ) | const [inline] |
compare iterators, only two end-iterators are equal this behavior allows for loop-termination, but differs from the standard behavior of STL-iterators
Definition at line 111 of file VirtualList.hh.
const Iterator& biu::VirtualList< T >::Iterator::operator++ | ( | ) | [inline] |
const T* biu::VirtualList< T >::Iterator::operator-> | ( | ) | const [inline] |
Iterator& biu::VirtualList< T >::Iterator::operator= | ( | const Iterator & | it | ) | [inline] |
assigning iterators. Since element and iterator state are cloned we get an independent iterator
Definition at line 117 of file VirtualList.hh.
Friends And Related Function Documentation
friend class VirtualList< T > [friend] |
Definition at line 75 of file VirtualList.hh.
Field Documentation
T* biu::VirtualList< T >::Iterator::elem |
ItState* biu::VirtualList< T >::Iterator::itstate |
const VirtualList<T>* biu::VirtualList< T >::Iterator::parent |
The documentation for this class was generated from the following file:
- src/biu/VirtualList.hh