Public Member Functions | Public Attributes | Static Public Attributes | List of all members
Ros2Introspection::StringTreeLeaf Struct Reference

The StringTreeLeaf is, as the name suggests, a leaf (terminal node) of a StringTree. It provides the pointer to the node and a list of numbers that represent the index that corresponds to the placeholder "#". More...

#include <stringtree.hpp>

Public Member Functions

 StringTreeLeaf ()
 
std::string toStdString () const
 
int toStr (std::string &destination) const
 Utility functions to print the entire branch. More...
 

Public Attributes

boost::container::static_vector< uint16_t, 8 > index_array
 
const StringTreeNodenode_ptr
 

Static Public Attributes

static constexpr const char NUM_PLACEHOLDER = '#'
 
static constexpr const char SEPARATOR = '/'
 

Detailed Description

The StringTreeLeaf is, as the name suggests, a leaf (terminal node) of a StringTree. It provides the pointer to the node and a list of numbers that represent the index that corresponds to the placeholder "#".

For example if you want to represent the string

 foo/2/bar/3/hello/world

This would correspond to a branch of the tree (from root to the leaf) equal to these 6 nodes, where "foo" is the root and "world" is the leaf

foo -> # -> bar -> # ->hello -> world

array_size will be equal to two and index_array will contain these numbers {2,3}

Definition at line 79 of file stringtree.hpp.

Constructor & Destructor Documentation

◆ StringTreeLeaf()

Ros2Introspection::StringTreeLeaf::StringTreeLeaf ( )
inline

Definition at line 112 of file stringtree.hpp.

Member Function Documentation

◆ toStdString()

std::string Ros2Introspection::StringTreeLeaf::toStdString ( ) const
inline

Definition at line 90 of file stringtree.hpp.

◆ toStr()

int Ros2Introspection::StringTreeLeaf::toStr ( std::string &  destination) const

Utility functions to print the entire branch.

Definition at line 73 of file stringtree.cpp.

Member Data Documentation

◆ index_array

boost::container::static_vector<uint16_t,8> Ros2Introspection::StringTreeLeaf::index_array

Definition at line 85 of file stringtree.hpp.

◆ node_ptr

const StringTreeNode* Ros2Introspection::StringTreeLeaf::node_ptr

Definition at line 83 of file stringtree.hpp.

◆ NUM_PLACEHOLDER

constexpr const char Ros2Introspection::StringTreeLeaf::NUM_PLACEHOLDER = '#'
static

Definition at line 97 of file stringtree.hpp.

◆ SEPARATOR

constexpr const char Ros2Introspection::StringTreeLeaf::SEPARATOR = '/'
static

Definition at line 96 of file stringtree.hpp.


The documentation for this struct was generated from the following files:


plotjuggler_ros
Author(s): Davide Faconti
autogenerated on Fri Jun 23 2023 02:28:04