Public Member Functions | Private Attributes | List of all members
uavcan::LinkedListRoot< T > Class Template Reference

#include <linked_list.hpp>

Inheritance diagram for uavcan::LinkedListRoot< T >:
Inheritance graph
[legend]

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

- Private Member Functions inherited from uavcan::Noncopyable
 Noncopyable ()
 
 ~Noncopyable ()
 

Detailed Description

template<typename T>
class uavcan::LinkedListRoot< T >

Linked list root.

Definition at line 44 of file linked_list.hpp.

Constructor & Destructor Documentation

◆ LinkedListRoot()

template<typename T >
uavcan::LinkedListRoot< T >::LinkedListRoot ( )
inline

Definition at line 49 of file linked_list.hpp.

Member Function Documentation

◆ get()

template<typename T >
T* uavcan::LinkedListRoot< T >::get ( ) const
inline

Definition at line 53 of file linked_list.hpp.

◆ getLength()

template<typename T >
unsigned uavcan::LinkedListRoot< T >::getLength

Complexity: O(N)

Definition at line 89 of file linked_list.hpp.

◆ insert()

template<typename T >
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.

◆ insertBefore()

template<typename T >
template<typename Predicate >
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.

◆ isEmpty()

template<typename T >
bool uavcan::LinkedListRoot< T >::isEmpty ( ) const
inline

Definition at line 54 of file linked_list.hpp.

◆ remove()

template<typename T >
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.

Member Data Documentation

◆ root_

template<typename T >
T* uavcan::LinkedListRoot< T >::root_
private

Definition at line 46 of file linked_list.hpp.


The documentation for this class was generated from the following file:


uavcan_communicator
Author(s):
autogenerated on Fri Dec 13 2024 03:10:04