35 #ifndef ROS_INTROSPECTION_STRINGTREELEAF_H 36 #define ROS_INTROSPECTION_STRINGTREELEAF_H 41 #include <boost/container/small_vector.hpp> 42 #include <boost/container/static_vector.hpp> 74 bool toStr(std::string &destination)
const;
77 int toStr(
char* buffer)
const;
85 static const boost::string_ref nph(
"#");
109 int offset = this->
toStr(buffer);
115 destination.assign(buffer, offset);
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 "#".
static constexpr const char NUM_PLACEHOLDER
Element of the tree. it has a single parent and N >= 0 children.
std::ostream & operator<<(std::ostream &os, const BuiltinType &c)
void CreateStringFromTreeLeaf(const StringTreeLeaf &leaf, bool skip_root, std::string &out)
boost::container::static_vector< uint16_t, 8 > index_array
const StringTreeNode * node_ptr
bool toStr(std::string &destination) const
Utility functions to print the entire branch.
static constexpr const char SEPARATOR
std::string toStdString() const
static const boost::string_ref & num_placeholder()