Dune Core Modules (2.4.1)

Dune::SLList< T, A > Class Template Reference

A single linked list. More...

#include <dune/common/sllist.hh>

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 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. More...
 
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. 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.
 
void clear ()
 Remove all elements from the list.
 
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.
 

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:
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Dec 22, 23:30, 2024)