Arene Base
Fundamental Utilities For Safety Critical C++
Loading...
Searching...
No Matches
arene::base::intrusive::binary_tree_node< Tag > Class Template Reference

The tree node of the intrusive container. User type can be derived from this class to support intrusive containers. The parent_ points to itself for the root of a tree an indicator. More...

Public Member Functions

constexpr auto is_linked () const noexcept -> bool
 Check if the element is linked to a container.
 

Friends

constexpr auto get_left_link (binary_tree_node &element, Tag, detail::binary_tree_node_pass_key) noexcept -> binary_tree_node *&
 Getter to the left_ member. pass_key idiom is used to grant access only to the intrusive priority queue.
 
constexpr auto get_parent_link (binary_tree_node &element, Tag, detail::binary_tree_node_pass_key) noexcept -> binary_tree_node *&
 Getter to the parent_ member. pass_key idiom is used to grant access only to the intrusive priority queue.
 
constexpr auto get_right_link (binary_tree_node &element, Tag, detail::binary_tree_node_pass_key) noexcept -> binary_tree_node *&
 Getter to the right_ member. pass_key idiom is used to grant access only to the intrusive priority queue.
 

Detailed Description

template<typename Tag = detail::default_tag>
class arene::base::intrusive::binary_tree_node< Tag >

The tree node of the intrusive container. User type can be derived from this class to support intrusive containers. The parent_ points to itself for the root of a tree an indicator.

Template Parameters
TagThe tag of the element. Used to support adding the same element to multiple intrusive containers.

Member Function Documentation

◆ is_linked()

template<typename Tag = detail::default_tag>
auto arene::base::intrusive::binary_tree_node< Tag >::is_linked ( ) const -> bool
inlineconstexprnoexcept

Check if the element is linked to a container.

Returns
true if the element is linked to a container, false

Friends And Related Symbol Documentation

◆ get_left_link

template<typename Tag = detail::default_tag>
auto get_left_link ( binary_tree_node< Tag > & element,
Tag ,
detail::binary_tree_node_pass_key  ) -> binary_tree_node*&
friend

Getter to the left_ member. pass_key idiom is used to grant access only to the intrusive priority queue.

Parameters
elementThe element to get the left_ member from
Returns
Reference to the left_ member

◆ get_parent_link

template<typename Tag = detail::default_tag>
auto get_parent_link ( binary_tree_node< Tag > & element,
Tag ,
detail::binary_tree_node_pass_key  ) -> binary_tree_node*&
friend

Getter to the parent_ member. pass_key idiom is used to grant access only to the intrusive priority queue.

Parameters
elementThe element to get the parent_ member from
Returns
Reference to the parent_ member

◆ get_right_link

template<typename Tag = detail::default_tag>
auto get_right_link ( binary_tree_node< Tag > & element,
Tag ,
detail::binary_tree_node_pass_key  ) -> binary_tree_node*&
friend

Getter to the right_ member. pass_key idiom is used to grant access only to the intrusive priority queue.

Parameters
elementThe element to get the right_ member from
Returns
Reference to the right_ member

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