ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

Simple double linked list, modeled after the list template of the standard C++ library. More...

#include <list.h>

Collaboration diagram for Common::List< t_T >:

List of all members.

Public Types

typedef ListInternal::Iterator
< t_T > 
iterator
typedef
ListInternal::ConstIterator
< t_T > 
const_iterator
typedef t_T value_type
typedef uint size_type

Public Member Functions

 List ()
 List (const List< t_T > &list)
 ~List ()
void insert (iterator pos, const t_T &element)
 Inserts element before pos.
template<typename iterator2 >
void insert (iterator pos, iterator2 first, iterator2 last)
 Inserts the elements from first to last before pos.
iterator erase (iterator pos)
 Deletes the element at location pos and returns an iterator pointing to the element after the one which was deleted.
iterator reverse_erase (iterator pos)
 Deletes the element at location pos and returns an iterator pointing to the element before the one which was deleted.
iterator erase (iterator first, iterator last)
 Deletes the elements between first and last (including first but not last) and returns an iterator pointing to the element after the one which was deleted (i.e., last).
void remove (const t_T &val)
 Removes all elements that are equal to val from the list.
void push_front (const t_T &element)
 Inserts element at the start of the list.
void push_back (const t_T &element)
 Appends element to the end of the list.
void pop_front ()
 Removes the first element of the list.
void pop_back ()
 Removes the last element of the list.
t_T & front ()
 Returns a reference to the first element of the list.
const t_T & front () const
 Returns a reference to the first element of the list.
t_T & back ()
 Returns a reference to the last element of the list.
const t_T & back () const
 Returns a reference to the last element of the list.
List< t_T > & operator= (const List< t_T > &list)
size_type size () const
void clear ()
bool empty () const
iterator begin ()
iterator reverse_begin ()
iterator end ()
const_iterator begin () const
const_iterator reverse_begin () const
const_iterator end () const

Protected Types

typedef ListInternal::NodeBase NodeBase
typedef ListInternal::Node< t_T > Node

Protected Member Functions

NodeBase erase (NodeBase *pos)
void insert (NodeBase *pos, const t_T &element)
 Inserts element before pos.

Protected Attributes

NodeBase _anchor

Detailed Description

template<typename t_T>
class Common::List< t_T >

Simple double linked list, modeled after the list template of the standard C++ library.

Definition at line 35 of file common/list.h.


Member Typedef Documentation

template<typename t_T>
typedef ListInternal::ConstIterator<t_T> Common::List< t_T >::const_iterator

Definition at line 44 of file common/list.h.

template<typename t_T>
typedef ListInternal::Iterator<t_T> Common::List< t_T >::iterator

Definition at line 43 of file common/list.h.

template<typename t_T>
typedef ListInternal::Node<t_T> Common::List< t_T >::Node [protected]

Definition at line 38 of file common/list.h.

template<typename t_T>
typedef ListInternal::NodeBase Common::List< t_T >::NodeBase [protected]

Definition at line 37 of file common/list.h.

template<typename t_T>
typedef uint Common::List< t_T >::size_type

Definition at line 47 of file common/list.h.

template<typename t_T>
typedef t_T Common::List< t_T >::value_type

Definition at line 46 of file common/list.h.


Constructor & Destructor Documentation

template<typename t_T>
Common::List< t_T >::List (  )  [inline]

Definition at line 50 of file common/list.h.

template<typename t_T>
Common::List< t_T >::List ( const List< t_T > &  list  )  [inline]

Definition at line 54 of file common/list.h.

template<typename t_T>
Common::List< t_T >::~List (  )  [inline]

Definition at line 61 of file common/list.h.


Member Function Documentation

template<typename t_T>
t_T& Common::List< t_T >::back (  )  [inline]

Returns a reference to the last element of the list.

Definition at line 157 of file common/list.h.

template<typename t_T>
const t_T& Common::List< t_T >::back (  )  const [inline]

Returns a reference to the last element of the list.

Definition at line 162 of file common/list.h.

template<typename t_T>
iterator Common::List< t_T >::begin (  )  [inline]

Definition at line 210 of file common/list.h.

template<typename t_T>
const_iterator Common::List< t_T >::begin (  )  const [inline]

Definition at line 222 of file common/list.h.

template<typename t_T>
void Common::List< t_T >::clear (  )  [inline]

Definition at line 193 of file common/list.h.

template<typename t_T>
bool Common::List< t_T >::empty (  )  const [inline]

Definition at line 205 of file common/list.h.

template<typename t_T>
iterator Common::List< t_T >::end (  )  [inline]

Definition at line 218 of file common/list.h.

template<typename t_T>
const_iterator Common::List< t_T >::end (  )  const [inline]

Definition at line 230 of file common/list.h.

template<typename t_T>
iterator Common::List< t_T >::erase ( iterator  first,
iterator  last 
) [inline]

Deletes the elements between first and last (including first but not last) and returns an iterator pointing to the element after the one which was deleted (i.e., last).

Definition at line 104 of file common/list.h.

template<typename t_T>
NodeBase Common::List< t_T >::erase ( NodeBase pos  )  [inline, protected]

Definition at line 235 of file common/list.h.

template<typename t_T>
iterator Common::List< t_T >::erase ( iterator  pos  )  [inline]

Deletes the element at location pos and returns an iterator pointing to the element after the one which was deleted.

Definition at line 85 of file common/list.h.

template<typename t_T>
t_T& Common::List< t_T >::front (  )  [inline]

Returns a reference to the first element of the list.

Definition at line 147 of file common/list.h.

template<typename t_T>
const t_T& Common::List< t_T >::front (  )  const [inline]

Returns a reference to the first element of the list.

Definition at line 152 of file common/list.h.

template<typename t_T>
template<typename iterator2 >
void Common::List< t_T >::insert ( iterator  pos,
iterator2  first,
iterator2  last 
) [inline]

Inserts the elements from first to last before pos.

Definition at line 76 of file common/list.h.

template<typename t_T>
void Common::List< t_T >::insert ( NodeBase pos,
const t_T &  element 
) [inline, protected]

Inserts element before pos.

Definition at line 247 of file common/list.h.

template<typename t_T>
void Common::List< t_T >::insert ( iterator  pos,
const t_T &  element 
) [inline]

Inserts element before pos.

Definition at line 68 of file common/list.h.

template<typename t_T>
List<t_T>& Common::List< t_T >::operator= ( const List< t_T > &  list  )  [inline]

Definition at line 166 of file common/list.h.

template<typename t_T>
void Common::List< t_T >::pop_back (  )  [inline]

Removes the last element of the list.

Definition at line 141 of file common/list.h.

template<typename t_T>
void Common::List< t_T >::pop_front (  )  [inline]

Removes the first element of the list.

Definition at line 135 of file common/list.h.

template<typename t_T>
void Common::List< t_T >::push_back ( const t_T &  element  )  [inline]

Appends element to the end of the list.

Definition at line 130 of file common/list.h.

template<typename t_T>
void Common::List< t_T >::push_front ( const t_T &  element  )  [inline]

Inserts element at the start of the list.

Definition at line 125 of file common/list.h.

template<typename t_T>
void Common::List< t_T >::remove ( const t_T &  val  )  [inline]

Removes all elements that are equal to val from the list.

Definition at line 115 of file common/list.h.

template<typename t_T>
iterator Common::List< t_T >::reverse_begin (  )  [inline]

Definition at line 214 of file common/list.h.

template<typename t_T>
const_iterator Common::List< t_T >::reverse_begin (  )  const [inline]

Definition at line 226 of file common/list.h.

template<typename t_T>
iterator Common::List< t_T >::reverse_erase ( iterator  pos  )  [inline]

Deletes the element at location pos and returns an iterator pointing to the element before the one which was deleted.

Definition at line 94 of file common/list.h.

template<typename t_T>
size_type Common::List< t_T >::size (  )  const [inline]

Definition at line 186 of file common/list.h.


Member Data Documentation

template<typename t_T>
NodeBase Common::List< t_T >::_anchor [protected]

Definition at line 40 of file common/list.h.


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


Generated on Sat Mar 23 2019 05:07:07 for ResidualVM by doxygen 1.7.1
curved edge   curved edge