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 absl::string_view & | num_placeholder () |
Public Attributes | |
InlinedVector< 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 82 of file stringtree_leaf.hpp.
|
inline |
Definition at line 117 of file stringtree_leaf.hpp.
|
inlinestatic |
Definition at line 101 of file stringtree_leaf.hpp.
|
inline |
Definition at line 96 of file stringtree_leaf.hpp.
|
inline |
Utility functions to print the entire branch.
Definition at line 121 of file stringtree_leaf.hpp.
int RosIntrospection::StringTreeLeaf::toStr | ( | char * | buffer | ) | const |
Definition at line 42 of file stringtree_leaf.cpp.
InlinedVector<uint16_t,8> RosIntrospection::StringTreeLeaf::index_array |
Definition at line 88 of file stringtree_leaf.hpp.
const StringTreeNode* RosIntrospection::StringTreeLeaf::node_ptr |
Definition at line 86 of file stringtree_leaf.hpp.
|
static |
Definition at line 99 of file stringtree_leaf.hpp.
|
static |
Definition at line 98 of file stringtree_leaf.hpp.