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_leaf.hpp>
Public Member Functions | |
StringTreeLeaf () | |
std::string | toStdString () const |
bool | toStr (std::string &destination) const |
Utility functions to print the entire branch. More... | |
int | toStr (char *buffer) const |
Static Public Member Functions | |
static const boost::string_ref & | num_placeholder () |
Public Attributes | |
boost::container::static_vector< uint16_t, 8 > | index_array |
const StringTreeNode * | node_ptr |
Static Public Attributes | |
static constexpr const char | NUM_PLACEHOLDER = '#' |
static constexpr const char | SEPARATOR = '/' |
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 65 of file stringtree_leaf.hpp.
|
inline |
Definition at line 102 of file stringtree_leaf.hpp.
|
inlinestatic |
Definition at line 84 of file stringtree_leaf.hpp.
|
inline |
Definition at line 79 of file stringtree_leaf.hpp.
|
inline |
Utility functions to print the entire branch.
Definition at line 106 of file stringtree_leaf.hpp.
int RosIntrospection::StringTreeLeaf::toStr | ( | char * | buffer | ) | const |
Definition at line 42 of file stringtree_leaf.cpp.
boost::container::static_vector<uint16_t,8> RosIntrospection::StringTreeLeaf::index_array |
Definition at line 71 of file stringtree_leaf.hpp.
const StringTreeNode* RosIntrospection::StringTreeLeaf::node_ptr |
Definition at line 69 of file stringtree_leaf.hpp.
|
static |
Definition at line 82 of file stringtree_leaf.hpp.
|
static |
Definition at line 81 of file stringtree_leaf.hpp.