#include <list.h>
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 | |
constexpr | List () |
List (const List< t_T > &list) | |
iterator | insert (iterator pos, const t_T &element) |
template<typename iterator2 > | |
void | insert (iterator pos, iterator2 first, iterator2 last) |
iterator | erase (iterator pos) |
iterator | reverse_erase (iterator pos) |
iterator | erase (iterator first, iterator last) |
void | remove (const t_T &val) |
void | push_front (const t_T &element) |
void | push_back (const t_T &element) |
void | pop_front () |
void | pop_back () |
t_T & | front () |
const t_T & | front () const |
t_T & | back () |
const t_T & | back () const |
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) |
Protected Attributes | |
NodeBase | _anchor |
Simple doubly linked list, modeled after the list template of the standard C++ library.
|
protected |
|
protected |
An element of the doubly linked list.
typedef ListInternal::Iterator<t_T> Common::List< t_T >::iterator |
List iterator.
typedef ListInternal::ConstIterator<t_T> Common::List< t_T >::const_iterator |
Const-qualified list iterator.
typedef t_T Common::List< t_T >::value_type |
Value type of the list.
typedef uint Common::List< t_T >::size_type |
Size type of the list.
|
inline |
Construct a new empty list.
|
inline |
< Construct a new list as a copy of the given list
.
|
inline |
Insert an element
before pos
.
|
inline |
Insert elements from first
to last
before pos
.
|
inline |
Delete the element at location pos
and return an iterator pointing to the element after the one that was deleted.
|
inline |
Delete the element at location pos
and return an iterator pointing to the element before the one that was deleted.
|
inline |
Delete the elements between first
and last
(including first
but not last
). Return an iterator pointing to the element after the one that was deleted (that is, last
).
|
inline |
Remove all elements that are equal to val
from the list.
|
inline |
Insert an element
at the start of the list.
|
inline |
Append an element
to the end of the list.
|
inline |
Remove the first element of the list.
|
inline |
Remove the last element of the list.
|
inline |
Return a reference to the first element of the list.
|
inline |
Return a reference to the first element of the list.
|
inline |
Return a reference to the last element of the list.
|
inline |
Return a reference to the last element of the list.
|
inline |
Assign a given list
to this list.
|
inline |
Return the size of the list.
|
inline |
Remove all elements from the list.
|
inline |
Check whether the list is empty.
|
inline |
Return an iterator to the start of the list. This can be used, for example, to iterate from the first element of the list to the last element of the list.
|
inline |
Return a reverse iterator to the start of the list. This can be used, for example, to iterate from the last element of the list to the first element of the list.
|
inline |
Return an iterator to the end of the list.
|
inline |
Return a const iterator to the start of the list. This can be used, for example, to iterate from the first element of the list to the last element of the list.
|
inline |
Return a const reverse iterator to the start of the list. This can be used, for example, to iterate from the last element of the list to the first element of the list.
|
inline |
Return a const iterator to the end of the list.
|
inlineprotected |
Erase an element at pos
.
|
inlineprotected |
Insert an element
before pos
.
|
protected |
Pointer to the position of the element in the list.