Classes | Public Member Functions | List of all members
List< T, A > Class Template Reference

#include <list.h>

Classes

struct  AuxiliaryComparator
 
class  Element
 

Public Member Functions

_FORCE_INLINE_ const Elementfront () const
 
_FORCE_INLINE_ Elementfront ()
 
_FORCE_INLINE_ const Elementback () const
 
_FORCE_INLINE_ Elementback ()
 
Elementpush_back (const T &value)
 
void pop_back ()
 
Elementpush_front (const T &value)
 
void pop_front ()
 
template<class T_v >
Elementfind (const T_v &p_val)
 
bool erase (const Element *p_I)
 
bool erase (const T &value)
 
_FORCE_INLINE_ bool empty () const
 
void clear ()
 
_FORCE_INLINE_ int size () const
 
void swap (Element *p_A, Element *p_B)
 
void operator= (const List &p_list)
 
T & operator[] (int p_index)
 
const T & operator[] (int p_index) const
 
void move_to_back (Element *p_I)
 
void invert ()
 
void move_to_front (Element *p_I)
 
void move_before (Element *value, Element *where)
 
void sort ()
 
template<class C >
void sort_custom_inplace ()
 
template<class C >
void sort_custom ()
 
 List (const List &p_list)
 

Detailed Description

template<class T, class A = DefaultAllocator>
class List< T, A >

Generic Templatized Linked List Implementation. The implementation differs from the STL one because a compatible preallocated linked list can be written using the same API, or features such as erasing an element from the iterator.

Constructor & Destructor Documentation

template<class T, class A = DefaultAllocator>
List< T, A >::List ( const List< T, A > &  p_list)
inline

copy constructor for the list

Member Function Documentation

template<class T, class A = DefaultAllocator>
_FORCE_INLINE_ const Element* List< T, A >::back ( ) const
inline

return an const iterator to the last member of the list.

template<class T, class A = DefaultAllocator>
_FORCE_INLINE_ Element* List< T, A >::back ( )
inline

return an iterator to the last member of the list.

template<class T, class A = DefaultAllocator>
void List< T, A >::clear ( )
inline

clear the list

template<class T, class A = DefaultAllocator>
_FORCE_INLINE_ bool List< T, A >::empty ( ) const
inline

return wether the list is empty

template<class T, class A = DefaultAllocator>
bool List< T, A >::erase ( const Element p_I)
inline

erase an element in the list, by iterator pointing to it. Return true if it was found/erased.

template<class T, class A = DefaultAllocator>
bool List< T, A >::erase ( const T &  value)
inline

erase the first element in the list, that contains value

template<class T, class A = DefaultAllocator>
template<class T_v >
Element* List< T, A >::find ( const T_v &  p_val)
inline

find an element in the list,

template<class T, class A = DefaultAllocator>
_FORCE_INLINE_ const Element* List< T, A >::front ( ) const
inline

return an const iterator to the begining of the list.

template<class T, class A = DefaultAllocator>
_FORCE_INLINE_ Element* List< T, A >::front ( )
inline

return an iterator to the begining of the list.

template<class T, class A = DefaultAllocator>
void List< T, A >::operator= ( const List< T, A > &  p_list)
inline

copy the list

template<class T, class A = DefaultAllocator>
Element* List< T, A >::push_back ( const T &  value)
inline

store a new element at the end of the list

template<class T, class A = DefaultAllocator>
Element* List< T, A >::push_front ( const T &  value)
inline

store a new element at the begining of the list

template<class T, class A = DefaultAllocator>
void List< T, A >::sort ( )
inline

simple insertion sort


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