Public Member Functions | |
OFIterator () | |
default constructor. | |
OFIterator (const OFIterator< T > &x) | |
copy constructor | |
OFIterator< T > & | operator= (const OFIterator< T > &x) |
copy assignment operator | |
OFBool | operator== (const OFIterator< T > &x) const |
comparison of two iterators. | |
OFBool | operator!= (const OFIterator< T > &x) const |
comparison of two iterators. | |
T & | operator * () const |
dereferences the iterator. | |
T * | operator-> () const |
dereferences the iterator. | |
OFIterator< T > & | operator++ () |
moves the iterator to the next element of the list. | |
OFIterator< T > | operator++ (int) |
moves the iterator to the next element of the list. | |
OFIterator< T > & | operator-- () |
moves the iterator to the previous element of the list. | |
OFIterator< T > | operator-- (int) |
moves the iterator to the previous element of the list. | |
Protected Member Functions | |
OFIterator (OFListLinkBase *x) | |
constructor. | |
Protected Attributes | |
OFListLinkBase * | node |
list node referenced by the iterator | |
Friends | |
class | OFList< T > |
An iterator is a generalization of a pointer and allows a C++ program to work with different containers independently from their internal structure. Instances of this template class should be declared as OFListIterator(T) instead of OFListIterator<T>. This allows to re-map OFList to the STL list class if available.
Definition at line 171 of file oflist.h.
OFIterator< T >::OFIterator | ( | OFListLinkBase * | x | ) | [inline, protected] |
OFIterator< T >::OFIterator | ( | ) | [inline] |
OFBool OFIterator< T >::operator== | ( | const OFIterator< T > & | x | ) | const [inline] |
comparison of two iterators.
The iterators are equal if and only if they reference the same element, independent from the element values.
x | iterator to be compared |
Definition at line 208 of file oflist.h.
References OFIterator< T >::node.
OFBool OFIterator< T >::operator!= | ( | const OFIterator< T > & | x | ) | const [inline] |
comparison of two iterators.
The iterators are equal if and only if they reference the same element, independent from the element values.
x | iterator to be compared |
Definition at line 215 of file oflist.h.
References OFIterator< T >::node.
T& OFIterator< T >::operator * | ( | ) | const [inline] |
dereferences the iterator.
May only be called if iterator references a valid element of a list.
Definition at line 221 of file oflist.h.
References OFListLinkBase::dummy, and OFIterator< T >::node.
T* OFIterator< T >::operator-> | ( | ) | const [inline] |
OFIterator<T>& OFIterator< T >::operator++ | ( | ) | [inline] |
moves the iterator to the next element of the list.
The list is circular: the first element follows after the end of the list. May only be called if iterator references a valid element or the end of a list.
Definition at line 241 of file oflist.h.
References OFListLinkBase::next, and OFIterator< T >::node.
OFIterator<T> OFIterator< T >::operator++ | ( | int | ) | [inline] |
moves the iterator to the next element of the list.
The list is circular: the first element follows after the end of the list. May only be called if iterator references a valid element or the end of a list. This is the post-increment operator.
Definition at line 253 of file oflist.h.
References OFListLinkBase::next, and OFIterator< T >::node.
OFIterator<T>& OFIterator< T >::operator-- | ( | ) | [inline] |
moves the iterator to the previous element of the list.
The list is circular: the end of the list follows before the first element. May only be called if iterator references a valid element or the end of a list.
Definition at line 265 of file oflist.h.
References OFIterator< T >::node, and OFListLinkBase::prev.
OFIterator<T> OFIterator< T >::operator-- | ( | int | ) | [inline] |
moves the iterator to the previous element of the list.
The list is circular: the end of the list follows before the first element. May only be called if iterator references a valid element or the end of a list. This is the post-decremented operator.
Definition at line 277 of file oflist.h.
References OFIterator< T >::node, and OFListLinkBase::prev.