Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: UAVCAN UAVCAN_Subscriber
LinkedListRoot< T > Class Template Reference
Linked list root. More...
#include <linked_list.hpp>
Inherits uavcan::Noncopyable.
Public Member Functions | |
| unsigned | getLength () const |
| Complexity: O(N) | |
| void | insert (T *node) |
| Inserts the node to the beginning of the list. | |
| template<typename Predicate > | |
| void | insertBefore (T *node, Predicate predicate) |
| Inserts the node immediately before the node X where predicate(X) returns true. | |
| void | remove (const T *node) |
| Removes only the first occurence of the node. | |
Detailed Description
template<typename T>
class uavcan::LinkedListRoot< T >
Linked list root.
Definition at line 44 of file linked_list.hpp.
Member Function Documentation
| unsigned getLength | ( | ) | const |
Complexity: O(N)
Definition at line 89 of file linked_list.hpp.
| void 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 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.
| void remove | ( | const T * | node ) |
Removes only the first occurence of the node.
Complexity: O(N)
Definition at line 148 of file linked_list.hpp.
Generated on Tue Jul 12 2022 17:17:37 by
1.7.2