The Pedigree Project
0.1
|
An iterator applicable for many data structures. More...
#include <Iterator.h>
Public Types | |
typedef Iterator< originalT, Struct, FunctionPrev, FunctionNext, T const > | Const |
typedef Iterator< originalT, Struct, FunctionNext, FunctionPrev, T > | Reverse |
typedef Iterator< originalT, Struct, FunctionNext, FunctionPrev, T const > | ConstReverse |
Public Member Functions | |
Iterator () | |
Iterator (const Iterator &x) | |
template<typename T2 > | |
Iterator (const Iterator< originalT, Struct, FunctionPrev, FunctionNext, T2 > &x) | |
Iterator (Struct *Node) | |
~Iterator () | |
Iterator & | operator= (const Iterator &x) |
Iterator & | operator++ () |
Iterator & | operator-- () |
T & | operator* () |
T & | operator-> () |
operator Const () | |
Struct * | __getNode () |
Protected Attributes | |
Struct * | m_Node |
T | m_Default |
Friends | |
template<typename _originalT , class _Struct , _Struct *(_Struct::*)() _FunctionPrev, _Struct *(_Struct::*)() _FunctionNext, typename _T > | |
class | Iterator |
template<typename _originalT , class _Struct , _Struct *(_Struct::*)() _FunctionPrev, _Struct *(_Struct::*)() _FunctionNext, typename _T1 , typename _T2 > | |
bool | operator== (const Iterator< _originalT, _Struct, _FunctionPrev, _FunctionNext, _T1 > &x1, const Iterator< _originalT, _Struct, _FunctionPrev, _FunctionNext, _T2 > &x2) |
An iterator applicable for many data structures.
General iterator for structures that provide functions for the next and previous structure in the datastructure and a "value" member. This template provides a bidirectional, a constant bidirectional, a reverse bidirectional and a constant reverse bidirectional iterator.
[in] | originalT | the original element type of the iterator |
[in] | Struct | the datastructure that provides functions for the next/previous datastructure and a "value" member |
[in] | previous | pointer to the member function used to iterate forward |
[in] | next | pointer to the member function used to iterate backwards |
[in] | T | the real element type of the iterator |
Definition at line 43 of file Iterator.h.
typedef Iterator<originalT, Struct, FunctionPrev, FunctionNext, T const> Iterator< originalT, Struct, FunctionPrev, FunctionNext, T >::Const |
Type of the constant bidirectional iterator
Definition at line 67 of file Iterator.h.
typedef Iterator<originalT, Struct, FunctionNext, FunctionPrev, T const> Iterator< originalT, Struct, FunctionPrev, FunctionNext, T >::ConstReverse |
Type of the constant reverse iterator
Definition at line 72 of file Iterator.h.
typedef Iterator<originalT, Struct, FunctionNext, FunctionPrev, T> Iterator< originalT, Struct, FunctionPrev, FunctionNext, T >::Reverse |
Type of the reverse iterator
Definition at line 69 of file Iterator.h.
|
inline |
The default constructor constructs an invalid/unusable iterator
Definition at line 75 of file Iterator.h.
|
inline |
The copy-constructor
[in] | Iterator | the reference object |
Definition at line 80 of file Iterator.h.
|
inline |
The constructor
[in] | Iterator | the reference object |
Definition at line 86 of file Iterator.h.
|
inline |
Constructor from a pointer to an instance of the data structure
[in] | Node | pointer to an instance of the data structure |
Definition at line 93 of file Iterator.h.
|
inline |
The destructor does nothing
Definition at line 97 of file Iterator.h.
|
inline |
Get the Node
Definition at line 151 of file Iterator.h.
References Iterator< originalT, Struct, FunctionPrev, FunctionNext, T >::m_Node.
Referenced by List< T, nodePoolSize >::erase(), RadixTree< MemoryBackend::Table * >::erase(), and HashTable< String, Filesystem *, HashedStringView >::erase().
|
inline |
Conversion Operator to a constant iterator
Definition at line 145 of file Iterator.h.
References Iterator< originalT, Struct, FunctionPrev, FunctionNext, T >::m_Node.
|
inline |
Dereference operator yields the element value
Definition at line 128 of file Iterator.h.
References Iterator< originalT, Struct, FunctionPrev, FunctionNext, T >::m_Default, and Iterator< originalT, Struct, FunctionPrev, FunctionNext, T >::m_Node.
|
inline |
Preincrement operator
Definition at line 110 of file Iterator.h.
References Iterator< originalT, Struct, FunctionPrev, FunctionNext, T >::m_Node.
|
inline |
Predecrement operator
Definition at line 117 of file Iterator.h.
References Iterator< originalT, Struct, FunctionPrev, FunctionNext, T >::m_Node.
|
inline |
Dereference operator yields the element value
Definition at line 139 of file Iterator.h.
|
inline |
The assignment operator
[in] | Iterator | the reference object |
Definition at line 103 of file Iterator.h.
References Iterator< originalT, Struct, FunctionPrev, FunctionNext, T >::m_Default, and Iterator< originalT, Struct, FunctionPrev, FunctionNext, T >::m_Node.
|
friend |
All iterators must be friend in order to allow casts between some iterator types
Definition at line 51 of file Iterator.h.
|
friend |
The assignment operator is extern
|
protected |
Default value.
Definition at line 160 of file Iterator.h.
Referenced by Iterator< originalT, Struct, FunctionPrev, FunctionNext, T >::operator*(), and Iterator< originalT, Struct, FunctionPrev, FunctionNext, T >::operator=().
|
protected |
Pointer to the instance of the data structure or 0
Definition at line 158 of file Iterator.h.
Referenced by Iterator< originalT, Struct, FunctionPrev, FunctionNext, T >::__getNode(), TreeIterator< originalT, Struct, FunctionPrev, FunctionNext, K, T >::__getNode(), Iterator< originalT, Struct, FunctionPrev, FunctionNext, T >::operator Const(), TreeIterator< originalT, Struct, FunctionPrev, FunctionNext, K, T >::operator Const(), Iterator< originalT, Struct, FunctionPrev, FunctionNext, T >::operator*(), TreeIterator< originalT, Struct, FunctionPrev, FunctionNext, K, T >::operator*(), Iterator< originalT, Struct, FunctionPrev, FunctionNext, T >::operator++(), TreeIterator< originalT, Struct, FunctionPrev, FunctionNext, K, T >::operator++(), Iterator< originalT, Struct, FunctionPrev, FunctionNext, T >::operator--(), TreeIterator< originalT, Struct, FunctionPrev, FunctionNext, K, T >::operator--(), TreeIterator< originalT, Struct, FunctionPrev, FunctionNext, K, T >::operator->(), Iterator< originalT, Struct, FunctionPrev, FunctionNext, T >::operator=(), TreeIterator< originalT, Struct, FunctionPrev, FunctionNext, K, T >::operator=(), and operator==().