35 #ifndef ROS_INTROSPECTION_STRINGTREELEAF_H 36 #define ROS_INTROSPECTION_STRINGTREELEAF_H 49 template <
typename T,
size_t N>
91 bool toStr(std::string &destination)
const;
94 int toStr(
char* buffer)
const;
98 constexpr
static const char SEPARATOR =
'/';
99 constexpr
static const char NUM_PLACEHOLDER =
'#';
124 int offset = this->
toStr(buffer);
130 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 "#".
Element of the tree. it has a single parent and N >= 0 children.
std::ostream & operator<<(std::ostream &os, const BuiltinType &c)
T & operator[](size_t index)
static const absl::string_view & num_placeholder()
std::array< T, N > _array
InlinedVector< uint16_t, 8 > index_array
const char * toStr(const BuiltinType &c)
const StringTreeNode * node_ptr
bool toStr(std::string &destination) const
Utility functions to print the entire branch.
std::string toStdString() const
const T & operator[](size_t index) const