rosidl_runtime_cpp
master
Generate the rosidl interfaces in C++.
|
Go to the documentation of this file.
15 #ifndef ROSIDL_RUNTIME_CPP__TRAITS_HPP_
16 #define ROSIDL_RUNTIME_CPP__TRAITS_HPP_
21 #include <type_traits>
28 out << (value ?
"true" :
"false");
33 auto flags = out.
flags();
35 static_cast<uint16_t>(value);
41 auto flags = out.
flags();
43 static_cast<uint_least16_t>(value) <<
"\"";
49 auto flags = out.
flags();
56 auto flags = out.
flags();
63 auto flags = out.
flags();
112 while (index < value.
size()) {
114 if (pos == std::string::npos) {
117 out.
write(&value[index], pos - index);
118 if (pos >= value.
size()) {
121 out <<
"\\" << value[pos];
131 auto flags = out.
flags();
133 while (index < value.
size()) {
134 uint_least16_t character =
static_cast<uint_least16_t
>(value[index]);
135 if (!(character & 0xff80)) {
138 }
else if (!(character & 0xff00)) {
155 inline const char *
name();
189 #endif // ROSIDL_RUNTIME_CPP__TRAITS_HPP_
Definition: traits.hpp:167
Definition: traits.hpp:23
Definition: traits.hpp:185
Definition: traits.hpp:182
Definition: traits.hpp:179
Definition: traits.hpp:164
Definition: traits.hpp:173
void character_value_to_yaml(unsigned char value, std::ostream &out)
Definition: traits.hpp:31
void value_to_yaml(bool value, std::ostream &out)
Definition: traits.hpp:26
T find_first_of(T... args)
Definition: traits.hpp:158
Definition: traits.hpp:161
Definition: traits.hpp:176
Definition: traits.hpp:170