dune-common
2.3.1
|
A single linked list. More...
#include <dune/common/sllist.hh>
Public Types | |
typedef A::size_type | size_type |
The size type. More... | |
typedef T | MemberType |
The type we store. More... | |
typedef A::template rebind< Element >::other | Allocator |
The allocator to use. More... | |
typedef SLListIterator< T, A > | iterator |
The mutable iterator of the list. More... | |
typedef SLListConstIterator< T, A > | const_iterator |
The constant iterator of the list. More... | |
typedef SLListModifyIterator< T, A > | ModifyIterator |
The type of the iterator capable of deletion and insertion. More... | |
Public Member Functions | |
SLList () | |
Constructor. More... | |
template<typename T1 , typename A1 > | |
SLList (const SLList< T1, A1 > &other) | |
Copy constructor with type conversion. More... | |
SLList (const SLList< T, A > &other) | |
Copy constructor. More... | |
~SLList () | |
Destructor. More... | |
SLList< T, A > & | operator= (const SLList< T, A > &other) |
Assignment operator. More... | |
void | push_back (const MemberType &item) |
Add a new entry to the end of the list. More... | |
void | push_front (const MemberType &item) |
Add a new entry to the beginning of the list. More... | |
void | pop_front () |
Remove the first item in the list. More... | |
void | clear () |
Remove all elements from the list. More... | |
iterator | begin () |
Get an iterator pointing to the first element in the list. More... | |
const_iterator | begin () const |
Get an iterator pointing to the first element in the list. More... | |
ModifyIterator | beginModify () |
Get an iterator capable of deleting and inserting elements. More... | |
ModifyIterator | endModify () |
Get an iterator capable of deleting and inserting elements. More... | |
iterator | end () |
Get an iterator pointing to the end of the list. More... | |
const_iterator | end () const |
Get an iterator pointing to the end of the list. More... | |
bool | empty () const |
Check whether the list is empty. More... | |
int | size () const |
Get the number of elements the list contains. More... | |
bool | operator== (const SLList &sl) const |
bool | operator!= (const SLList &sl) const |
Friends | |
class | SLListIterator< T, A > |
class | SLListConstIterator< 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.