 |
FastRTPS
Version 2.11.2
FastRTPS
|
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>
112 size_t current_alignment = 0);
120 eprosima::fastcdr::Cdr& cdr)
const;
127 eprosima::fastcdr::Cdr& cdr);
138 size_t current_alignment = 0);
150 eprosima::fastcdr::Cdr& cdr)
const;
217 RTPS_DllAPI
char _d()
const;
223 RTPS_DllAPI
char&
_d();
230 bool _boolean_value);
250 uint8_t _byte_value);
270 int16_t _int16_value);
290 uint16_t _uint_16_value);
310 int32_t _int32_value);
330 uint32_t _uint32_value);
350 int64_t _int64_value);
371 uint64_t _uint64_value);
391 float _float32_value);
411 double _float64_value);
432 long double _float128_value);
472 wchar_t _wchar_value);
492 int32_t _enumerated_value);
512 const std::string& _string8_value);
519 std::string&& _string8_value);
539 const std::wstring& _string16_value);
546 std::wstring&& _string16_value);
598 size_t current_alignment = 0);
606 eprosima::fastcdr::Cdr& cdr)
const;
613 eprosima::fastcdr::Cdr& cdr);
624 size_t current_alignment = 0);
636 eprosima::fastcdr::Cdr& cdr)
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));
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)));
739 uint64_value(
static_cast<uint64_t
>(std::stoull(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;
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);
941 size_t current_alignment = 0);
949 eprosima::fastcdr::Cdr& cdr)
const;
956 eprosima::fastcdr::Cdr& cdr);
967 size_t current_alignment = 0);
979 eprosima::fastcdr::Cdr& cdr)
const;
1057 m_annotation_typeid = _annotation_typeid;
1063 m_annotation_typeid = std::move(_annotation_typeid);
1068 return m_annotation_typeid;
1073 return m_annotation_typeid;
1079 m_param_seq = _param_seq;
1085 m_param_seq = std::move(_param_seq);
1100 size_t current_alignment = 0);
1102 eprosima::fastcdr::Cdr& cdr)
const;
1104 eprosima::fastcdr::Cdr& cdr);
1106 size_t current_alignment = 0);
1109 eprosima::fastcdr::Cdr& cdr)
const;
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
1217 size_t current_alignment = 0);
1220 eprosima::fastcdr::Cdr& cdr)
const;
1223 eprosima::fastcdr::Cdr& cdr);
1226 size_t current_alignment = 0);
1231 eprosima::fastcdr::Cdr& cdr)
const;
1238 std::string m_placement;
1239 std::string m_language;
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);
1361 size_t current_alignment = 0);
1364 eprosima::fastcdr::Cdr& cdr)
const;
1367 eprosima::fastcdr::Cdr& cdr);
1370 size_t current_alignment = 0);
1375 eprosima::fastcdr::Cdr& cdr)
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_
RTPS_DllAPI void serializeKey(eprosima::fastcdr::Cdr &cdr) const
static RTPS_DllAPI bool isKeyDefined()
std::array< uint8_t, 4 > NameHash
Definition: TypesBase.h:178
RTPS_DllAPI char _d() const
This function returns the value of the discriminator.
const AnnotationParameterValue & max() const
Definition: AnnotationParameterValue.h:1327
const octet TK_BOOLEAN
Definition: TypesBase.h:122
RTPS_DllAPI void serialize(eprosima::fastcdr::Cdr &cdr) const
RTPS_DllAPI ~AppliedAnnotationParameter()
Default destructor.
std::string wstring_to_bytes(const std::wstring &str)
void max(const AnnotationParameterValue &_max)
Definition: AnnotationParameterValue.h:1315
RTPS_DllAPI double float64_value() const
This function returns the value of member float64_value.
void min(AnnotationParameterValue &&_min)
Definition: AnnotationParameterValue.h:1299
const AnnotationParameterValue & min() const
Definition: AnnotationParameterValue.h:1305
RTPS_DllAPI void serialize(eprosima::fastcdr::Cdr &cdr) const
This function serializes an object using CDR serialization.
const RTPS_DllAPI ExtendedAnnotationParameterValue & extended_value() const
This function returns a constant reference to member extended_value.
RTPS_DllAPI AppliedVerbatimAnnotation()
const octet TK_CHAR8
Definition: TypesBase.h:133
RTPS_DllAPI void serialize(eprosima::fastcdr::Cdr &cdr) const
std::wstring wstring_from_bytes(const std::string &str)
const octet TK_CHAR16
Definition: TypesBase.h:134
RTPS_DllAPI AppliedAnnotation()
void hash_id(std::string &&_hash_id)
Definition: AnnotationParameterValue.h:1343
RTPS_DllAPI void serializeKey(eprosima::fastcdr::Cdr &cdr) const
This function serializes the key members of an object using CDR serialization.
const std::string & hash_id() const
Definition: AnnotationParameterValue.h:1349
RTPS_DllAPI void deserialize(eprosima::fastcdr::Cdr &cdr)
This function deserializes an object using CDR serialization.
static RTPS_DllAPI bool isKeyDefined()
This function tells you if the Key has been defined for this type.
const std::string CONST_TRUE
Definition: TypesBase.h:58
std::string & text()
Definition: AnnotationParameterValue.h:1210
RTPS_DllAPI char char_value() const
This function returns the value of member char_value.
This class represents the structure ExtendedAnnotationParameterValue defined by the user in the IDL f...
Definition: AnnotationParameterValue.h:62
void text(const std::string &_text)
Definition: AnnotationParameterValue.h:1193
RTPS_DllAPI void deserialize(eprosima::fastcdr::Cdr &cdr)
const AppliedAnnotationParameterSeq & param_seq() const
Definition: AnnotationParameterValue.h:1088
RTPS_DllAPI uint8_t byte_value() const
This function returns the value of member byte_value.
RTPS_DllAPI wchar_t wchar_value() const
This function returns the value of member wchar_value.
RTPS_DllAPI void serializeKey(eprosima::fastcdr::Cdr &cdr) const
const std::string & unit() const
Definition: AnnotationParameterValue.h:1283
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...
RTPS_DllAPI bool operator==(const AppliedAnnotation &other) const
std::string & hash_id()
Definition: AnnotationParameterValue.h:1354
const octet TK_BYTE
Definition: TypesBase.h:123
void annotation_typeid(const TypeIdentifier &_annotation_typeid)
Definition: AnnotationParameterValue.h:1054
RTPS_DllAPI uint32_t uint32_value() const
This function returns the value of member uint32_value.
RTPS_DllAPI bool operator==(const AppliedBuiltinMemberAnnotations &other) const
void language(const std::string &_language)
Definition: AnnotationParameterValue.h:1171
const octet TK_INT64
Definition: TypesBase.h:126
RTPS_DllAPI bool operator==(const AppliedAnnotationParameter &other) const
Definition: TypeIdentifier.h:80
This class represents the union AnnotationParameterValue defined by the user in the IDL file.
Definition: AnnotationParameterValue.h:163
Definition: AnnotationParameterValue.h:1036
AnnotationParameterValue & min()
Definition: AnnotationParameterValue.h:1310
RTPS_DllAPI AppliedAnnotationParameter()
Default constructor.
const TypeIdentifier & annotation_typeid() const
Definition: AnnotationParameterValue.h:1066
const octet TK_FLOAT128
Definition: TypesBase.h:132
void max(AnnotationParameterValue &&_max)
Definition: AnnotationParameterValue.h:1321
std::string & language()
Definition: AnnotationParameterValue.h:1188
const std::string & placement() const
Definition: AnnotationParameterValue.h:1161
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:1030
RTPS_DllAPI void serialize(eprosima::fastcdr::Cdr &cdr) const
This function serializes an object using CDR serialization.
RTPS_DllAPI ~AppliedAnnotation()
const octet TK_UINT16
Definition: TypesBase.h:127
const std::string & text() const
Definition: AnnotationParameterValue.h:1205
RTPS_DllAPI ExtendedAnnotationParameterValue()
Default constructor.
static RTPS_DllAPI size_t getCdrSerializedSize(const AppliedBuiltinMemberAnnotations &data, size_t current_alignment=0)
static RTPS_DllAPI size_t getCdrSerializedSize(const AnnotationParameterValue &data, size_t current_alignment=0)
This function returns the serialized size of a data depending on the buffer alignment.
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 octet TK_NONE
Definition: TypesBase.h:121
const RTPS_DllAPI std::wstring & string16_value() const
This function returns a constant reference to member string16_value.
void param_seq(const AppliedAnnotationParameterSeq &_param_seq)
Definition: AnnotationParameterValue.h:1076
void language(std::string &&_language)
Definition: AnnotationParameterValue.h:1177
RTPS_DllAPI AppliedBuiltinMemberAnnotations()
AnnotationParameterValue & value()
This function returns a reference to member value.
Definition: AnnotationParameterValue.h:928
const octet TK_STRING8
Definition: TypesBase.h:137
RTPS_DllAPI std::string to_string() const
Aux method to return value as its string representation.
Definition: AnnotationParameterValue.h:644
const octet TK_INT32
Definition: TypesBase.h:125
RTPS_DllAPI bool operator==(const AnnotationParameterValue &other) const
void paramname_hash(NameHash &&_paramname_hash)
This function moves the value in member paramname_hash.
Definition: AnnotationParameterValue.h:871
RTPS_DllAPI void from_string(const std::string &value)
Aux method to set value from its string representation.
Definition: AnnotationParameterValue.h:691
const NameHash & paramname_hash() const
This function returns a constant reference to member paramname_hash.
Definition: AnnotationParameterValue.h:881
const RTPS_DllAPI std::string & string8_value() const
This function returns a constant reference to member string8_value.
void value(AnnotationParameterValue &&_value)
This function moves the value in member value.
Definition: AnnotationParameterValue.h:909
std::string & unit()
Definition: AnnotationParameterValue.h:1288
static RTPS_DllAPI bool isKeyDefined()
RTPS_DllAPI float float32_value() const
This function returns the value of member float32_value.
RTPS_DllAPI long double float128_value() const
This function returns the value of member float128_value.
static RTPS_DllAPI size_t getCdrSerializedSize(const ExtendedAnnotationParameterValue &data, size_t current_alignment=0)
This function returns the serialized size of a data depending on the buffer alignment.
RTPS_DllAPI void deserialize(eprosima::fastcdr::Cdr &cdr)
void unit(const std::string &_unit)
Definition: AnnotationParameterValue.h:1271
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 param_seq(AppliedAnnotationParameterSeq &&_param_seq)
Definition: AnnotationParameterValue.h:1082
RTPS_DllAPI bool operator==(const AppliedVerbatimAnnotation &other) const
RTPS_DllAPI ~ExtendedAnnotationParameterValue()
Default destructor.
void unit(std::string &&_unit)
Definition: AnnotationParameterValue.h:1277
RTPS_DllAPI void deserialize(eprosima::fastcdr::Cdr &cdr)
This function deserializes an object using CDR serialization.
const std::string & language() const
Definition: AnnotationParameterValue.h:1183
void paramname_hash(const NameHash &_paramname_hash)
This function copies the value in member paramname_hash.
Definition: AnnotationParameterValue.h:861
Definition: AnnotationParameterValue.h:1251
RTPS_DllAPI AppliedVerbatimAnnotation & operator=(const AppliedVerbatimAnnotation &x)
RTPS_DllAPI void serializeKey(eprosima::fastcdr::Cdr &cdr) const
This function serializes the key members of an object using CDR serialization.
std::string & placement()
Definition: AnnotationParameterValue.h:1166
void annotation_typeid(TypeIdentifier &&_annotation_typeid)
Definition: AnnotationParameterValue.h:1060
RTPS_DllAPI AnnotationParameterValue()
Default constructor.
static RTPS_DllAPI size_t getKeyMaxCdrSerializedSize(size_t current_alignment=0)
RTPS_DllAPI int32_t enumerated_value() const
This function returns the value of member enumerated_value.
const octet TK_INT16
Definition: TypesBase.h:124
Definition: AnnotationParameterValue.h:1129
RTPS_DllAPI void serialize(eprosima::fastcdr::Cdr &cdr) const
RTPS_DllAPI AppliedAnnotation & operator=(const AppliedAnnotation &x)
RTPS_DllAPI ExtendedAnnotationParameterValue & operator=(const ExtendedAnnotationParameterValue &x)
Copy assignment.
void hash_id(const std::string &_hash_id)
Definition: AnnotationParameterValue.h:1337
RTPS_DllAPI int16_t int16_value() const
This function returns the value of member int16_value.
RTPS_DllAPI ~AppliedVerbatimAnnotation()
static RTPS_DllAPI size_t getCdrSerializedSize(const AppliedVerbatimAnnotation &data, size_t current_alignment=0)
RTPS_DllAPI uint16_t uint_16_value() const
This function returns the value of member uint_16_value.
void min(const AnnotationParameterValue &_min)
Definition: AnnotationParameterValue.h:1293
RTPS_DllAPI void serialize(eprosima::fastcdr::Cdr &cdr) const
This function serializes an object using CDR serialization.
RTPS_DllAPI int64_t int64_value() const
This function returns the value of member int64_value.
static RTPS_DllAPI size_t getKeyMaxCdrSerializedSize(size_t current_alignment=0)
RTPS_DllAPI void deserialize(eprosima::fastcdr::Cdr &cdr)
void value(const AnnotationParameterValue &_value)
This function copies the value in member value.
Definition: AnnotationParameterValue.h:899
static RTPS_DllAPI bool isKeyDefined()
RTPS_DllAPI bool operator==(const ExtendedAnnotationParameterValue &) const
Definition: AnnotationParameterValue.h:152
RTPS_DllAPI ~AppliedBuiltinMemberAnnotations()
const AnnotationParameterValue & value() const
This function returns a constant reference to member value.
Definition: AnnotationParameterValue.h:919
RTPS_DllAPI void serializeKey(eprosima::fastcdr::Cdr &cdr) const
const octet TK_FLOAT32
Definition: TypesBase.h:130
void placement(const std::string &_placement)
Definition: AnnotationParameterValue.h:1149
RTPS_DllAPI int32_t int32_value() const
This function returns the value of member int32_value.
This class represents the structure AppliedAnnotationParameter defined by the user in the IDL file.
Definition: AnnotationParameterValue.h:815
const octet TK_FLOAT64
Definition: TypesBase.h:131
AppliedAnnotationParameterSeq & param_seq()
Definition: AnnotationParameterValue.h:1093
RTPS_DllAPI AppliedBuiltinMemberAnnotations & operator=(const AppliedBuiltinMemberAnnotations &x)
static RTPS_DllAPI bool isKeyDefined()
This function tells you if the Key has been defined for this type.
void text(std::string &&_text)
Definition: AnnotationParameterValue.h:1199
NameHash & paramname_hash()
This function returns a reference to member paramname_hash.
Definition: AnnotationParameterValue.h:890
RTPS_DllAPI bool boolean_value() const
This function returns the value of member boolean_value.
static RTPS_DllAPI size_t getCdrSerializedSize(const AppliedAnnotation &data, size_t current_alignment=0)
TypeIdentifier & annotation_typeid()
Definition: AnnotationParameterValue.h:1071
RTPS_DllAPI ~AnnotationParameterValue()
Default destructor.
RTPS_DllAPI void deserialize(eprosima::fastcdr::Cdr &cdr)
This function deserializes an object using CDR serialization.
const octet TK_UINT32
Definition: TypesBase.h:128
static RTPS_DllAPI size_t getCdrSerializedSize(const AppliedAnnotationParameter &data, size_t current_alignment=0)
This function returns the serialized size of a data depending on the buffer alignment.
static RTPS_DllAPI size_t getKeyMaxCdrSerializedSize(size_t current_alignment=0)
Definition: LibrarySettingsAttributes.h:23
RTPS_DllAPI AppliedAnnotationParameter & operator=(const AppliedAnnotationParameter &x)
Copy assignment.
RTPS_DllAPI AnnotationParameterValue & operator=(const AnnotationParameterValue &x)
Copy assignment.
AnnotationParameterValue & max()
Definition: AnnotationParameterValue.h:1332
std::vector< AppliedAnnotation > AppliedAnnotationSeq
Definition: AnnotationParameterValue.h:1121
static RTPS_DllAPI bool isKeyDefined()
This function tells you if the Key has been defined for this type.
const octet TK_STRING16
Definition: TypesBase.h:138
RTPS_DllAPI uint64_t uint64_value() const
This function returns the value of member uint64_value.
const octet TK_UINT64
Definition: TypesBase.h:129
const octet TK_ENUM
Definition: TypesBase.h:145
void placement(std::string &&_placement)
Definition: AnnotationParameterValue.h:1155