#include <linked_list.hpp>
Public Member Functions | |
T * | get () const |
unsigned | getLength () const |
void | insert (T *node) |
template<typename Predicate > | |
void | insertBefore (T *node, Predicate predicate) |
bool | isEmpty () const |
LinkedListRoot () | |
void | remove (const T *node) |
Private Attributes | |
T * | root_ |
Additional Inherited Members | |
![]() | |
Noncopyable () | |
~Noncopyable () | |
Linked list root.
Definition at line 44 of file linked_list.hpp.
|
inline |
Definition at line 49 of file linked_list.hpp.
|
inline |
Definition at line 53 of file linked_list.hpp.
unsigned uavcan::LinkedListRoot< T >::getLength |
Complexity: O(N)
Definition at line 89 of file linked_list.hpp.
void uavcan::LinkedListRoot< T >::insert | ( | T * | node | ) |
Inserts the node to the beginning of the list. If the node is already present in the list, it will be relocated to the beginning. Complexity: O(N)
Definition at line 102 of file linked_list.hpp.
void uavcan::LinkedListRoot< T >::insertBefore | ( | T * | node, |
Predicate | predicate | ||
) |
Inserts the node immediately before the node X where predicate(X) returns true. If the node is already present in the list, it can be relocated to a new position. Complexity: O(2N) (calls remove())
Definition at line 116 of file linked_list.hpp.
|
inline |
Definition at line 54 of file linked_list.hpp.
void uavcan::LinkedListRoot< T >::remove | ( | const T * | node | ) |
Removes only the first occurence of the node. Complexity: O(N)
Definition at line 148 of file linked_list.hpp.
|
private |
Definition at line 46 of file linked_list.hpp.