22 #ifndef _ANNOTATIONPARAMETERVALUE_H_ 23 #define _ANNOTATIONPARAMETERVALUE_H_ 28 #pragma push_macro("max") 30 #define FASTDDS_RESTORE_MAX 31 #endif // defined(max) 34 #pragma push_macro("min") 36 #define FASTDDS_RESTORE_MIN 37 #endif // defined(min) 41 #include <fastrtps/types/TypesBase.h> 42 #include <fastrtps/types/TypeIdentifier.h> 43 #include <fastrtps/utils/string_convert.hpp> 44 #include <fastrtps/fastrtps_dll.h> 74 RTPS_DllAPI ~ExtendedAnnotationParameterValue();
80 RTPS_DllAPI ExtendedAnnotationParameterValue(
81 const ExtendedAnnotationParameterValue& x);
87 RTPS_DllAPI ExtendedAnnotationParameterValue(
88 ExtendedAnnotationParameterValue&& x);
94 RTPS_DllAPI ExtendedAnnotationParameterValue& operator =(
95 const ExtendedAnnotationParameterValue& x);
101 RTPS_DllAPI ExtendedAnnotationParameterValue& operator =(
102 ExtendedAnnotationParameterValue&& x);
110 RTPS_DllAPI
static size_t getCdrSerializedSize(
111 const ExtendedAnnotationParameterValue& data,
112 size_t current_alignment = 0);
119 RTPS_DllAPI
void serialize(
120 eprosima::fastcdr::Cdr& cdr)
const;
126 RTPS_DllAPI
void deserialize(
127 eprosima::fastcdr::Cdr& cdr);
137 RTPS_DllAPI
static size_t getKeyMaxCdrSerializedSize(
138 size_t current_alignment = 0);
143 RTPS_DllAPI
static bool isKeyDefined();
149 RTPS_DllAPI
void serializeKey(
150 eprosima::fastcdr::Cdr& cdr)
const;
152 RTPS_DllAPI
bool operator ==(
153 const ExtendedAnnotationParameterValue&)
const 175 RTPS_DllAPI ~AnnotationParameterValue();
181 RTPS_DllAPI AnnotationParameterValue(
182 const AnnotationParameterValue& x);
188 RTPS_DllAPI AnnotationParameterValue(
189 AnnotationParameterValue&& x);
195 RTPS_DllAPI AnnotationParameterValue& operator =(
196 const AnnotationParameterValue& x);
202 RTPS_DllAPI AnnotationParameterValue& operator =(
203 AnnotationParameterValue&& x);
217 RTPS_DllAPI
char _d()
const;
223 RTPS_DllAPI
char& _d();
229 RTPS_DllAPI
void boolean_value(
230 bool _boolean_value);
237 RTPS_DllAPI
bool boolean_value()
const;
244 RTPS_DllAPI
bool& boolean_value();
249 RTPS_DllAPI
void byte_value(
250 uint8_t _byte_value);
257 RTPS_DllAPI uint8_t byte_value()
const;
264 RTPS_DllAPI uint8_t& byte_value();
269 RTPS_DllAPI
void int16_value(
270 int16_t _int16_value);
277 RTPS_DllAPI int16_t int16_value()
const;
284 RTPS_DllAPI int16_t& int16_value();
289 RTPS_DllAPI
void uint_16_value(
290 uint16_t _uint_16_value);
297 RTPS_DllAPI uint16_t uint_16_value()
const;
304 RTPS_DllAPI uint16_t& uint_16_value();
309 RTPS_DllAPI
void int32_value(
310 int32_t _int32_value);
317 RTPS_DllAPI int32_t int32_value()
const;
324 RTPS_DllAPI int32_t& int32_value();
329 RTPS_DllAPI
void uint32_value(
330 uint32_t _uint32_value);
337 RTPS_DllAPI uint32_t uint32_value()
const;
344 RTPS_DllAPI uint32_t& uint32_value();
349 RTPS_DllAPI
void int64_value(
350 int64_t _int64_value);
357 RTPS_DllAPI int64_t int64_value()
const;
364 RTPS_DllAPI int64_t& int64_value();
370 RTPS_DllAPI
void uint64_value(
371 uint64_t _uint64_value);
378 RTPS_DllAPI uint64_t uint64_value()
const;
385 RTPS_DllAPI uint64_t& uint64_value();
390 RTPS_DllAPI
void float32_value(
391 float _float32_value);
398 RTPS_DllAPI
float float32_value()
const;
405 RTPS_DllAPI
float& float32_value();
410 RTPS_DllAPI
void float64_value(
411 double _float64_value);
418 RTPS_DllAPI
double float64_value()
const;
425 RTPS_DllAPI
double& float64_value();
431 RTPS_DllAPI
void float128_value(
432 long double _float128_value);
439 RTPS_DllAPI
long double float128_value()
const;
446 RTPS_DllAPI
long double& float128_value();
451 RTPS_DllAPI
void char_value(
459 RTPS_DllAPI
char char_value()
const;
466 RTPS_DllAPI
char& char_value();
471 RTPS_DllAPI
void wchar_value(
472 wchar_t _wchar_value);
479 RTPS_DllAPI
wchar_t wchar_value()
const;
486 RTPS_DllAPI
wchar_t& wchar_value();
491 RTPS_DllAPI
void enumerated_value(
492 int32_t _enumerated_value);
499 RTPS_DllAPI int32_t enumerated_value()
const;
506 RTPS_DllAPI int32_t& enumerated_value();
511 RTPS_DllAPI
void string8_value(
512 const std::string& _string8_value);
518 RTPS_DllAPI
void string8_value(
519 std::string&& _string8_value);
526 RTPS_DllAPI
const std::string& string8_value()
const;
533 RTPS_DllAPI std::string& string8_value();
538 RTPS_DllAPI
void string16_value(
539 const std::wstring& _string16_value);
545 RTPS_DllAPI
void string16_value(
546 std::wstring&& _string16_value);
553 RTPS_DllAPI
const std::wstring& string16_value()
const;
560 RTPS_DllAPI std::wstring& string16_value();
566 RTPS_DllAPI
void extended_value(
573 RTPS_DllAPI
void extended_value(
596 RTPS_DllAPI
static size_t getCdrSerializedSize(
597 const AnnotationParameterValue& data,
598 size_t current_alignment = 0);
605 RTPS_DllAPI
void serialize(
606 eprosima::fastcdr::Cdr& cdr)
const;
612 RTPS_DllAPI
void deserialize(
613 eprosima::fastcdr::Cdr& cdr);
623 RTPS_DllAPI
static size_t getKeyMaxCdrSerializedSize(
624 size_t current_alignment = 0);
629 RTPS_DllAPI
static bool isKeyDefined();
635 RTPS_DllAPI
void serializeKey(
636 eprosima::fastcdr::Cdr& cdr)
const;
638 RTPS_DllAPI
bool operator ==(
639 const AnnotationParameterValue& other)
const;
649 return (m_boolean_value) ?
"true" :
"false";
651 return std::to_string(m_byte_value);
653 return std::to_string(m_int16_value);
655 return std::to_string(m_uint_16_value);
657 return std::to_string(m_int32_value);
659 return std::to_string(m_uint32_value);
661 return std::to_string(m_int64_value);
663 return std::to_string(m_uint64_value);
665 return std::to_string(m_float32_value);
667 return std::to_string(m_float64_value);
669 return std::to_string(m_float128_value);
671 return std::to_string(m_char_value);
673 return std::to_string(m_wchar_value);
675 return std::to_string(m_enumerated_value);
682 return m_string8_value;
692 const std::string& value)
698 std::string val_ = value;
699 std::transform(val_.begin(), val_.end(), val_.begin(),
702 return static_cast<char>(std::tolower(c));
704 boolean_value(val_.compare(
"0") != 0 || val_.compare(
CONST_TRUE) == 0);
709 byte_value(static_cast<uint8_t>(std::stoul(value)));
714 int16_value(static_cast<int16_t>(std::stoi(value)));
719 int32_value(static_cast<int32_t>(std::stoi(value)));
724 int64_value(static_cast<int64_t>(std::stoll(value)));
729 uint_16_value(static_cast<uint16_t>(std::stoul(value)));
734 uint32_value(static_cast<uint32_t>(std::stoul(value)));
739 uint64_value(static_cast<uint64_t>(std::stoull(value)));
744 float32_value(std::stof(value));
749 float64_value(std::stod(value));
754 float128_value(std::stold(value));
759 char_value(value.c_str()[0]);
770 string8_value(value);
781 enumerated_value(static_cast<int32_t>(std::stoul(value)));
793 bool m_boolean_value;
794 uint8_t m_byte_value;
795 int16_t m_int16_value;
796 uint16_t m_uint_16_value;
797 int32_t m_int32_value;
798 uint32_t m_uint32_value;
799 int64_t m_int64_value;
800 uint64_t m_uint64_value;
801 float m_float32_value;
802 double m_float64_value;
803 long double m_float128_value;
805 wchar_t m_wchar_value;
806 int32_t m_enumerated_value;
807 std::string m_string8_value;
808 std::wstring m_string16_value;
827 RTPS_DllAPI ~AppliedAnnotationParameter();
833 RTPS_DllAPI AppliedAnnotationParameter(
834 const AppliedAnnotationParameter& x);
840 RTPS_DllAPI AppliedAnnotationParameter(
841 AppliedAnnotationParameter&& x);
847 RTPS_DllAPI AppliedAnnotationParameter& operator =(
848 const AppliedAnnotationParameter& x);
854 RTPS_DllAPI AppliedAnnotationParameter& operator =(
855 AppliedAnnotationParameter&& x);
864 m_paramname_hash = _paramname_hash;
874 m_paramname_hash = std::move(_paramname_hash);
883 return m_paramname_hash;
892 return m_paramname_hash;
912 m_value = std::move(_value);
939 RTPS_DllAPI
static size_t getCdrSerializedSize(
940 const AppliedAnnotationParameter& data,
941 size_t current_alignment = 0);
948 RTPS_DllAPI
void serialize(
949 eprosima::fastcdr::Cdr& cdr)
const;
955 RTPS_DllAPI
void deserialize(
956 eprosima::fastcdr::Cdr& cdr);
966 RTPS_DllAPI
static size_t getKeyMaxCdrSerializedSize(
967 size_t current_alignment = 0);
972 RTPS_DllAPI
static bool isKeyDefined();
978 RTPS_DllAPI
void serializeKey(
979 eprosima::fastcdr::Cdr& cdr)
const;
981 RTPS_DllAPI
bool operator ==(
982 const AppliedAnnotationParameter& other)
const;
1042 RTPS_DllAPI ~AppliedAnnotation();
1044 RTPS_DllAPI AppliedAnnotation(
1045 const AppliedAnnotation& x);
1047 RTPS_DllAPI AppliedAnnotation(
1048 AppliedAnnotation&& x);
1049 RTPS_DllAPI AppliedAnnotation& operator =(
1050 const AppliedAnnotation& x);
1051 RTPS_DllAPI AppliedAnnotation& operator =(
1052 AppliedAnnotation&& x);
1057 m_annotation_typeid = _annotation_typeid;
1063 m_annotation_typeid = std::move(_annotation_typeid);
1068 return m_annotation_typeid;
1073 return m_annotation_typeid;
1077 const AppliedAnnotationParameterSeq& _param_seq)
1079 m_param_seq = _param_seq;
1083 AppliedAnnotationParameterSeq&& _param_seq)
1085 m_param_seq = std::move(_param_seq);
1088 inline const AppliedAnnotationParameterSeq&
param_seq()
const 1098 RTPS_DllAPI
static size_t getCdrSerializedSize(
1099 const AppliedAnnotation& data,
1100 size_t current_alignment = 0);
1101 RTPS_DllAPI
void serialize(
1102 eprosima::fastcdr::Cdr& cdr)
const;
1103 RTPS_DllAPI
void deserialize(
1104 eprosima::fastcdr::Cdr& cdr);
1105 RTPS_DllAPI
static size_t getKeyMaxCdrSerializedSize(
1106 size_t current_alignment = 0);
1107 RTPS_DllAPI
static bool isKeyDefined();
1108 RTPS_DllAPI
void serializeKey(
1109 eprosima::fastcdr::Cdr& cdr)
const;
1111 RTPS_DllAPI
bool operator ==(
1112 const AppliedAnnotation& other)
const;
1117 AppliedAnnotationParameterSeq m_param_seq;
1135 RTPS_DllAPI ~AppliedVerbatimAnnotation();
1137 RTPS_DllAPI AppliedVerbatimAnnotation(
1138 const AppliedVerbatimAnnotation& x);
1140 RTPS_DllAPI AppliedVerbatimAnnotation(
1141 AppliedVerbatimAnnotation&& x);
1143 RTPS_DllAPI AppliedVerbatimAnnotation& operator =(
1144 const AppliedVerbatimAnnotation& x);
1146 RTPS_DllAPI AppliedVerbatimAnnotation& operator =(
1147 AppliedVerbatimAnnotation&& x);
1150 const std::string& _placement)
1152 m_placement = _placement;
1156 std::string&& _placement)
1158 m_placement = std::move(_placement);
1172 const std::string& _language)
1174 m_language = _language;
1178 std::string&& _language)
1180 m_language = std::move(_language);
1194 const std::string& _text)
1200 std::string&& _text)
1202 m_text = std::move(_text);
1205 inline const std::string&
text()
const 1215 RTPS_DllAPI
static size_t getCdrSerializedSize(
1216 const AppliedVerbatimAnnotation& data,
1217 size_t current_alignment = 0);
1219 RTPS_DllAPI
void serialize(
1220 eprosima::fastcdr::Cdr& cdr)
const;
1222 RTPS_DllAPI
void deserialize(
1223 eprosima::fastcdr::Cdr& cdr);
1225 RTPS_DllAPI
static size_t getKeyMaxCdrSerializedSize(
1226 size_t current_alignment = 0);
1228 RTPS_DllAPI
static bool isKeyDefined();
1230 RTPS_DllAPI
void serializeKey(
1231 eprosima::fastcdr::Cdr& cdr)
const;
1233 RTPS_DllAPI
bool operator ==(
1234 const AppliedVerbatimAnnotation& other)
const;
1238 std::string m_placement;
1239 std::string m_language;
1257 RTPS_DllAPI ~AppliedBuiltinMemberAnnotations();
1259 RTPS_DllAPI AppliedBuiltinMemberAnnotations(
1260 const AppliedBuiltinMemberAnnotations& x);
1262 RTPS_DllAPI AppliedBuiltinMemberAnnotations(
1263 AppliedBuiltinMemberAnnotations&& x);
1265 RTPS_DllAPI AppliedBuiltinMemberAnnotations& operator =(
1266 const AppliedBuiltinMemberAnnotations& x);
1268 RTPS_DllAPI AppliedBuiltinMemberAnnotations& operator =(
1269 AppliedBuiltinMemberAnnotations&& x);
1272 const std::string& _unit)
1278 std::string&& _unit)
1280 m_unit = std::move(_unit);
1283 inline const std::string&
unit()
const 1302 m_min = std::move(_min);
1324 m_max = std::move(_max);
1338 const std::string& _hash_id)
1340 m_hash_id = _hash_id;
1344 std::string&& _hash_id)
1346 m_hash_id = std::move(_hash_id);
1359 RTPS_DllAPI
static size_t getCdrSerializedSize(
1360 const AppliedBuiltinMemberAnnotations& data,
1361 size_t current_alignment = 0);
1363 RTPS_DllAPI
void serialize(
1364 eprosima::fastcdr::Cdr& cdr)
const;
1366 RTPS_DllAPI
void deserialize(
1367 eprosima::fastcdr::Cdr& cdr);
1369 RTPS_DllAPI
static size_t getKeyMaxCdrSerializedSize(
1370 size_t current_alignment = 0);
1372 RTPS_DllAPI
static bool isKeyDefined();
1374 RTPS_DllAPI
void serializeKey(
1375 eprosima::fastcdr::Cdr& cdr)
const;
1377 RTPS_DllAPI
bool operator ==(
1378 const AppliedBuiltinMemberAnnotations& other)
const;
1385 std::string m_hash_id;
1395 #if defined(FASTDDS_RESTORE_MIN) 1396 #pragma pop_macro("min") 1397 #undef FASTDDS_RESTORE_MIN 1398 #endif // defined(FASTDDS_RESTORE_MIN) 1400 #if defined(FASTDDS_RESTORE_MAX) 1401 #pragma pop_macro("max") 1402 #undef FASTDDS_RESTORE_MAX 1403 #endif // defined(FASTDDS_RESTORE_MAX) 1405 #endif // if _MSC_VER 1407 #endif // _ANNOTATIONPARAMETERVALUE_H_ const AnnotationParameterValue & value() const
This function returns a constant reference to member value.
Definition: AnnotationParameterValue.h:919
void annotation_typeid(const TypeIdentifier &_annotation_typeid)
Definition: AnnotationParameterValue.h:1054
void param_seq(AppliedAnnotationParameterSeq &&_param_seq)
Definition: AnnotationParameterValue.h:1082
AnnotationParameterValue & min()
Definition: AnnotationParameterValue.h:1310
const std::string & text() const
Definition: AnnotationParameterValue.h:1205
const std::string CONST_TRUE
Definition: TypesBase.h:58
std::string wstring_to_bytes(const std::wstring &str)
std::string & placement()
Definition: AnnotationParameterValue.h:1166
Definition: AnnotationParameterValue.h:1129
const AnnotationParameterValue & max() const
Definition: AnnotationParameterValue.h:1327
void min(AnnotationParameterValue &&_min)
Definition: AnnotationParameterValue.h:1299
void paramname_hash(const NameHash &_paramname_hash)
This function copies the value in member paramname_hash.
Definition: AnnotationParameterValue.h:861
const AnnotationParameterValue & min() const
Definition: AnnotationParameterValue.h:1305
void min(const AnnotationParameterValue &_min)
Definition: AnnotationParameterValue.h:1293
std::string & text()
Definition: AnnotationParameterValue.h:1210
void language(std::string &&_language)
Definition: AnnotationParameterValue.h:1177
std::string & unit()
Definition: AnnotationParameterValue.h:1288
AppliedAnnotationParameterSeq & param_seq()
Definition: AnnotationParameterValue.h:1093
void paramname_hash(NameHash &&_paramname_hash)
This function moves the value in member paramname_hash.
Definition: AnnotationParameterValue.h:871
AnnotationParameterValue & max()
Definition: AnnotationParameterValue.h:1332
const NameHash & paramname_hash() const
This function returns a constant reference to member paramname_hash.
Definition: AnnotationParameterValue.h:881
void unit(std::string &&_unit)
Definition: AnnotationParameterValue.h:1277
This class represents the union AnnotationParameterValue defined by the user in the IDL file...
Definition: AnnotationParameterValue.h:163
std::string & language()
Definition: AnnotationParameterValue.h:1188
void hash_id(const std::string &_hash_id)
Definition: AnnotationParameterValue.h:1337
AnnotationParameterValue & value()
This function returns a reference to member value.
Definition: AnnotationParameterValue.h:928
Definition: AnnotationParameterValue.h:1251
eProsima namespace.
Definition: LibrarySettingsAttributes.h:23
void hash_id(std::string &&_hash_id)
Definition: AnnotationParameterValue.h:1343
const std::string & unit() const
Definition: AnnotationParameterValue.h:1283
RTPS_DllAPI void from_string(const std::string &value)
Aux method to set value from its string representation.
Definition: AnnotationParameterValue.h:691
void unit(const std::string &_unit)
Definition: AnnotationParameterValue.h:1271
std::vector< AppliedAnnotation > AppliedAnnotationSeq
Definition: AnnotationParameterValue.h:1121
std::array< uint8_t, 4 > NameHash
Definition: TypesBase.h:178
const AppliedAnnotationParameterSeq & param_seq() const
Definition: AnnotationParameterValue.h:1088
Definition: TypeIdentifier.h:80
const std::string & language() const
Definition: AnnotationParameterValue.h:1183
This class represents the structure AppliedAnnotationParameter defined by the user in the IDL file...
Definition: AnnotationParameterValue.h:815
const std::string & placement() const
Definition: AnnotationParameterValue.h:1161
void max(AnnotationParameterValue &&_max)
Definition: AnnotationParameterValue.h:1321
void language(const std::string &_language)
Definition: AnnotationParameterValue.h:1171
void placement(const std::string &_placement)
Definition: AnnotationParameterValue.h:1149
void param_seq(const AppliedAnnotationParameterSeq &_param_seq)
Definition: AnnotationParameterValue.h:1076
void value(const AnnotationParameterValue &_value)
This function copies the value in member value.
Definition: AnnotationParameterValue.h:899
const TypeIdentifier & annotation_typeid() const
Definition: AnnotationParameterValue.h:1066
void max(const AnnotationParameterValue &_max)
Definition: AnnotationParameterValue.h:1315
RTPS_DllAPI std::string to_string() const
Aux method to return value as its string representation.
Definition: AnnotationParameterValue.h:644
std::vector< AppliedAnnotationParameter > AppliedAnnotationParameterSeq
Definition: AnnotationParameterValue.h:1030
std::wstring wstring_from_bytes(const std::string &str)
void annotation_typeid(TypeIdentifier &&_annotation_typeid)
Definition: AnnotationParameterValue.h:1060
void text(std::string &&_text)
Definition: AnnotationParameterValue.h:1199
std::string & hash_id()
Definition: AnnotationParameterValue.h:1354
NameHash & paramname_hash()
This function returns a reference to member paramname_hash.
Definition: AnnotationParameterValue.h:890
Definition: AnnotationParameterValue.h:1036
TypeIdentifier & annotation_typeid()
Definition: AnnotationParameterValue.h:1071
This class represents the structure ExtendedAnnotationParameterValue defined by the user in the IDL f...
Definition: AnnotationParameterValue.h:62
void placement(std::string &&_placement)
Definition: AnnotationParameterValue.h:1155
void text(const std::string &_text)
Definition: AnnotationParameterValue.h:1193
const std::string & hash_id() const
Definition: AnnotationParameterValue.h:1349
void value(AnnotationParameterValue &&_value)
This function moves the value in member value.
Definition: AnnotationParameterValue.h:909