Singly-linked list.
More...
#include <modm/container/linked_list.hpp>
|
typedef Allocator::template rebind< Node >::other | NodeAllocator |
|
|
NodeAllocator | nodeAllocator |
|
Node * | front |
|
Node * | back |
|
|
class | const_iterator |
|
class | iterator |
|
template<typename T, typename Allocator = allocator::Dynamic<T>>
class modm::LinkedList< T, Allocator >
Singly-linked list.
- Template Parameters
-
T | Type of list entries |
Allocator | Allocator used for memory allocation. See classes from modm::allocator namespace. |
- Author
- Fabian Greif
template<typename T , typename Allocator = allocator::Dynamic<T>>
iterator modm::LinkedList< T, Allocator >::begin |
( |
| ) |
|
Returns a read/write iterator that points to the first element in the list. Iteration is done in ordinary element order.
template<typename T , typename Allocator = allocator::Dynamic<T>>
Returns a read-only (constant) iterator that points to the first element in the list. Iteration is done in ordinary element order.
template<typename T , typename Allocator = allocator::Dynamic<T>>
iterator modm::LinkedList< T, Allocator >::end |
( |
| ) |
|
Returns a read/write iterator that points one past the last element in the list. Iteration is done in ordinary element order.
template<typename T , typename Allocator = allocator::Dynamic<T>>
Returns a read-only (constant) iterator that points one past the last element in the list. Iteration is done in ordinary element order.
template<typename T , typename Allocator = allocator::Dynamic<T>>
const T& modm::LinkedList< T, Allocator >::getBack |
( |
| ) |
const |
|
inline |
- Returns
- the last node in the list
template<typename T , typename Allocator = allocator::Dynamic<T>>
const T& modm::LinkedList< T, Allocator >::getFront |
( |
| ) |
const |
|
inline |
- Returns
- the first node in the list
template<typename T , typename Allocator = allocator::Dynamic<T>>
std::size_t modm::LinkedList< T, Allocator >::getSize |
( |
| ) |
const |
Get number of elements.
- Warning
- This method is slow because it has to iterate through all elements.
template<typename T , typename Allocator = allocator::Dynamic<T>>
Erase element.
Removes a single element from the list container. This effectively reduces the list size by one, calling the element's destructor before.
The documentation for this class was generated from the following file: