The Pedigree Project 0.1
Public Types | Public Member Functions | Private Types | Private Attributes | List of all members
List< T, nodePoolSize > Class Template Reference
+ Inheritance diagram for List< T, nodePoolSize >:
+ Collaboration diagram for List< T, nodePoolSize >:

Public Types

typedef ::Iterator< T, node_t > Iterator
 
typedef Iterator::Const ConstIterator
 
typedef Iterator::Reverse ReverseIterator
 
typedef Iterator::ConstReverse ConstReverseIterator
 

Public Member Functions

 List ()
 
 List (const List &x)
 
 ~List ()
 
List & operator= (const List &x)
 
size_t size () const
 
size_t count () const
 
void pushBack (const T &value)
 
void pushBack (T &&value)
 
bool tryPushBack (const T &value)
 
bool tryPushBack (T &&value)
 
T popBack ()
 
void pushFront (const T &value)
 
void pushFront (T &&value)
 
T popFront ()
 
Iterator erase (Iterator &Iter)
 
ReverseIterator erase (ReverseIterator &Iter)
 
Iterator begin ()
 
ConstIterator begin () const
 
Iterator end ()
 
ConstIterator end () const
 
ReverseIterator rbegin ()
 
ConstReverseIterator rbegin () const
 
ReverseIterator rend ()
 
ConstReverseIterator rend () const
 
void clear ()
 
void assign (const List &x)
 

Private Types

typedef _ListNode_t< T > node_t
 

Private Attributes

size_t m_Count
 
node_t * m_First
 
node_t * m_Last
 
uint32_t m_Magic
 
ObjectPool< node_t, nodePoolSize > m_NodePool
 

Detailed Description

template<class T, size_t nodePoolSize = 16>
class List< T, nodePoolSize >

Definition at line 61 of file List.h.

Member Typedef Documentation

◆ ConstIterator

template<class T , size_t nodePoolSize = 16>
typedef Iterator::Const List< T, nodePoolSize >::ConstIterator

Type of the constant bidirectional iterator

Definition at line 69 of file List.h.

◆ ConstReverseIterator

template<class T , size_t nodePoolSize = 16>
typedef Iterator::ConstReverse List< T, nodePoolSize >::ConstReverseIterator

Type of the constant reverse iterator

Definition at line 73 of file List.h.

◆ Iterator

template<class T , size_t nodePoolSize = 16>
typedef ::Iterator<T, node_t> List< T, nodePoolSize >::Iterator

Type of the bidirectional iterator

Definition at line 67 of file List.h.

◆ node_t

template<class T , size_t nodePoolSize = 16>
typedef _ListNode_t<T> List< T, nodePoolSize >::node_t
private

The data structure of the list's nodes

Definition at line 63 of file List.h.

◆ ReverseIterator

template<class T , size_t nodePoolSize = 16>
typedef Iterator::Reverse List< T, nodePoolSize >::ReverseIterator

Type of the reverse iterator

Definition at line 71 of file List.h.

Member Function Documentation

◆ begin() [1/2]

template<class T , size_t nodePoolSize = 16>
Iterator List< T, nodePoolSize >::begin ( )
inline

◆ begin() [2/2]

template<class T , size_t nodePoolSize = 16>
ConstIterator List< T, nodePoolSize >::begin ( ) const
inline

Get a constant iterator pointing to the beginning of the List

Returns
constant iterator pointing to the beginning of the List

Definition at line 127 of file List.h.

◆ end() [1/2]

template<class T , size_t nodePoolSize = 16>
Iterator List< T, nodePoolSize >::end ( )
inline

◆ end() [2/2]

template<class T , size_t nodePoolSize = 16>
ConstIterator List< T, nodePoolSize >::end ( ) const
inline

Get a constant iterator pointing to the end of the List + 1

Returns
constant iterator pointing to the end of the List + 1

Definition at line 137 of file List.h.

◆ rbegin() [1/2]

template<class T , size_t nodePoolSize = 16>
ReverseIterator List< T, nodePoolSize >::rbegin ( )
inline

Get an iterator pointing to the reverse beginning of the List

Returns
iterator pointing to the reverse beginning of the List

Definition at line 142 of file List.h.

◆ rbegin() [2/2]

template<class T , size_t nodePoolSize = 16>
ConstReverseIterator List< T, nodePoolSize >::rbegin ( ) const
inline

Get a constant iterator pointing to the reverse beginning of the List

Returns
constant iterator pointing to the reverse beginning of the List

Definition at line 147 of file List.h.

◆ rend() [1/2]

template<class T , size_t nodePoolSize = 16>
ReverseIterator List< T, nodePoolSize >::rend ( )
inline

Get an iterator pointing to the reverse end of the List + 1

Returns
iterator pointing to the reverse end of the List + 1

Definition at line 152 of file List.h.

◆ rend() [2/2]

template<class T , size_t nodePoolSize = 16>
ConstReverseIterator List< T, nodePoolSize >::rend ( ) const
inline

Get a constant iterator pointing to the reverse end of the List + 1

Returns
constant iterator pointing to the reverse end of the List + 1

Definition at line 157 of file List.h.

Member Data Documentation

◆ m_Count

template<class T , size_t nodePoolSize = 16>
size_t List< T, nodePoolSize >::m_Count
private

The number of Nodes/Elements in the List

Definition at line 169 of file List.h.

◆ m_First

template<class T , size_t nodePoolSize = 16>
node_t* List< T, nodePoolSize >::m_First
private

Pointer to the first Node in the List

Definition at line 171 of file List.h.

◆ m_Last

template<class T , size_t nodePoolSize = 16>
node_t* List< T, nodePoolSize >::m_Last
private

Pointer to the last Node in the List

Definition at line 173 of file List.h.

◆ m_Magic

template<class T , size_t nodePoolSize = 16>
uint32_t List< T, nodePoolSize >::m_Magic
private

Definition at line 175 of file List.h.

◆ m_NodePool

template<class T , size_t nodePoolSize = 16>
ObjectPool<node_t, nodePoolSize> List< T, nodePoolSize >::m_NodePool
private

Pool of node objects (to reduce impact of lots of node allocs/deallocs).

Definition at line 179 of file List.h.


The documentation for this class was generated from the following file: