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) 45 #include <fastrtps/fastrtps_dll.h> 46 #include <fastrtps/types/TypeIdentifier.h> 47 #include <fastrtps/types/TypesBase.h> 48 #include <fastrtps/utils/string_convert.hpp> 106 #ifndef DOXYGEN_SHOULD_SKIP_THIS 113 FASTDDS_SER_METHOD_DEPRECATED(3,
114 "eprosima::fastrtps::types::ExtendedAnnotationParameterValue::getCdrSerializedSize()",
115 "In favor of version using eprosima::fastcdr::calculate_serialized_size.")
116 RTPS_DllAPI
static size_t getCdrSerializedSize(
118 size_t current_alignment = 0);
124 FASTDDS_SER_METHOD_DEPRECATED(3,
"eprosima::fastrtps::types::ExtendedAnnotationParameterValue::serialize()",
125 "In favor of version using eprosima::fastcdr::serialize.")
126 RTPS_DllAPI
void serialize(
127 eprosima::fastcdr::Cdr& cdr)
const;
133 FASTDDS_SER_METHOD_DEPRECATED(3,
"eprosima::fastrtps::types::ExtendedAnnotationParameterValue::deserialize()",
134 "In favor of version using eprosima::fastcdr::deserialize.")
135 RTPS_DllAPI
void deserialize(
136 eprosima::fastcdr::Cdr& cdr);
137 #endif // DOXYGEN_SHOULD_SKIP_THIS 146 size_t current_alignment = 0);
158 eprosima::fastcdr::Cdr& cdr)
const;
226 RTPS_DllAPI
char _d()
const;
232 RTPS_DllAPI
char&
_d();
239 bool _boolean_value);
259 uint8_t _byte_value);
279 int16_t _int16_value);
299 uint16_t _uint_16_value);
319 int32_t _int32_value);
339 uint32_t _uint32_value);
359 int64_t _int64_value);
380 uint64_t _uint64_value);
400 float _float32_value);
420 double _float64_value);
441 long double _float128_value);
481 wchar_t _wchar_value);
501 int32_t _enumerated_value);
521 const std::string& _string8_value);
528 std::string&& _string8_value);
548 const std::wstring& _string16_value);
555 std::wstring&& _string16_value);
599 #ifndef DOXYGEN_SHOULD_SKIP_THIS 606 FASTDDS_SER_METHOD_DEPRECATED(3,
"eprosima::fastrtps::types::AnnotationParameterValue::getCdrSerializedSize()",
607 "In favor of version using eprosima::fastcdr::calculate_serialized_size.")
608 RTPS_DllAPI
static size_t getCdrSerializedSize(
610 size_t current_alignment = 0);
616 FASTDDS_SER_METHOD_DEPRECATED(3,
"eprosima::fastrtps::types::AnnotationParameterValue::serialize()",
617 "In favor of version using eprosima::fastcdr::serialize.")
618 RTPS_DllAPI
void serialize(
619 eprosima::fastcdr::Cdr& cdr)
const;
625 FASTDDS_SER_METHOD_DEPRECATED(3,
"eprosima::fastrtps::types::AnnotationParameterValue::deserialize()",
626 "In favor of version using eprosima::fastcdr::deserialize.")
627 RTPS_DllAPI
void deserialize(
628 eprosima::fastcdr::Cdr& cdr);
629 #endif // DOXYGEN_SHOULD_SKIP_THIS 638 size_t current_alignment = 0);
650 eprosima::fastcdr::Cdr& cdr)
const;
663 return (m_boolean_value) ?
"true" :
"false";
665 return std::to_string(m_byte_value);
667 return std::to_string(m_int16_value);
669 return std::to_string(m_uint_16_value);
671 return std::to_string(m_int32_value);
673 return std::to_string(m_uint32_value);
675 return std::to_string(m_int64_value);
677 return std::to_string(m_uint64_value);
679 return std::to_string(m_float32_value);
681 return std::to_string(m_float64_value);
683 return std::to_string(m_float128_value);
685 return std::to_string(m_char_value);
687 return std::to_string(m_wchar_value);
689 return std::to_string(m_enumerated_value);
696 return m_string8_value;
706 const std::string& value)
712 std::string val_ = value;
713 std::transform(val_.begin(), val_.end(), val_.begin(),
716 return static_cast<char>(std::tolower(c));
723 byte_value(static_cast<uint8_t>(std::stoul(value)));
728 int16_value(static_cast<int16_t>(std::stoi(value)));
733 int32_value(static_cast<int32_t>(std::stoi(value)));
738 int64_value(static_cast<int64_t>(std::stoll(value)));
753 uint64_value(static_cast<uint64_t>(std::stoull(value)));
807 bool m_boolean_value;
808 uint8_t m_byte_value;
809 int16_t m_int16_value;
810 uint16_t m_uint_16_value;
811 int32_t m_int32_value;
812 uint32_t m_uint32_value;
813 int64_t m_int64_value;
814 uint64_t m_uint64_value;
815 float m_float32_value;
816 double m_float64_value;
817 long double m_float128_value;
819 wchar_t m_wchar_value;
820 int32_t m_enumerated_value;
821 std::string m_string8_value;
822 std::wstring m_string16_value;
879 m_paramname_hash = _paramname_hash;
889 m_paramname_hash = std::move(_paramname_hash);
898 return m_paramname_hash;
907 return m_paramname_hash;
927 m_value = std::move(_value);
948 #ifndef DOXYGEN_SHOULD_SKIP_THIS 955 FASTDDS_SER_METHOD_DEPRECATED(3,
"eprosima::fastrtps::types::AppliedAnnotationParameter::getCdrSerializedSize()",
956 "In favor of version using eprosima::fastcdr::calculate_serialized_size.")
957 RTPS_DllAPI static
size_t getCdrSerializedSize(
959 size_t current_alignment = 0);
966 "In favor of version using
eprosima::fastcdr::serialize.")
967 RTPS_DllAPI
void serialize(
975 "In favor of version using
eprosima::fastcdr::deserialize.")
976 RTPS_DllAPI
void deserialize(
978 #endif // DOXYGEN_SHOULD_SKIP_THIS 987 size_t current_alignment = 0);
999 eprosima::fastcdr::Cdr& cdr)
const;
1077 m_annotation_typeid = _annotation_typeid;
1083 m_annotation_typeid = std::move(_annotation_typeid);
1088 return m_annotation_typeid;
1093 return m_annotation_typeid;
1099 m_param_seq = _param_seq;
1105 m_param_seq = std::move(_param_seq);
1118 #ifndef DOXYGEN_SHOULD_SKIP_THIS 1119 FASTDDS_SER_METHOD_DEPRECATED(3,
"eprosima::fastrtps::types::AppliedAnnotation::getCdrSerializedSize()",
1120 "In favor of version using eprosima::fastcdr::calculate_serialized_size.")
1121 RTPS_DllAPI static
size_t getCdrSerializedSize(
1123 size_t current_alignment = 0);
1125 "In favor of version using
eprosima::fastcdr::serialize.")
1126 RTPS_DllAPI
void serialize(
1127 eprosima::fastcdr::Cdr& cdr) const;
1129 "In favor of version using
eprosima::fastcdr::deserialize.")
1130 RTPS_DllAPI
void deserialize(
1132 #endif // DOXYGEN_SHOULD_SKIP_THIS 1135 size_t current_alignment = 0);
1138 eprosima::fastcdr::Cdr& cdr)
const;
1179 const std::string& _placement)
1181 m_placement = _placement;
1185 std::string&& _placement)
1187 m_placement = std::move(_placement);
1201 const std::string& _language)
1203 m_language = _language;
1207 std::string&& _language)
1209 m_language = std::move(_language);
1223 const std::string& _text)
1229 std::string&& _text)
1231 m_text = std::move(_text);
1234 inline const std::string&
text()
const 1244 #ifndef DOXYGEN_SHOULD_SKIP_THIS 1245 FASTDDS_SER_METHOD_DEPRECATED(3,
"eprosima::fastrtps::types::AppliedVerbatimAnnotation::getCdrSerializedSize()",
1246 "In favor of version using eprosima::fastcdr::calculate_serialized_size.")
1247 RTPS_DllAPI static
size_t getCdrSerializedSize(
1249 size_t current_alignment = 0);
1252 "In favor of version using
eprosima::fastcdr::serialize.")
1253 RTPS_DllAPI
void serialize(
1254 eprosima::fastcdr::Cdr& cdr) const;
1257 "In favor of version using
eprosima::fastcdr::deserialize.")
1258 RTPS_DllAPI
void deserialize(
1260 #endif // DOXYGEN_SHOULD_SKIP_THIS 1263 size_t current_alignment = 0);
1268 eprosima::fastcdr::Cdr& cdr)
const;
1275 std::string m_placement;
1276 std::string m_language;
1309 const std::string& _unit)
1315 std::string&& _unit)
1317 m_unit = std::move(_unit);
1320 inline const std::string&
unit()
const 1339 m_min = std::move(_min);
1361 m_max = std::move(_max);
1375 const std::string& _hash_id)
1377 m_hash_id = _hash_id;
1381 std::string&& _hash_id)
1383 m_hash_id = std::move(_hash_id);
1396 #ifndef DOXYGEN_SHOULD_SKIP_THIS 1397 FASTDDS_SER_METHOD_DEPRECATED(3,
1398 "eprosima::fastrtps::types::AppliedBuiltinMemberAnnotations::getCdrSerializedSize()",
1399 "In favor of version using eprosima::fastcdr::calculate_serialized_size.")
1400 RTPS_DllAPI static
size_t getCdrSerializedSize(
1402 size_t current_alignment = 0);
1405 "In favor of version using
eprosima::fastcdr::serialize.")
1406 RTPS_DllAPI
void serialize(
1407 eprosima::fastcdr::Cdr& cdr) const;
1410 "In favor of version using
eprosima::fastcdr::deserialize.")
1411 RTPS_DllAPI
void deserialize(
1413 #endif // DOXYGEN_SHOULD_SKIP_THIS 1416 size_t current_alignment = 0);
1421 eprosima::fastcdr::Cdr& cdr)
const;
1431 std::string m_hash_id;
1441 #if defined(FASTDDS_RESTORE_MIN) 1442 #pragma pop_macro("min") 1443 #undef FASTDDS_RESTORE_MIN 1444 #endif // defined(FASTDDS_RESTORE_MIN) 1446 #if defined(FASTDDS_RESTORE_MAX) 1447 #pragma pop_macro("max") 1448 #undef FASTDDS_RESTORE_MAX 1449 #endif // defined(FASTDDS_RESTORE_MAX) 1451 #endif // if _MSC_VER 1453 #endif // _ANNOTATIONPARAMETERVALUE_H_ const AnnotationParameterValue & value() const
This function returns a constant reference to member value.
Definition: AnnotationParameterValue.h:934
void annotation_typeid(const TypeIdentifier &_annotation_typeid)
Definition: AnnotationParameterValue.h:1074
void param_seq(AppliedAnnotationParameterSeq &&_param_seq)
Definition: AnnotationParameterValue.h:1102
const octet TK_UINT16
Definition: TypesBase.h:128
RTPS_DllAPI ~AnnotationParameterValue()
Default destructor.
static RTPS_DllAPI size_t getKeyMaxCdrSerializedSize(size_t current_alignment=0)
This function returns the maximum serialized size of the Key of an object depending on the buffer ali...
AnnotationParameterValue & min()
Definition: AnnotationParameterValue.h:1347
const std::string & text() const
Definition: AnnotationParameterValue.h:1234
static RTPS_DllAPI size_t getKeyMaxCdrSerializedSize(size_t current_alignment=0)
This function returns the maximum serialized size of the Key of an object depending on the buffer ali...
const std::string CONST_TRUE
Definition: TypesBase.h:59
RTPS_DllAPI void serializeKey(eprosima::fastcdr::Cdr &cdr) const
This function serializes the key members of an object using CDR serialization.
static RTPS_DllAPI bool isKeyDefined()
This function tells you if the Key has been defined for this type.
const octet TK_CHAR8
Definition: TypesBase.h:134
RTPS_DllAPI AppliedAnnotation()
RTPS_DllAPI AppliedVerbatimAnnotation()
RTPS_DllAPI ExtendedAnnotationParameterValue()
Default constructor.
RTPS_DllAPI AppliedBuiltinMemberAnnotations & operator=(const AppliedBuiltinMemberAnnotations &x)
RTPS_DllAPI const std::string & string8_value() const
This function returns a constant reference to member string8_value.
RTPS_DllAPI ~ExtendedAnnotationParameterValue()
Default destructor.
std::string wstring_to_bytes(const std::wstring &str)
const octet TK_FLOAT64
Definition: TypesBase.h:132
std::string & placement()
Definition: AnnotationParameterValue.h:1195
Definition: AnnotationParameterValue.h:1158
const AnnotationParameterValue & max() const
Definition: AnnotationParameterValue.h:1364
static RTPS_DllAPI bool isKeyDefined()
This function tells you if the Key has been defined for this type.
void min(AnnotationParameterValue &&_min)
Definition: AnnotationParameterValue.h:1336
void paramname_hash(const NameHash &_paramname_hash)
This function copies the value in member paramname_hash.
Definition: AnnotationParameterValue.h:876
const octet TK_STRING16
Definition: TypesBase.h:139
const AnnotationParameterValue & min() const
Definition: AnnotationParameterValue.h:1342
RTPS_DllAPI char _d() const
This function returns the value of the discriminator.
RTPS_DllAPI ExtendedAnnotationParameterValue & operator=(const ExtendedAnnotationParameterValue &x)
Copy assignment.
void min(const AnnotationParameterValue &_min)
Definition: AnnotationParameterValue.h:1330
const octet TK_INT64
Definition: TypesBase.h:127
const octet TK_CHAR16
Definition: TypesBase.h:135
RTPS_DllAPI uint16_t uint_16_value() const
This function returns the value of member uint_16_value.
std::string & text()
Definition: AnnotationParameterValue.h:1239
void language(std::string &&_language)
Definition: AnnotationParameterValue.h:1206
std::string & unit()
Definition: AnnotationParameterValue.h:1325
AppliedAnnotationParameterSeq & param_seq()
Definition: AnnotationParameterValue.h:1113
RTPS_DllAPI ~AppliedAnnotationParameter()
Default destructor.
RTPS_DllAPI uint32_t uint32_value() const
This function returns the value of member uint32_value.
void paramname_hash(NameHash &&_paramname_hash)
This function moves the value in member paramname_hash.
Definition: AnnotationParameterValue.h:886
AnnotationParameterValue & max()
Definition: AnnotationParameterValue.h:1369
const NameHash & paramname_hash() const
This function returns a constant reference to member paramname_hash.
Definition: AnnotationParameterValue.h:896
RTPS_DllAPI void serializeKey(eprosima::fastcdr::Cdr &cdr) const
RTPS_DllAPI int32_t enumerated_value() const
This function returns the value of member enumerated_value.
const octet TK_BYTE
Definition: TypesBase.h:124
static RTPS_DllAPI size_t getKeyMaxCdrSerializedSize(size_t current_alignment=0)
This function returns the maximum serialized size of the Key of an object depending on the buffer ali...
void unit(std::string &&_unit)
Definition: AnnotationParameterValue.h:1314
RTPS_DllAPI AppliedAnnotationParameter()
Default constructor.
This class represents the union AnnotationParameterValue defined by the user in the IDL file...
Definition: AnnotationParameterValue.h:172
static RTPS_DllAPI bool isKeyDefined()
RTPS_DllAPI uint8_t byte_value() const
This function returns the value of member byte_value.
std::string & language()
Definition: AnnotationParameterValue.h:1217
void hash_id(const std::string &_hash_id)
Definition: AnnotationParameterValue.h:1374
RTPS_DllAPI bool operator==(const AppliedVerbatimAnnotation &other) const
RTPS_DllAPI bool operator==(const AppliedBuiltinMemberAnnotations &other) const
const octet TK_INT32
Definition: TypesBase.h:126
AnnotationParameterValue & value()
This function returns a reference to member value.
Definition: AnnotationParameterValue.h:943
RTPS_DllAPI ~AppliedAnnotation()
RTPS_DllAPI ~AppliedVerbatimAnnotation()
Definition: AnnotationParameterValue.h:1288
RTPS_DllAPI float float32_value() const
This function returns the value of member float32_value.
static RTPS_DllAPI bool isKeyDefined()
eProsima namespace.
Definition: LibrarySettingsAttributes.h:23
static RTPS_DllAPI bool isKeyDefined()
RTPS_DllAPI double float64_value() const
This function returns the value of member float64_value.
void hash_id(std::string &&_hash_id)
Definition: AnnotationParameterValue.h:1380
const octet TK_INT16
Definition: TypesBase.h:125
RTPS_DllAPI bool operator==(const AppliedAnnotationParameter &other) const
RTPS_DllAPI ~AppliedBuiltinMemberAnnotations()
const std::string & unit() const
Definition: AnnotationParameterValue.h:1320
static RTPS_DllAPI size_t getKeyMaxCdrSerializedSize(size_t current_alignment=0)
const octet TK_FLOAT32
Definition: TypesBase.h:131
RTPS_DllAPI void from_string(const std::string &value)
Aux method to set value from its string representation.
Definition: AnnotationParameterValue.h:705
RTPS_DllAPI int32_t int32_value() const
This function returns the value of member int32_value.
RTPS_DllAPI AppliedVerbatimAnnotation & operator=(const AppliedVerbatimAnnotation &x)
void unit(const std::string &_unit)
Definition: AnnotationParameterValue.h:1308
const octet TK_BOOLEAN
Definition: TypesBase.h:123
const octet TK_STRING8
Definition: TypesBase.h:138
RTPS_DllAPI int16_t int16_value() const
This function returns the value of member int16_value.
RTPS_DllAPI wchar_t wchar_value() const
This function returns the value of member wchar_value.
RTPS_DllAPI const ExtendedAnnotationParameterValue & extended_value() const
This function returns a constant reference to member extended_value.
const octet TK_UINT32
Definition: TypesBase.h:129
std::vector< AppliedAnnotation > AppliedAnnotationSeq
Definition: AnnotationParameterValue.h:1150
std::array< uint8_t, 4 > NameHash
Definition: TypesBase.h:179
const AppliedAnnotationParameterSeq & param_seq() const
Definition: AnnotationParameterValue.h:1108
RTPS_DllAPI bool boolean_value() const
This function returns the value of member boolean_value.
const octet TK_UINT64
Definition: TypesBase.h:130
RTPS_DllAPI void serializeKey(eprosima::fastcdr::Cdr &cdr) const
This function serializes the key members of an object using CDR serialization.
Definition: TypeIdentifier.h:80
RTPS_DllAPI bool operator==(const AnnotationParameterValue &other) const
const std::string & language() const
Definition: AnnotationParameterValue.h:1212
This class represents the structure AppliedAnnotationParameter defined by the user in the IDL file...
Definition: AnnotationParameterValue.h:830
RTPS_DllAPI int64_t int64_value() const
This function returns the value of member int64_value.
RTPS_DllAPI AnnotationParameterValue & operator=(const AnnotationParameterValue &x)
Copy assignment.
const std::string & placement() const
Definition: AnnotationParameterValue.h:1190
void max(AnnotationParameterValue &&_max)
Definition: AnnotationParameterValue.h:1358
void language(const std::string &_language)
Definition: AnnotationParameterValue.h:1200
RTPS_DllAPI AppliedBuiltinMemberAnnotations()
void placement(const std::string &_placement)
Definition: AnnotationParameterValue.h:1178
RTPS_DllAPI long double float128_value() const
This function returns the value of member float128_value.
RTPS_DllAPI bool operator==(const ExtendedAnnotationParameterValue &) const
Definition: AnnotationParameterValue.h:160
void param_seq(const AppliedAnnotationParameterSeq &_param_seq)
Definition: AnnotationParameterValue.h:1096
void value(const AnnotationParameterValue &_value)
This function copies the value in member value.
Definition: AnnotationParameterValue.h:914
RTPS_DllAPI bool operator==(const AppliedAnnotation &other) const
const TypeIdentifier & annotation_typeid() const
Definition: AnnotationParameterValue.h:1086
static RTPS_DllAPI size_t getKeyMaxCdrSerializedSize(size_t current_alignment=0)
void max(const AnnotationParameterValue &_max)
Definition: AnnotationParameterValue.h:1352
RTPS_DllAPI uint64_t uint64_value() const
This function returns the value of member uint64_value.
RTPS_DllAPI void serializeKey(eprosima::fastcdr::Cdr &cdr) const
static RTPS_DllAPI size_t getKeyMaxCdrSerializedSize(size_t current_alignment=0)
RTPS_DllAPI std::string to_string() const
Aux method to return value as its string representation.
Definition: AnnotationParameterValue.h:658
RTPS_DllAPI void serializeKey(eprosima::fastcdr::Cdr &cdr) const
This function serializes the key members of an object using CDR serialization.
std::vector< AppliedAnnotationParameter > AppliedAnnotationParameterSeq
Definition: AnnotationParameterValue.h:1050
RTPS_DllAPI AppliedAnnotation & operator=(const AppliedAnnotation &x)
std::wstring wstring_from_bytes(const std::string &str)
void annotation_typeid(TypeIdentifier &&_annotation_typeid)
Definition: AnnotationParameterValue.h:1080
void text(std::string &&_text)
Definition: AnnotationParameterValue.h:1228
const octet TK_NONE
Definition: TypesBase.h:122
std::string & hash_id()
Definition: AnnotationParameterValue.h:1391
RTPS_DllAPI AnnotationParameterValue()
Default constructor.
NameHash & paramname_hash()
This function returns a reference to member paramname_hash.
Definition: AnnotationParameterValue.h:905
RTPS_DllAPI AppliedAnnotationParameter & operator=(const AppliedAnnotationParameter &x)
Copy assignment.
Definition: AnnotationParameterValue.h:1056
RTPS_DllAPI char char_value() const
This function returns the value of member char_value.
TypeIdentifier & annotation_typeid()
Definition: AnnotationParameterValue.h:1091
RTPS_DllAPI const std::wstring & string16_value() const
This function returns a constant reference to member string16_value.
This class represents the structure ExtendedAnnotationParameterValue defined by the user in the IDL f...
Definition: AnnotationParameterValue.h:64
void placement(std::string &&_placement)
Definition: AnnotationParameterValue.h:1184
const octet TK_FLOAT128
Definition: TypesBase.h:133
static RTPS_DllAPI bool isKeyDefined()
This function tells you if the Key has been defined for this type.
const octet TK_ENUM
Definition: TypesBase.h:146
RTPS_DllAPI void serializeKey(eprosima::fastcdr::Cdr &cdr) const
void text(const std::string &_text)
Definition: AnnotationParameterValue.h:1222
const std::string & hash_id() const
Definition: AnnotationParameterValue.h:1386
void value(AnnotationParameterValue &&_value)
This function moves the value in member value.
Definition: AnnotationParameterValue.h:924