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> 75 RTPS_DllAPI ~ExtendedAnnotationParameterValue();
81 RTPS_DllAPI ExtendedAnnotationParameterValue(
82 const ExtendedAnnotationParameterValue& x);
88 RTPS_DllAPI ExtendedAnnotationParameterValue(
89 ExtendedAnnotationParameterValue&& x);
95 RTPS_DllAPI ExtendedAnnotationParameterValue& operator =(
96 const ExtendedAnnotationParameterValue& x);
102 RTPS_DllAPI ExtendedAnnotationParameterValue& operator =(
103 ExtendedAnnotationParameterValue&& x);
111 RTPS_DllAPI
static size_t getCdrSerializedSize(
112 const ExtendedAnnotationParameterValue& data,
113 size_t current_alignment = 0);
120 RTPS_DllAPI
void serialize(
121 eprosima::fastcdr::Cdr& cdr)
const;
127 RTPS_DllAPI
void deserialize(
128 eprosima::fastcdr::Cdr& cdr);
138 RTPS_DllAPI
static size_t getKeyMaxCdrSerializedSize(
139 size_t current_alignment = 0);
144 RTPS_DllAPI
static bool isKeyDefined();
150 RTPS_DllAPI
void serializeKey(
151 eprosima::fastcdr::Cdr& cdr)
const;
153 RTPS_DllAPI
bool operator ==(
154 const ExtendedAnnotationParameterValue&)
const 177 RTPS_DllAPI ~AnnotationParameterValue();
183 RTPS_DllAPI AnnotationParameterValue(
184 const AnnotationParameterValue& x);
190 RTPS_DllAPI AnnotationParameterValue(
191 AnnotationParameterValue&& x);
197 RTPS_DllAPI AnnotationParameterValue& operator =(
198 const AnnotationParameterValue& x);
204 RTPS_DllAPI AnnotationParameterValue& operator =(
205 AnnotationParameterValue&& x);
219 RTPS_DllAPI
char _d()
const;
225 RTPS_DllAPI
char& _d();
231 RTPS_DllAPI
void boolean_value(
232 bool _boolean_value);
239 RTPS_DllAPI
bool boolean_value()
const;
246 RTPS_DllAPI
bool& boolean_value();
251 RTPS_DllAPI
void byte_value(
252 uint8_t _byte_value);
259 RTPS_DllAPI uint8_t byte_value()
const;
266 RTPS_DllAPI uint8_t& byte_value();
271 RTPS_DllAPI
void int16_value(
272 int16_t _int16_value);
279 RTPS_DllAPI int16_t int16_value()
const;
286 RTPS_DllAPI int16_t& int16_value();
291 RTPS_DllAPI
void uint_16_value(
292 uint16_t _uint_16_value);
299 RTPS_DllAPI uint16_t uint_16_value()
const;
306 RTPS_DllAPI uint16_t& uint_16_value();
311 RTPS_DllAPI
void int32_value(
312 int32_t _int32_value);
319 RTPS_DllAPI int32_t int32_value()
const;
326 RTPS_DllAPI int32_t& int32_value();
331 RTPS_DllAPI
void uint32_value(
332 uint32_t _uint32_value);
339 RTPS_DllAPI uint32_t uint32_value()
const;
346 RTPS_DllAPI uint32_t& uint32_value();
351 RTPS_DllAPI
void int64_value(
352 int64_t _int64_value);
359 RTPS_DllAPI int64_t int64_value()
const;
366 RTPS_DllAPI int64_t& int64_value();
372 RTPS_DllAPI
void uint64_value(
373 uint64_t _uint64_value);
380 RTPS_DllAPI uint64_t uint64_value()
const;
387 RTPS_DllAPI uint64_t& uint64_value();
392 RTPS_DllAPI
void float32_value(
393 float _float32_value);
400 RTPS_DllAPI
float float32_value()
const;
407 RTPS_DllAPI
float& float32_value();
412 RTPS_DllAPI
void float64_value(
413 double _float64_value);
420 RTPS_DllAPI
double float64_value()
const;
427 RTPS_DllAPI
double& float64_value();
433 RTPS_DllAPI
void float128_value(
434 long double _float128_value);
441 RTPS_DllAPI
long double float128_value()
const;
448 RTPS_DllAPI
long double& float128_value();
453 RTPS_DllAPI
void char_value(
461 RTPS_DllAPI
char char_value()
const;
468 RTPS_DllAPI
char& char_value();
473 RTPS_DllAPI
void wchar_value(
474 wchar_t _wchar_value);
481 RTPS_DllAPI
wchar_t wchar_value()
const;
488 RTPS_DllAPI
wchar_t& wchar_value();
493 RTPS_DllAPI
void enumerated_value(
494 int32_t _enumerated_value);
501 RTPS_DllAPI int32_t enumerated_value()
const;
508 RTPS_DllAPI int32_t& enumerated_value();
513 RTPS_DllAPI
void string8_value(
514 const std::string& _string8_value);
520 RTPS_DllAPI
void string8_value(
521 std::string&& _string8_value);
528 RTPS_DllAPI
const std::string& string8_value()
const;
535 RTPS_DllAPI std::string& string8_value();
540 RTPS_DllAPI
void string16_value(
541 const std::wstring& _string16_value);
547 RTPS_DllAPI
void string16_value(
548 std::wstring&& _string16_value);
555 RTPS_DllAPI
const std::wstring& string16_value()
const;
562 RTPS_DllAPI std::wstring& string16_value();
568 RTPS_DllAPI
void extended_value(
575 RTPS_DllAPI
void extended_value(
598 RTPS_DllAPI
static size_t getCdrSerializedSize(
599 const AnnotationParameterValue& data,
600 size_t current_alignment = 0);
607 RTPS_DllAPI
void serialize(
608 eprosima::fastcdr::Cdr& cdr)
const;
614 RTPS_DllAPI
void deserialize(
615 eprosima::fastcdr::Cdr& cdr);
625 RTPS_DllAPI
static size_t getKeyMaxCdrSerializedSize(
626 size_t current_alignment = 0);
631 RTPS_DllAPI
static bool isKeyDefined();
637 RTPS_DllAPI
void serializeKey(
638 eprosima::fastcdr::Cdr& cdr)
const;
640 RTPS_DllAPI
bool operator ==(
641 const AnnotationParameterValue& other)
const;
651 return (m_boolean_value) ?
"true" :
"false";
653 return std::to_string(m_byte_value);
655 return std::to_string(m_int16_value);
657 return std::to_string(m_uint_16_value);
659 return std::to_string(m_int32_value);
661 return std::to_string(m_uint32_value);
663 return std::to_string(m_int64_value);
665 return std::to_string(m_uint64_value);
667 return std::to_string(m_float32_value);
669 return std::to_string(m_float64_value);
671 return std::to_string(m_float128_value);
673 return std::to_string(m_char_value);
675 return std::to_string(m_wchar_value);
677 return std::to_string(m_enumerated_value);
684 return m_string8_value;
694 const std::string& value)
700 std::string val_ = value;
701 std::transform(val_.begin(), val_.end(), val_.begin(),
704 return static_cast<char>(std::tolower(c));
706 boolean_value(val_.compare(
"0") != 0 || val_.compare(
CONST_TRUE) == 0);
711 byte_value(static_cast<uint8_t>(std::stoul(value)));
716 int16_value(static_cast<int16_t>(std::stoi(value)));
721 int32_value(static_cast<int32_t>(std::stoi(value)));
726 int64_value(static_cast<int64_t>(std::stoll(value)));
731 uint_16_value(static_cast<uint16_t>(std::stoul(value)));
736 uint32_value(static_cast<uint32_t>(std::stoul(value)));
741 uint64_value(static_cast<uint64_t>(std::stoull(value)));
746 float32_value(std::stof(value));
751 float64_value(std::stod(value));
756 float128_value(std::stold(value));
761 char_value(value.c_str()[0]);
772 string8_value(value);
783 enumerated_value(static_cast<int32_t>(std::stoul(value)));
795 bool m_boolean_value;
796 uint8_t m_byte_value;
797 int16_t m_int16_value;
798 uint16_t m_uint_16_value;
799 int32_t m_int32_value;
800 uint32_t m_uint32_value;
801 int64_t m_int64_value;
802 uint64_t m_uint64_value;
803 float m_float32_value;
804 double m_float64_value;
805 long double m_float128_value;
807 wchar_t m_wchar_value;
808 int32_t m_enumerated_value;
809 std::string m_string8_value;
810 std::wstring m_string16_value;
830 RTPS_DllAPI ~AppliedAnnotationParameter();
836 RTPS_DllAPI AppliedAnnotationParameter(
837 const AppliedAnnotationParameter& x);
843 RTPS_DllAPI AppliedAnnotationParameter(
844 AppliedAnnotationParameter&& x);
850 RTPS_DllAPI AppliedAnnotationParameter& operator =(
851 const AppliedAnnotationParameter& x);
857 RTPS_DllAPI AppliedAnnotationParameter& operator =(
858 AppliedAnnotationParameter&& x);
867 m_paramname_hash = _paramname_hash;
877 m_paramname_hash = std::move(_paramname_hash);
886 return m_paramname_hash;
895 return m_paramname_hash;
915 m_value = std::move(_value);
942 RTPS_DllAPI
static size_t getCdrSerializedSize(
943 const AppliedAnnotationParameter& data,
944 size_t current_alignment = 0);
951 RTPS_DllAPI
void serialize(
952 eprosima::fastcdr::Cdr& cdr)
const;
958 RTPS_DllAPI
void deserialize(
959 eprosima::fastcdr::Cdr& cdr);
969 RTPS_DllAPI
static size_t getKeyMaxCdrSerializedSize(
970 size_t current_alignment = 0);
975 RTPS_DllAPI
static bool isKeyDefined();
981 RTPS_DllAPI
void serializeKey(
982 eprosima::fastcdr::Cdr& cdr)
const;
984 RTPS_DllAPI
bool operator ==(
985 const AppliedAnnotationParameter& other)
const;
1045 RTPS_DllAPI ~AppliedAnnotation();
1047 RTPS_DllAPI AppliedAnnotation(
1048 const AppliedAnnotation& x);
1050 RTPS_DllAPI AppliedAnnotation(
1051 AppliedAnnotation&& x);
1052 RTPS_DllAPI AppliedAnnotation& operator =(
1053 const AppliedAnnotation& x);
1054 RTPS_DllAPI AppliedAnnotation& operator =(
1055 AppliedAnnotation&& x);
1060 m_annotation_typeid = _annotation_typeid;
1066 m_annotation_typeid = std::move(_annotation_typeid);
1071 return m_annotation_typeid;
1076 return m_annotation_typeid;
1080 const AppliedAnnotationParameterSeq& _param_seq)
1082 m_param_seq = _param_seq;
1086 AppliedAnnotationParameterSeq&& _param_seq)
1088 m_param_seq = std::move(_param_seq);
1091 inline const AppliedAnnotationParameterSeq&
param_seq()
const 1101 RTPS_DllAPI
static size_t getCdrSerializedSize(
1102 const AppliedAnnotation& data,
1103 size_t current_alignment = 0);
1104 RTPS_DllAPI
void serialize(
1105 eprosima::fastcdr::Cdr& cdr)
const;
1106 RTPS_DllAPI
void deserialize(
1107 eprosima::fastcdr::Cdr& cdr);
1108 RTPS_DllAPI
static size_t getKeyMaxCdrSerializedSize(
1109 size_t current_alignment = 0);
1110 RTPS_DllAPI
static bool isKeyDefined();
1111 RTPS_DllAPI
void serializeKey(
1112 eprosima::fastcdr::Cdr& cdr)
const;
1114 RTPS_DllAPI
bool operator ==(
1115 const AppliedAnnotation& other)
const;
1120 AppliedAnnotationParameterSeq m_param_seq;
1138 RTPS_DllAPI ~AppliedVerbatimAnnotation();
1140 RTPS_DllAPI AppliedVerbatimAnnotation(
1141 const AppliedVerbatimAnnotation& x);
1143 RTPS_DllAPI AppliedVerbatimAnnotation(
1144 AppliedVerbatimAnnotation&& x);
1146 RTPS_DllAPI AppliedVerbatimAnnotation& operator =(
1147 const AppliedVerbatimAnnotation& x);
1149 RTPS_DllAPI AppliedVerbatimAnnotation& operator =(
1150 AppliedVerbatimAnnotation&& x);
1153 const std::string& _placement)
1155 m_placement = _placement;
1159 std::string&& _placement)
1161 m_placement = std::move(_placement);
1175 const std::string& _language)
1177 m_language = _language;
1181 std::string&& _language)
1183 m_language = std::move(_language);
1197 const std::string& _text)
1203 std::string&& _text)
1205 m_text = std::move(_text);
1208 inline const std::string&
text()
const 1218 RTPS_DllAPI
static size_t getCdrSerializedSize(
1219 const AppliedVerbatimAnnotation& data,
1220 size_t current_alignment = 0);
1222 RTPS_DllAPI
void serialize(
1223 eprosima::fastcdr::Cdr& cdr)
const;
1225 RTPS_DllAPI
void deserialize(
1226 eprosima::fastcdr::Cdr& cdr);
1228 RTPS_DllAPI
static size_t getKeyMaxCdrSerializedSize(
1229 size_t current_alignment = 0);
1231 RTPS_DllAPI
static bool isKeyDefined();
1233 RTPS_DllAPI
void serializeKey(
1234 eprosima::fastcdr::Cdr& cdr)
const;
1236 RTPS_DllAPI
bool operator ==(
1237 const AppliedVerbatimAnnotation& other)
const;
1241 std::string m_placement;
1242 std::string m_language;
1260 RTPS_DllAPI ~AppliedBuiltinMemberAnnotations();
1262 RTPS_DllAPI AppliedBuiltinMemberAnnotations(
1263 const AppliedBuiltinMemberAnnotations& x);
1265 RTPS_DllAPI AppliedBuiltinMemberAnnotations(
1266 AppliedBuiltinMemberAnnotations&& x);
1268 RTPS_DllAPI AppliedBuiltinMemberAnnotations& operator =(
1269 const AppliedBuiltinMemberAnnotations& x);
1271 RTPS_DllAPI AppliedBuiltinMemberAnnotations& operator =(
1272 AppliedBuiltinMemberAnnotations&& x);
1275 const std::string& _unit)
1281 std::string&& _unit)
1283 m_unit = std::move(_unit);
1286 inline const std::string&
unit()
const 1305 m_min = std::move(_min);
1327 m_max = std::move(_max);
1341 const std::string& _hash_id)
1343 m_hash_id = _hash_id;
1347 std::string&& _hash_id)
1349 m_hash_id = std::move(_hash_id);
1362 RTPS_DllAPI
static size_t getCdrSerializedSize(
1363 const AppliedBuiltinMemberAnnotations& data,
1364 size_t current_alignment = 0);
1366 RTPS_DllAPI
void serialize(
1367 eprosima::fastcdr::Cdr& cdr)
const;
1369 RTPS_DllAPI
void deserialize(
1370 eprosima::fastcdr::Cdr& cdr);
1372 RTPS_DllAPI
static size_t getKeyMaxCdrSerializedSize(
1373 size_t current_alignment = 0);
1375 RTPS_DllAPI
static bool isKeyDefined();
1377 RTPS_DllAPI
void serializeKey(
1378 eprosima::fastcdr::Cdr& cdr)
const;
1380 RTPS_DllAPI
bool operator ==(
1381 const AppliedBuiltinMemberAnnotations& other)
const;
1388 std::string m_hash_id;
1398 #if defined(FASTDDS_RESTORE_MIN) 1399 #pragma pop_macro("min") 1400 #undef FASTDDS_RESTORE_MIN 1401 #endif // defined(FASTDDS_RESTORE_MIN) 1403 #if defined(FASTDDS_RESTORE_MAX) 1404 #pragma pop_macro("max") 1405 #undef FASTDDS_RESTORE_MAX 1406 #endif // defined(FASTDDS_RESTORE_MAX) 1408 #endif // if _MSC_VER 1410 #endif // _ANNOTATIONPARAMETERVALUE_H_ const AnnotationParameterValue & value() const
This function returns a constant reference to member value.
Definition: AnnotationParameterValue.h:922
void annotation_typeid(const TypeIdentifier &_annotation_typeid)
Definition: AnnotationParameterValue.h:1057
void param_seq(AppliedAnnotationParameterSeq &&_param_seq)
Definition: AnnotationParameterValue.h:1085
AnnotationParameterValue & min()
Definition: AnnotationParameterValue.h:1313
const std::string & text() const
Definition: AnnotationParameterValue.h:1208
const std::string CONST_TRUE
Definition: TypesBase.h:58
std::string wstring_to_bytes(const std::wstring &str)
std::string & placement()
Definition: AnnotationParameterValue.h:1169
Definition: AnnotationParameterValue.h:1132
const AnnotationParameterValue & max() const
Definition: AnnotationParameterValue.h:1330
void min(AnnotationParameterValue &&_min)
Definition: AnnotationParameterValue.h:1302
void paramname_hash(const NameHash &_paramname_hash)
This function copies the value in member paramname_hash.
Definition: AnnotationParameterValue.h:864
const AnnotationParameterValue & min() const
Definition: AnnotationParameterValue.h:1308
void min(const AnnotationParameterValue &_min)
Definition: AnnotationParameterValue.h:1296
std::string & text()
Definition: AnnotationParameterValue.h:1213
void language(std::string &&_language)
Definition: AnnotationParameterValue.h:1180
std::string & unit()
Definition: AnnotationParameterValue.h:1291
AppliedAnnotationParameterSeq & param_seq()
Definition: AnnotationParameterValue.h:1096
void paramname_hash(NameHash &&_paramname_hash)
This function moves the value in member paramname_hash.
Definition: AnnotationParameterValue.h:874
AnnotationParameterValue & max()
Definition: AnnotationParameterValue.h:1335
const NameHash & paramname_hash() const
This function returns a constant reference to member paramname_hash.
Definition: AnnotationParameterValue.h:884
void unit(std::string &&_unit)
Definition: AnnotationParameterValue.h:1280
This class represents the union AnnotationParameterValue defined by the user in the IDL file...
Definition: AnnotationParameterValue.h:165
std::string & language()
Definition: AnnotationParameterValue.h:1191
void hash_id(const std::string &_hash_id)
Definition: AnnotationParameterValue.h:1340
AnnotationParameterValue & value()
This function returns a reference to member value.
Definition: AnnotationParameterValue.h:931
Definition: AnnotationParameterValue.h:1254
eProsima namespace.
Definition: LibrarySettingsAttributes.h:23
void hash_id(std::string &&_hash_id)
Definition: AnnotationParameterValue.h:1346
const std::string & unit() const
Definition: AnnotationParameterValue.h:1286
RTPS_DllAPI void from_string(const std::string &value)
Aux method to set value from its string representation.
Definition: AnnotationParameterValue.h:693
void unit(const std::string &_unit)
Definition: AnnotationParameterValue.h:1274
std::vector< AppliedAnnotation > AppliedAnnotationSeq
Definition: AnnotationParameterValue.h:1124
std::array< uint8_t, 4 > NameHash
Definition: TypesBase.h:178
const AppliedAnnotationParameterSeq & param_seq() const
Definition: AnnotationParameterValue.h:1091
Definition: TypeIdentifier.h:80
const std::string & language() const
Definition: AnnotationParameterValue.h:1186
This class represents the structure AppliedAnnotationParameter defined by the user in the IDL file...
Definition: AnnotationParameterValue.h:818
const std::string & placement() const
Definition: AnnotationParameterValue.h:1164
void max(AnnotationParameterValue &&_max)
Definition: AnnotationParameterValue.h:1324
void language(const std::string &_language)
Definition: AnnotationParameterValue.h:1174
void placement(const std::string &_placement)
Definition: AnnotationParameterValue.h:1152
void param_seq(const AppliedAnnotationParameterSeq &_param_seq)
Definition: AnnotationParameterValue.h:1079
void value(const AnnotationParameterValue &_value)
This function copies the value in member value.
Definition: AnnotationParameterValue.h:902
const TypeIdentifier & annotation_typeid() const
Definition: AnnotationParameterValue.h:1069
void max(const AnnotationParameterValue &_max)
Definition: AnnotationParameterValue.h:1318
RTPS_DllAPI std::string to_string() const
Aux method to return value as its string representation.
Definition: AnnotationParameterValue.h:646
std::vector< AppliedAnnotationParameter > AppliedAnnotationParameterSeq
Definition: AnnotationParameterValue.h:1033
std::wstring wstring_from_bytes(const std::string &str)
void annotation_typeid(TypeIdentifier &&_annotation_typeid)
Definition: AnnotationParameterValue.h:1063
void text(std::string &&_text)
Definition: AnnotationParameterValue.h:1202
std::string & hash_id()
Definition: AnnotationParameterValue.h:1357
NameHash & paramname_hash()
This function returns a reference to member paramname_hash.
Definition: AnnotationParameterValue.h:893
Definition: AnnotationParameterValue.h:1039
TypeIdentifier & annotation_typeid()
Definition: AnnotationParameterValue.h:1074
This class represents the structure ExtendedAnnotationParameterValue defined by the user in the IDL f...
Definition: AnnotationParameterValue.h:63
void placement(std::string &&_placement)
Definition: AnnotationParameterValue.h:1158
void text(const std::string &_text)
Definition: AnnotationParameterValue.h:1196
const std::string & hash_id() const
Definition: AnnotationParameterValue.h:1352
void value(AnnotationParameterValue &&_value)
This function moves the value in member value.
Definition: AnnotationParameterValue.h:912