Loading...
Searching...
No Matches
Dune::SLList< T, A > Class Template Reference
Common

A single linked list. More...

`#include <dune/common/sllist.hh>`

Inheritance diagram for Dune::SLList< T, A >:

## Public Types

typedef A::size_type | size_type
| The size type.
typedef T | MemberType
| The type we store.
using | Allocator = typename std::allocator_traits<A>::template rebind_alloc<Element>
| The allocator to use.
typedef SLListIterator< T, A > | iterator
| The mutable iterator of the list.
typedef SLListConstIterator< T, A > | const_iterator
| The constant 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.
bool | operator== (const SLList &sl) const
bool | operator!= (const SLList &sl) const

## Friends

class | SLListIterator< T, A >
class | SLListConstIterator< T, A >

## 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.

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

- sllist.hh