Dune::SLList< T, A > Class Template Reference
[Common]
#include <sllist.hh>
Detailed Description
template<typename T, class A = std::allocator<T>>
class Dune::SLList< T, A >
A single linked list.
The list is capable of insertions at the front and at the end and of removing elements at the front. Those operations require constant time.
Public Types | |
typedef A::size_type | size_type |
The size type. | |
typedef T | MemberType |
The type we store. | |
typedef A::template rebind< Element >::other | Allocator |
The allocator to use. | |
typedef SLListIterator< T, A > | iterator |
The mutable iterator of the list. | |
typedef SLListConstIterator< T, A > | const_iterator |
The mutable iterator of the list. | |
typedef SLListModifyIterator< T, A > | ModifyIterator |
The type of the iterator capable of deletion and insertion. | |
Public Member Functions | |
SLList () | |
Constructor. | |
template<typename T1, typename A1> | |
SLList (const SLList< T1, A1 > &other) | |
Copy constructor with type conversion. | |
SLList (const SLList< T, A > &other) | |
Copy constructor. | |
~SLList () | |
Destructor. | |
SLList< T, A > & | operator= (const SLList< T, A > &other) |
Assignment operator. | |
void | push_back (const MemberType &item) |
Add a new entry to the end of the list. | |
void | push_front (const MemberType &item) |
Add a new entry to the beginning of the list. | |
void | pop_front () |
Remove the first item in the list. | |
void | clear () |
Remove all elements from the list. | |
iterator | begin () |
Get an iterator pointing to the first element in the list. | |
const_iterator | begin () const |
Get an iterator pointing to the first element in the list. | |
ModifyIterator | beginModify () |
Get an iterator capable of deleting and inserting elements. | |
ModifyIterator | endModify () |
Get an iterator capable of deleting and inserting elements. | |
iterator | end () |
Get an iterator pointing to the end of the list. | |
const_iterator | end () const |
Get an iterator pointing to the end of the list. | |
bool | empty () const |
Check whether the list is empty. | |
int | size () const |
Get the number of elements the list contains. |
The documentation for this class was generated from the following file: