mdds
Loading...
Searching...
No Matches
mdds::st::detail::node< KeyT, ValueT > Struct Template Reference

#include <node.hpp>

Inheritance diagram for mdds::st::detail::node< KeyT, ValueT >:
mdds::st::detail::node_base

Public Types

using key_type = KeyT
using leaf_value_type = ValueT
using node_ptr = boost::intrusive_ptr<node>

Public Member Functions

 node (const node &r)
node & operator= (const node &r)
bool operator== (const node &r) const noexcept(nothrow_eq_comparable_v)
bool operator!= (const node &r) const noexcept(nothrow_eq_comparable_v)
std::string to_string () const
Public Member Functions inherited from mdds::st::detail::node_base
 node_base (bool _is_leaf) noexcept
 node_base (const node_base &r) noexcept

Static Public Member Functions

static size_t get_instance_count ()

Public Attributes

leaf_value_type value_leaf
key_type key = {}
node_ptr prev
node_ptr next
 previous sibling leaf node.
std::size_t refcount = 0
 next sibling leaf node.
Public Attributes inherited from mdds::st::detail::node_base
node_base * parent
bool is_leaf
 parent nonleaf_node

Static Public Attributes

static constexpr bool nothrow_default_constructible_v
static constexpr bool nothrow_eq_comparable_v

Detailed Description

template<typename KeyT, typename ValueT>
struct mdds::st::detail::node< KeyT, ValueT >

Represents a leaf node in a segment-tree like structure.

Constructor & Destructor Documentation

◆ node()

template<typename KeyT, typename ValueT>
mdds::st::detail::node< KeyT, ValueT >::node ( const node< KeyT, ValueT > & r)
inline

When copying node, only the stored values should be copied. Connections to the parent, left and right nodes must not be copied.

Member Function Documentation

◆ operator=()

template<typename KeyT, typename ValueT>
node & mdds::st::detail::node< KeyT, ValueT >::operator= ( const node< KeyT, ValueT > & r)
inline

Like the copy constructor, only the stored values should be copied.

Member Data Documentation

◆ nothrow_default_constructible_v

template<typename KeyT, typename ValueT>
bool mdds::st::detail::node< KeyT, ValueT >::nothrow_default_constructible_v
staticconstexpr
Initial value:
= std::is_nothrow_default_constructible_v<key_type> &&
std::is_nothrow_default_constructible_v<leaf_value_type> &&
std::is_nothrow_default_constructible_v<node_ptr>

◆ nothrow_eq_comparable_v

template<typename KeyT, typename ValueT>
bool mdds::st::detail::node< KeyT, ValueT >::nothrow_eq_comparable_v
staticconstexpr
Initial value:
=
noexcept(std::declval<key_type>() == std::declval<key_type>()) &&
noexcept(std::declval<leaf_value_type>() == std::declval<leaf_value_type>())