Singly-linked list.
More...
#include <modm/container/linked_list.hpp>
|
|
using | iterator = DoublyLinkedList< T, Allocator >::iterator |
| |
|
using | Size = std::size_t |
| |
|
using | const_iterator = std::list< T >::const_iterator |
| |
|
|
iterator | remove (const iterator &position) |
| |
|
void | removeAll () |
| |
|
bool | append (const T &value) |
| | Insert at the end of the list.
|
| |
| iterator | begin () |
| |
| const_iterator | begin () const |
| |
| iterator | end () |
| |
| const_iterator | end () const |
| |
| iterator | erase (iterator position) |
| |
|
T & | getBack () |
| |
| const T & | getBack () const |
| |
|
T & | getFront () |
| |
| const T & | getFront () const |
| |
|
std::size_t | getSize () const |
| | Get number of items in the list.
|
| |
| bool | insert (iterator position, const T &value) |
| |
|
bool | isEmpty () const |
| | check if there are any nodes in the list
|
| |
|
bool | prepend (const T &value) |
| | Insert in front.
|
| |
|
void | removeBack () |
| |
|
void | removeFront () |
| | Remove the first entry.
|
| |
template<typename T, typename Allocator = std::allocator<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 = std::allocator<T>>
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 = std::allocator<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 = std::allocator<T>>
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 = std::allocator<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 = std::allocator<T>>
Deletes element pointed to by iterator and returns an iterator to the next element behind the deleted one.
Warning: you must not use the iterator after calling erase()
template<typename T , typename Allocator = std::allocator<T>>
- Returns
- the last node in the list
template<typename T , typename Allocator = std::allocator<T>>
- Returns
- the first node in the list
template<typename T , typename Allocator = std::allocator<T>>
Insert data after position iterator.
This behavior is compatible with modm::LinkedList but different compared to std::list which inserts before the position iterator argument.
The documentation for this class was generated from the following file: