20 #ifndef KERNEL_UTILITIES_ITERATOR_H 21 #define KERNEL_UTILITIES_ITERATOR_H 23 #include "pedigree/kernel/utilities/cpp.h" 24 #include "pedigree/kernel/utilities/template.h" 40 typename originalT,
class Struct,
41 Struct *(Struct::*FunctionPrev)() = &Struct::previous,
42 Struct *(Struct::*FunctionNext)() = &Struct::next,
typename T = originalT>
48 typename _originalT,
class _Struct,
49 _Struct *(_Struct::*_FunctionPrev)(),
50 _Struct *(_Struct::*_FunctionNext)(),
typename _T>
55 typename _originalT,
class _Struct,
56 _Struct *(_Struct::*_FunctionPrev)(),
57 _Struct *(_Struct::*_FunctionNext)(),
typename _T1,
typename _T2>
85 template <
typename T2>
121 Struct *newNode = (
m_Node->*FunctionPrev)();
176 typename originalT,
class Struct,
177 Struct *(Struct::*FunctionPrev)() = &Struct::previous,
178 Struct *(Struct::*FunctionNext)() = &Struct::next,
typename K = originalT,
179 typename T = originalT>
185 typename _originalT,
class _Struct,
186 _Struct *(_Struct::*_FunctionPrev)(),
187 _Struct *(_Struct::*_FunctionNext)(),
typename _K,
typename _T>
192 typename _originalT,
class _Struct,
193 _Struct *(_Struct::*_FunctionPrev)(),
194 _Struct *(_Struct::*_FunctionNext)(),
typename _K1,
typename _T1,
195 typename _K2,
typename _T2>
198 _originalT, _Struct, _FunctionPrev, _FunctionNext, _K1, _T1> &x1,
200 _originalT, _Struct, _FunctionPrev, _FunctionNext, _K2, _T2> &x2);
205 originalT, Struct, FunctionPrev, FunctionNext, K, T
const>
212 originalT, Struct, FunctionNext, FunctionPrev, K, T
const>
226 template <
typename K2,
typename T2>
228 originalT, Struct, FunctionPrev, FunctionNext, K2, T2> &x)
289 return m_Node->value->key;
299 return m_Node->value->element;
304 const T &value(
const T &failed=T())
const 309 return m_Node->value->element;
324 typename originalT,
class Struct, Struct *(Struct::*FunctionPrev)(),
325 Struct *(Struct::*FunctionNext)(),
typename T1,
typename T2>
340 typename originalT,
class Struct, Struct *(Struct::*FunctionPrev)(),
341 Struct *(Struct::*FunctionNext)(),
typename K1,
typename T1,
typename K2,
353 else if (x1.
m_Node->value)
TreeIterator(Struct *Node)
TreeIterator< originalT, Struct, FunctionNext, FunctionPrev, K, T > Reverse
Iterator & operator=(const Iterator &x)
TreeIterator & operator++()
TreeIterator & operator--()
TreeIterator< originalT, Struct, FunctionPrev, FunctionNext, K, T const > Const
TreeIterator(const TreeIterator &x)
TreeIterator< originalT, Struct, FunctionNext, FunctionPrev, K, T const > ConstReverse
friend bool operator==(const Iterator< _originalT, _Struct, _FunctionPrev, _FunctionNext, _T1 > &x1, const Iterator< _originalT, _Struct, _FunctionPrev, _FunctionNext, _T2 > &x2)
TreeIterator(const TreeIterator< originalT, Struct, FunctionPrev, FunctionNext, K2, T2 > &x)
Iterator(const Iterator &x)
Iterator< originalT, Struct, FunctionPrev, FunctionNext, T const > Const
An iterator applicable for many data structures.
Iterator(const Iterator< originalT, Struct, FunctionPrev, FunctionNext, T2 > &x)
An iterator applicable for many data structures.
TreeIterator & operator=(const TreeIterator &x)
Iterator< originalT, Struct, FunctionNext, FunctionPrev, T > Reverse
Iterator< originalT, Struct, FunctionNext, FunctionPrev, T const > ConstReverse