20 #ifndef KERNEL_UTILITIES_LIST_H 21 #define KERNEL_UTILITIES_LIST_H 23 #include "pedigree/kernel/compiler.h" 24 #include "pedigree/kernel/processor/types.h" 25 #include "pedigree/kernel/utilities/Iterator.h" 26 #include "pedigree/kernel/utilities/ObjectPool.h" 27 #include "pedigree/kernel/utilities/assert.h" 28 #include "pedigree/kernel/utilities/utility.h" 63 template <
class T,
size_t nodePoolSize = 16>
98 void pushBack(
const T &
value);
101 void pushBack(T &&
value);
107 void pushFront(
const T &
value);
110 void pushFront(T &&
value);
116 Iterator erase(Iterator &Iter);
119 ReverseIterator erase(ReverseIterator &Iter);
125 return Iterator(m_First);
131 return ConstIterator(m_First);
141 inline ConstIterator
end()
const 143 return ConstIterator(0);
149 return ReverseIterator(m_Last);
153 inline ConstReverseIterator
rbegin()
const 155 return ConstReverseIterator(m_Last);
161 return ReverseIterator(0);
165 inline ConstReverseIterator
rend()
const 167 return ConstReverseIterator(0);
174 void assign(
const List &x);
195 template <
typename T,
size_t nodePoolSize>
197 : m_Count(0), m_First(0), m_Last(0), m_Magic(0x1BADB002), m_NodePool()
201 template <
typename T,
size_t nodePoolSize>
207 template <
typename T,
size_t nodePoolSize>
210 assert(m_Magic == 0x1BADB002);
214 template <
typename T,
size_t nodePoolSize>
221 template <
typename T,
size_t nodePoolSize>
226 template <
typename T,
size_t nodePoolSize>
231 template <
typename T,
size_t nodePoolSize>
237 newNode->
value = value;
247 template <
typename T,
size_t nodePoolSize>
253 newNode->
value = pedigree_std::move(value);
263 template <
typename T,
size_t nodePoolSize>
282 T value = node->
value;
286 template <
typename T,
size_t nodePoolSize>
292 newNode->
value = value;
302 template <
typename T,
size_t nodePoolSize>
308 newNode->
value = pedigree_std::move(value);
318 template <
typename T,
size_t nodePoolSize>
337 T value = node->
value;
341 template <
typename T,
size_t nodePoolSize>
363 template <
typename T,
size_t nodePoolSize>
385 template <
typename T,
size_t nodePoolSize>
389 for (
size_t i = 0; i <
m_Count; i++)
400 template <
typename T,
size_t nodePoolSize>
408 for (; Cur != End; ++Cur)
void pushBack(const T &value)
void assign(const List &x)
Iterator erase(Iterator &Iter)
void pushFront(const T &value)
ConstIterator end() const
ConstIterator begin() const
ObjectPool< node_t, nodePoolSize > m_NodePool
Iterator::Const ConstIterator
ConstReverseIterator rbegin() const
::Iterator< T, node_t > Iterator
Iterator::ConstReverse ConstReverseIterator
ConstReverseIterator rend() const
Iterator::Reverse ReverseIterator
An iterator applicable for many data structures.
List & operator=(const List &x)