emlabcpp
modern opinionated embedded C++ library
emlabcpp::contiguous_node< Key, Value > Class Template Reference

#include <tree.h>

Public Types

using key_type = Key
 
using value_type = Value
 
using node_id = uint32_t
 
using child_id = uint32_t
 
using array_type = pmr::map< child_id, node_id >
 
using object_type = pmr::map< key_type, node_id >
 
using content_type = std::variant< Value, array_type, object_type >
 
using object_handle = contiguous_object_handle< object_type >
 
using const_object_handle = contiguous_object_handle< object_type const >
 
using array_handle = contiguous_array_handle< array_type >
 
using const_array_handle = contiguous_array_handle< array_type const >
 

Public Member Functions

 contiguous_node (content_type cont)
 
Value const * get_value () const
 
Value * get_value ()
 
std::variant< std::reference_wrapper< Value const >, object_handle, array_handleget_container_handle ()
 
std::variant< std::reference_wrapper< Value const >, const_object_handle, const_array_handleget_container_handle () const
 
contiguous_tree_type get_type () const
 

Member Typedef Documentation

◆ array_handle

template<typename Key , typename Value >
using emlabcpp::contiguous_node< Key, Value >::array_handle = contiguous_array_handle< array_type >

◆ array_type

template<typename Key , typename Value >
using emlabcpp::contiguous_node< Key, Value >::array_type = pmr::map< child_id, node_id >

◆ child_id

template<typename Key , typename Value >
using emlabcpp::contiguous_node< Key, Value >::child_id = uint32_t

◆ const_array_handle

template<typename Key , typename Value >
using emlabcpp::contiguous_node< Key, Value >::const_array_handle = contiguous_array_handle< array_type const >

◆ const_object_handle

template<typename Key , typename Value >
using emlabcpp::contiguous_node< Key, Value >::const_object_handle = contiguous_object_handle< object_type const >

◆ content_type

template<typename Key , typename Value >
using emlabcpp::contiguous_node< Key, Value >::content_type = std::variant< Value, array_type, object_type >

◆ key_type

template<typename Key , typename Value >
using emlabcpp::contiguous_node< Key, Value >::key_type = Key

◆ node_id

template<typename Key , typename Value >
using emlabcpp::contiguous_node< Key, Value >::node_id = uint32_t

◆ object_handle

template<typename Key , typename Value >
using emlabcpp::contiguous_node< Key, Value >::object_handle = contiguous_object_handle< object_type >

◆ object_type

template<typename Key , typename Value >
using emlabcpp::contiguous_node< Key, Value >::object_type = pmr::map< key_type, node_id >

◆ value_type

template<typename Key , typename Value >
using emlabcpp::contiguous_node< Key, Value >::value_type = Value

Constructor & Destructor Documentation

◆ contiguous_node()

template<typename Key , typename Value >
emlabcpp::contiguous_node< Key, Value >::contiguous_node ( content_type  cont)
inlineexplicit

Member Function Documentation

◆ get_container_handle() [1/2]

template<typename Key , typename Value >
std:: variant< std::reference_wrapper< Value const >, object_handle, array_handle > emlabcpp::contiguous_node< Key, Value >::get_container_handle ( )
inline

◆ get_container_handle() [2/2]

template<typename Key , typename Value >
std::variant< std::reference_wrapper< Value const >, const_object_handle, const_array_handle > emlabcpp::contiguous_node< Key, Value >::get_container_handle ( ) const
inline

◆ get_type()

template<typename Key , typename Value >
contiguous_tree_type emlabcpp::contiguous_node< Key, Value >::get_type ( ) const
inline

◆ get_value() [1/2]

template<typename Key , typename Value >
Value* emlabcpp::contiguous_node< Key, Value >::get_value ( )
inline

◆ get_value() [2/2]

template<typename Key , typename Value >
Value const* emlabcpp::contiguous_node< Key, Value >::get_value ( ) const
inline

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