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. | |
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.
RosIntrospection::StringTreeLeaf::StringTreeLeaf | ( | ) | [inline] |
Definition at line 117 of file stringtree_leaf.hpp.
static const absl::string_view& RosIntrospection::StringTreeLeaf::num_placeholder | ( | ) | [inline, static] |
Definition at line 101 of file stringtree_leaf.hpp.
std::string RosIntrospection::StringTreeLeaf::toStdString | ( | ) | const [inline] |
Definition at line 96 of file stringtree_leaf.hpp.
bool RosIntrospection::StringTreeLeaf::toStr | ( | std::string & | destination | ) | const [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.
Definition at line 88 of file stringtree_leaf.hpp.
Definition at line 86 of file stringtree_leaf.hpp.
constexpr const char RosIntrospection::StringTreeLeaf::NUM_PLACEHOLDER = '#' [static] |
Definition at line 99 of file stringtree_leaf.hpp.
constexpr const char RosIntrospection::StringTreeLeaf::SEPARATOR = '/' [static] |
Definition at line 98 of file stringtree_leaf.hpp.