Go to the documentation of this file.
31 auto node = leaf.
node;
32 while (node && node->value())
34 fields.push_back(node->value());
35 node = node->parent();
43 size_t total_size = 0;
46 total_size +=
field->name().size() + 1;
49 total_size += (2 + 4);
53 out.resize(total_size);
54 char* buffer =
static_cast<char*
>(&out[0]);
56 size_t array_count = 0;
61 const std::string& str =
field->name();
65 buffer[offset++] =
'/';
67 std::memcpy(&buffer[offset], str.data(), str.size());
70 if (!is_root &&
field->isArray())
72 buffer[offset++] =
'[';
77 buffer[offset++] =
']';
80 buffer[offset] =
'\0';
LLVM_VECSMALL_ATTRIBUTE_ALWAYS_INLINE size_type size() const
const FieldTreeNode * node
void toStr(std::string &destination) const
Utility functions to print the entire branch.
SmallVector< uint16_t, 4 > index_array
SmallVector< const ROSField *, 8 > fields
SmallVector< uint16_t, 4 > index_array
static void field(LexState *ls, ConsControl *cc)
int print_number(char *buffer, uint16_t value)
The FieldTreeLeaf is, as the name suggests, a leaf (terminal node) of a StringTree....
A ROSMessage will contain one or more ROSField(s). Each field is little more than a name / type pair.
plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:47