Fast RTPS  Version 2.11.2
Fast RTPS
Loading...
Searching...
No Matches
AnnotationParameterValue.h
1// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
22#ifndef _ANNOTATIONPARAMETERVALUE_H_
23#define _ANNOTATIONPARAMETERVALUE_H_
24
25#if _MSC_VER
26
27#if defined(max)
28#pragma push_macro("max")
29#undef max
30#define FASTDDS_RESTORE_MAX
31#endif // defined(max)
32
33#if defined(min)
34#pragma push_macro("min")
35#undef min
36#define FASTDDS_RESTORE_MIN
37#endif // defined(min)
38
39#endif // if _MSC_VER
40
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>
45#include <stdint.h>
46#include <array>
47#include <vector>
48
49namespace eprosima {
50namespace fastcdr {
51class Cdr;
52} // namespace fastcdr
53} // namespace eprosima
54namespace eprosima {
55namespace fastrtps {
56
57namespace types {
58
63{
64public:
65
70
75
82
89
96
103
110 RTPS_DllAPI static size_t getCdrSerializedSize(
112 size_t current_alignment = 0);
113
114
119 RTPS_DllAPI void serialize(
120 eprosima::fastcdr::Cdr& cdr) const;
121
126 RTPS_DllAPI void deserialize(
127 eprosima::fastcdr::Cdr& cdr);
128
129
130
137 RTPS_DllAPI static size_t getKeyMaxCdrSerializedSize(
138 size_t current_alignment = 0);
139
143 RTPS_DllAPI static bool isKeyDefined();
144
149 RTPS_DllAPI void serializeKey(
150 eprosima::fastcdr::Cdr& cdr) const;
151
152 RTPS_DllAPI bool operator ==(
154 {
155 return true;
156 }
157
158private:
159};
164{
165public:
166
171
176
182 const AnnotationParameterValue& x);
183
190
196 const AnnotationParameterValue& x);
197
204
210 RTPS_DllAPI void _d(
211 char __d);
212
217 RTPS_DllAPI char _d() const;
218
223 RTPS_DllAPI char& _d();
224
229 RTPS_DllAPI void boolean_value(
230 bool _boolean_value);
231
237 RTPS_DllAPI bool boolean_value() const;
238
244 RTPS_DllAPI bool& boolean_value();
249 RTPS_DllAPI void byte_value(
250 uint8_t _byte_value);
251
257 RTPS_DllAPI uint8_t byte_value() const;
258
264 RTPS_DllAPI uint8_t& byte_value();
269 RTPS_DllAPI void int16_value(
270 int16_t _int16_value);
271
277 RTPS_DllAPI int16_t int16_value() const;
278
284 RTPS_DllAPI int16_t& int16_value();
289 RTPS_DllAPI void uint_16_value(
290 uint16_t _uint_16_value);
291
297 RTPS_DllAPI uint16_t uint_16_value() const;
298
304 RTPS_DllAPI uint16_t& uint_16_value();
309 RTPS_DllAPI void int32_value(
310 int32_t _int32_value);
311
317 RTPS_DllAPI int32_t int32_value() const;
318
324 RTPS_DllAPI int32_t& int32_value();
329 RTPS_DllAPI void uint32_value(
330 uint32_t _uint32_value);
331
337 RTPS_DllAPI uint32_t uint32_value() const;
338
344 RTPS_DllAPI uint32_t& uint32_value();
349 RTPS_DllAPI void int64_value(
350 int64_t _int64_value);
351
357 RTPS_DllAPI int64_t int64_value() const;
358
364 RTPS_DllAPI int64_t& int64_value();
365
370 RTPS_DllAPI void uint64_value(
371 uint64_t _uint64_value);
372
378 RTPS_DllAPI uint64_t uint64_value() const;
379
385 RTPS_DllAPI uint64_t& uint64_value();
390 RTPS_DllAPI void float32_value(
391 float _float32_value);
392
398 RTPS_DllAPI float float32_value() const;
399
405 RTPS_DllAPI float& float32_value();
410 RTPS_DllAPI void float64_value(
411 double _float64_value);
412
418 RTPS_DllAPI double float64_value() const;
419
425 RTPS_DllAPI double& float64_value();
426
431 RTPS_DllAPI void float128_value(
432 long double _float128_value);
433
439 RTPS_DllAPI long double float128_value() const;
440
446 RTPS_DllAPI long double& float128_value();
451 RTPS_DllAPI void char_value(
452 char _char_value);
453
459 RTPS_DllAPI char char_value() const;
460
466 RTPS_DllAPI char& char_value();
471 RTPS_DllAPI void wchar_value(
472 wchar_t _wchar_value);
473
479 RTPS_DllAPI wchar_t wchar_value() const;
480
486 RTPS_DllAPI wchar_t& wchar_value();
491 RTPS_DllAPI void enumerated_value(
492 int32_t _enumerated_value);
493
499 RTPS_DllAPI int32_t enumerated_value() const;
500
506 RTPS_DllAPI int32_t& enumerated_value();
511 RTPS_DllAPI void string8_value(
512 const std::string& _string8_value);
513
518 RTPS_DllAPI void string8_value(
519 std::string&& _string8_value);
520
526 RTPS_DllAPI const std::string& string8_value() const;
527
533 RTPS_DllAPI std::string& string8_value();
538 RTPS_DllAPI void string16_value(
539 const std::wstring& _string16_value);
540
545 RTPS_DllAPI void string16_value(
546 std::wstring&& _string16_value);
547
553 RTPS_DllAPI const std::wstring& string16_value() const;
554
560 RTPS_DllAPI std::wstring& string16_value();
561
566 RTPS_DllAPI void extended_value(
567 const ExtendedAnnotationParameterValue& _extended_value);
568
573 RTPS_DllAPI void extended_value(
574 ExtendedAnnotationParameterValue&& _extended_value);
575
582
589
596 RTPS_DllAPI static size_t getCdrSerializedSize(
597 const AnnotationParameterValue& data,
598 size_t current_alignment = 0);
599
600
605 RTPS_DllAPI void serialize(
606 eprosima::fastcdr::Cdr& cdr) const;
607
612 RTPS_DllAPI void deserialize(
613 eprosima::fastcdr::Cdr& cdr);
614
615
616
623 RTPS_DllAPI static size_t getKeyMaxCdrSerializedSize(
624 size_t current_alignment = 0);
625
629 RTPS_DllAPI static bool isKeyDefined();
630
635 RTPS_DllAPI void serializeKey(
636 eprosima::fastcdr::Cdr& cdr) const;
637
638 RTPS_DllAPI bool operator ==(
639 const AnnotationParameterValue& other) const;
640
644 RTPS_DllAPI std::string to_string() const
645 {
646 switch (m__d)
647 {
648 case TK_BOOLEAN:
649 return (m_boolean_value) ? "true" : "false";
650 case TK_BYTE:
651 return std::to_string(m_byte_value);
652 case TK_INT16:
653 return std::to_string(m_int16_value);
654 case TK_UINT16:
655 return std::to_string(m_uint_16_value);
656 case TK_INT32:
657 return std::to_string(m_int32_value);
658 case TK_UINT32:
659 return std::to_string(m_uint32_value);
660 case TK_INT64:
661 return std::to_string(m_int64_value);
662 case TK_UINT64:
663 return std::to_string(m_uint64_value);
664 case TK_FLOAT32:
665 return std::to_string(m_float32_value);
666 case TK_FLOAT64:
667 return std::to_string(m_float64_value);
668 case TK_FLOAT128:
669 return std::to_string(m_float128_value);
670 case TK_CHAR8:
671 return std::to_string(m_char_value);
672 case TK_CHAR16:
673 return std::to_string(m_wchar_value);
674 case TK_ENUM:
675 return std::to_string(m_enumerated_value);
676 case TK_STRING16:
677 {
678 return wstring_to_bytes(m_string16_value);
679 }
680 case TK_STRING8:
681 case TK_NONE: // Cheat!
682 return m_string8_value;
683 default:
684 return "";
685 }
686 }
687
691 RTPS_DllAPI void from_string(
692 const std::string& value)
693 {
694 switch (m__d)
695 {
696 case TK_BOOLEAN:
697 {
698 std::string val_ = value;
699 std::transform(val_.begin(), val_.end(), val_.begin(),
700 [](unsigned char c)
701 {
702 return static_cast<char>(std::tolower(c));
703 });
704 boolean_value(val_.compare("0") != 0 || val_.compare(CONST_TRUE) == 0);
705 }
706 break;
707 case TK_BYTE:
708 {
709 byte_value(static_cast<uint8_t>(std::stoul(value)));
710 }
711 break;
712 case TK_INT16:
713 {
714 int16_value(static_cast<int16_t>(std::stoi(value)));
715 }
716 break;
717 case TK_INT32:
718 {
719 int32_value(static_cast<int32_t>(std::stoi(value)));
720 }
721 break;
722 case TK_INT64:
723 {
724 int64_value(static_cast<int64_t>(std::stoll(value)));
725 }
726 break;
727 case TK_UINT16:
728 {
729 uint_16_value(static_cast<uint16_t>(std::stoul(value)));
730 }
731 break;
732 case TK_UINT32:
733 {
734 uint32_value(static_cast<uint32_t>(std::stoul(value)));
735 }
736 break;
737 case TK_UINT64:
738 {
739 uint64_value(static_cast<uint64_t>(std::stoull(value)));
740 }
741 break;
742 case TK_FLOAT32:
743 {
744 float32_value(std::stof(value));
745 }
746 break;
747 case TK_FLOAT64:
748 {
749 float64_value(std::stod(value));
750 }
751 break;
752 case TK_FLOAT128:
753 {
754 float128_value(std::stold(value));
755 }
756 break;
757 case TK_CHAR8:
758 {
759 char_value(value.c_str()[0]);
760 }
761 break;
762 case TK_CHAR16:
763 {
764 wchar_value(wstring_from_bytes(value).c_str()[0]);
765 }
766 break;
767 case TK_STRING8:
768 case TK_NONE: // Cheat!
769 {
770 string8_value(value);
771 }
772 break;
773 case TK_STRING16:
774 {
776 }
777 break;
778 case TK_ENUM:
779 {
780 // TODO Translate from enum value name to integer value
781 enumerated_value(static_cast<int32_t>(std::stoul(value)));
782 }
783 break;
784 default:
785 break;
786 }
787 }
788
789private:
790
791 char m__d;
792
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;
804 char m_char_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;
809 ExtendedAnnotationParameterValue m_extended_value;
810};
811
816{
817public:
818
823
828
835
842
849
856
861 inline void paramname_hash(
862 const NameHash& _paramname_hash)
863 {
864 m_paramname_hash = _paramname_hash;
865 }
866
871 inline void paramname_hash(
872 NameHash&& _paramname_hash)
873 {
874 m_paramname_hash = std::move(_paramname_hash);
875 }
876
881 inline const NameHash& paramname_hash() const
882 {
883 return m_paramname_hash;
884 }
885
891 {
892 return m_paramname_hash;
893 }
894
899 inline void value(
900 const AnnotationParameterValue& _value)
901 {
902 m_value = _value;
903 }
904
909 inline void value(
911 {
912 m_value = std::move(_value);
913 }
914
919 inline const AnnotationParameterValue& value() const
920 {
921 return m_value;
922 }
923
929 {
930 return m_value;
931 }
932
939 RTPS_DllAPI static size_t getCdrSerializedSize(
940 const AppliedAnnotationParameter& data,
941 size_t current_alignment = 0);
942
943
948 RTPS_DllAPI void serialize(
949 eprosima::fastcdr::Cdr& cdr) const;
950
955 RTPS_DllAPI void deserialize(
956 eprosima::fastcdr::Cdr& cdr);
957
958
959
966 RTPS_DllAPI static size_t getKeyMaxCdrSerializedSize(
967 size_t current_alignment = 0);
968
972 RTPS_DllAPI static bool isKeyDefined();
973
978 RTPS_DllAPI void serializeKey(
979 eprosima::fastcdr::Cdr& cdr) const;
980
981 RTPS_DllAPI bool operator ==(
982 const AppliedAnnotationParameter& other) const;
983
984private:
985
986 NameHash m_paramname_hash;
988};
989
990
991// The application of an annotation to some type or type member
992/*struct AppliedAnnotationParameter {
993 NameHash paramname_hash;
994 AnnotationParameterValue value;
995 };*/
996/*
997 class AppliedAnnotationParameter
998 {
999 public:
1000 AppliedAnnotationParameter();
1001 ~AppliedAnnotationParameter();
1002 AppliedAnnotationParameter(const AppliedAnnotationParameter &x);
1003 AppliedAnnotationParameter(AppliedAnnotationParameter &&x);
1004 AppliedAnnotationParameter& operator=(const AppliedAnnotationParameter &x);
1005 AppliedAnnotationParameter& operator=(AppliedAnnotationParameter &&x);
1006
1007 inline void paramname_hash(const NameHash &_paramname_hash) { m_paramname_hash = _paramname_hash; }
1008 inline void paramname_hash(NameHash &&_paramname_hash) { m_paramname_hash = std::move(_paramname_hash); }
1009 inline const NameHash& paramname_hash() const { return m_paramname_hash; }
1010 inline NameHash& paramname_hash() { return m_paramname_hash; }
1011
1012 inline void value(const AnnotationParameterValue &_value) { m_value = _value; }
1013 inline void value(AnnotationParameterValue &&_value) { m_value = std::move(_value); }
1014 inline const AnnotationParameterValue& value() const { return m_value; }
1015 inline AnnotationParameterValue& value() { return m_value; }
1016
1017 static size_t getCdrSerializedSize(const AppliedAnnotationParameter& data, size_t current_alignment = 0);
1018 void serialize(eprosima::fastcdr::Cdr &cdr) const;
1019 void deserialize(eprosima::fastcdr::Cdr &cdr);
1020 static size_t getKeyMaxCdrSerializedSize(size_t current_alignment = 0);
1021 static bool isKeyDefined();
1022 void serializeKey(eprosima::fastcdr::Cdr &cdr) const;
1023
1024 private:
1025 NameHash m_paramname_hash;
1026 AnnotationParameterValue m_value;
1027 };
1028 */
1029// Sorted by AppliedAnnotationParameter.paramname_hash
1030typedef std::vector<AppliedAnnotationParameter> AppliedAnnotationParameterSeq;
1031
1032/*struct AppliedAnnotation {
1033 TypeIdentifier annotation_typeid;
1034 AppliedAnnotationParameterSeq param_seq; // @Optional
1035 };*/
1037{
1038public:
1039
1040 RTPS_DllAPI AppliedAnnotation();
1041
1042 RTPS_DllAPI ~AppliedAnnotation();
1043
1045 const AppliedAnnotation& x);
1046
1048 AppliedAnnotation&& x);
1050 const AppliedAnnotation& x);
1052 AppliedAnnotation&& x);
1053
1055 const TypeIdentifier& _annotation_typeid)
1056 {
1057 m_annotation_typeid = _annotation_typeid;
1058 }
1059
1061 TypeIdentifier&& _annotation_typeid)
1062 {
1063 m_annotation_typeid = std::move(_annotation_typeid);
1064 }
1065
1066 inline const TypeIdentifier& annotation_typeid() const
1067 {
1068 return m_annotation_typeid;
1069 }
1070
1072 {
1073 return m_annotation_typeid;
1074 }
1075
1076 inline void param_seq(
1077 const AppliedAnnotationParameterSeq& _param_seq)
1078 {
1079 m_param_seq = _param_seq;
1080 }
1081
1082 inline void param_seq(
1083 AppliedAnnotationParameterSeq&& _param_seq)
1084 {
1085 m_param_seq = std::move(_param_seq);
1086 }
1087
1089 {
1090 return m_param_seq;
1091 }
1092
1094 {
1095 return m_param_seq;
1096 }
1097
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;
1110
1111 RTPS_DllAPI bool operator ==(
1112 const AppliedAnnotation& other) const;
1113
1114private:
1115
1116 TypeIdentifier m_annotation_typeid;
1118};
1119
1120// Sorted by AppliedAnnotation.annotation_typeid
1121typedef std::vector<AppliedAnnotation> AppliedAnnotationSeq;
1122
1123// @verbatim(placement="<placement>", language="<lang>", text="<text>")
1124/*struct AppliedVerbatimAnnotation {
1125 std::string placement; // 32
1126 std::string language; // 32
1127 std::string text;
1128 };*/
1130{
1131public:
1132
1134
1136
1138 const AppliedVerbatimAnnotation& x);
1139
1142
1144 const AppliedVerbatimAnnotation& x);
1145
1148
1149 inline void placement(
1150 const std::string& _placement)
1151 {
1152 m_placement = _placement;
1153 }
1154
1155 inline void placement(
1156 std::string&& _placement)
1157 {
1158 m_placement = std::move(_placement);
1159 }
1160
1161 inline const std::string& placement() const
1162 {
1163 return m_placement;
1164 }
1165
1166 inline std::string& placement()
1167 {
1168 return m_placement;
1169 }
1170
1171 inline void language(
1172 const std::string& _language)
1173 {
1174 m_language = _language;
1175 }
1176
1177 inline void language(
1178 std::string&& _language)
1179 {
1180 m_language = std::move(_language);
1181 }
1182
1183 inline const std::string& language() const
1184 {
1185 return m_language;
1186 }
1187
1188 inline std::string& language()
1189 {
1190 return m_language;
1191 }
1192
1193 inline void text(
1194 const std::string& _text)
1195 {
1196 m_text = _text;
1197 }
1198
1199 inline void text(
1200 std::string&& _text)
1201 {
1202 m_text = std::move(_text);
1203 }
1204
1205 inline const std::string& text() const
1206 {
1207 return m_text;
1208 }
1209
1210 inline std::string& text()
1211 {
1212 return m_text;
1213 }
1214
1215 RTPS_DllAPI static size_t getCdrSerializedSize(
1216 const AppliedVerbatimAnnotation& data,
1217 size_t current_alignment = 0);
1218
1219 RTPS_DllAPI void serialize(
1220 eprosima::fastcdr::Cdr& cdr) const;
1221
1222 RTPS_DllAPI void deserialize(
1223 eprosima::fastcdr::Cdr& cdr);
1224
1225 RTPS_DllAPI static size_t getKeyMaxCdrSerializedSize(
1226 size_t current_alignment = 0);
1227
1228 RTPS_DllAPI static bool isKeyDefined();
1229
1230 RTPS_DllAPI void serializeKey(
1231 eprosima::fastcdr::Cdr& cdr) const;
1232
1233 RTPS_DllAPI bool operator ==(
1234 const AppliedVerbatimAnnotation& other) const;
1235
1236private:
1237
1238 std::string m_placement;
1239 std::string m_language;
1240 std::string m_text;
1241};
1242
1243// --- Aggregate types: -----------------------------------------------
1244/*struct AppliedBuiltinMemberAnnotations {
1245 std::string unit; // @unit("<unit>") // @Optional
1246 AnnotationParameterValue min; // @min , @range // @Optional
1247 AnnotationParameterValue max; // @max , @range // @Optional
1248 std::string hash_id; // @hash_id("<membername>") // @Optional
1249 };
1250 */
1252{
1253public:
1254
1256
1258
1261
1264
1267
1270
1271 inline void unit(
1272 const std::string& _unit)
1273 {
1274 m_unit = _unit;
1275 }
1276
1277 inline void unit(
1278 std::string&& _unit)
1279 {
1280 m_unit = std::move(_unit);
1281 }
1282
1283 inline const std::string& unit() const
1284 {
1285 return m_unit;
1286 }
1287
1288 inline std::string& unit()
1289 {
1290 return m_unit;
1291 }
1292
1293 inline void min(
1294 const AnnotationParameterValue& _min)
1295 {
1296 m_min = _min;
1297 }
1298
1299 inline void min(
1301 {
1302 m_min = std::move(_min);
1303 }
1304
1305 inline const AnnotationParameterValue& min() const
1306 {
1307 return m_min;
1308 }
1309
1311 {
1312 return m_min;
1313 }
1314
1315 inline void max(
1316 const AnnotationParameterValue& _max)
1317 {
1318 m_max = _max;
1319 }
1320
1321 inline void max(
1323 {
1324 m_max = std::move(_max);
1325 }
1326
1327 inline const AnnotationParameterValue& max() const
1328 {
1329 return m_max;
1330 }
1331
1333 {
1334 return m_max;
1335 }
1336
1337 inline void hash_id(
1338 const std::string& _hash_id)
1339 {
1340 m_hash_id = _hash_id;
1341 }
1342
1343 inline void hash_id(
1344 std::string&& _hash_id)
1345 {
1346 m_hash_id = std::move(_hash_id);
1347 }
1348
1349 inline const std::string& hash_id() const
1350 {
1351 return m_hash_id;
1352 }
1353
1354 inline std::string& hash_id()
1355 {
1356 return m_hash_id;
1357 }
1358
1359 RTPS_DllAPI static size_t getCdrSerializedSize(
1361 size_t current_alignment = 0);
1362
1363 RTPS_DllAPI void serialize(
1364 eprosima::fastcdr::Cdr& cdr) const;
1365
1366 RTPS_DllAPI void deserialize(
1367 eprosima::fastcdr::Cdr& cdr);
1368
1369 RTPS_DllAPI static size_t getKeyMaxCdrSerializedSize(
1370 size_t current_alignment = 0);
1371
1372 RTPS_DllAPI static bool isKeyDefined();
1373
1374 RTPS_DllAPI void serializeKey(
1375 eprosima::fastcdr::Cdr& cdr) const;
1376
1377 RTPS_DllAPI bool operator ==(
1378 const AppliedBuiltinMemberAnnotations& other) const;
1379
1380private:
1381
1382 std::string m_unit;
1385 std::string m_hash_id;
1386};
1387
1388
1389} // namespace types
1390} // namespace fastrtps
1391} // namespace eprosima
1392
1393#if _MSC_VER
1394
1395#if defined(FASTDDS_RESTORE_MIN)
1396#pragma pop_macro("min")
1397#undef FASTDDS_RESTORE_MIN
1398#endif // defined(FASTDDS_RESTORE_MIN)
1399
1400#if defined(FASTDDS_RESTORE_MAX)
1401#pragma pop_macro("max")
1402#undef FASTDDS_RESTORE_MAX
1403#endif // defined(FASTDDS_RESTORE_MAX)
1404
1405#endif // if _MSC_VER
1406
1407#endif // _ANNOTATIONPARAMETERVALUE_H_
This class represents the union AnnotationParameterValue defined by the user in the IDL file.
Definition AnnotationParameterValue.h:164
RTPS_DllAPI void int16_value(int16_t _int16_value)
This function sets a value in member int16_value.
RTPS_DllAPI const std::string & string8_value() const
This function returns a constant reference to member string8_value.
RTPS_DllAPI wchar_t & wchar_value()
This function returns a reference to member wchar_value.
RTPS_DllAPI long double & float128_value()
This function returns a reference to member float128_value.
RTPS_DllAPI void wchar_value(wchar_t _wchar_value)
This function sets a value in member wchar_value.
RTPS_DllAPI double & float64_value()
This function returns a reference to member float64_value.
RTPS_DllAPI uint32_t & uint32_value()
This function returns a reference to member uint32_value.
RTPS_DllAPI int32_t int32_value() const
This function returns the value of member int32_value.
RTPS_DllAPI AnnotationParameterValue(const AnnotationParameterValue &x)
Copy constructor.
RTPS_DllAPI void byte_value(uint8_t _byte_value)
This function sets a value in member byte_value.
RTPS_DllAPI uint64_t & uint64_value()
This function returns a reference to member uint64_value.
RTPS_DllAPI char & char_value()
This function returns a reference to member char_value.
RTPS_DllAPI void from_string(const std::string &value)
Aux method to set value from its string representation.
Definition AnnotationParameterValue.h:691
RTPS_DllAPI std::wstring & string16_value()
This function returns a reference to member string16_value.
RTPS_DllAPI void extended_value(const ExtendedAnnotationParameterValue &_extended_value)
This function copies the value in member extended_value.
RTPS_DllAPI long double float128_value() const
This function returns the value of member float128_value.
RTPS_DllAPI void string16_value(std::wstring &&_string16_value)
This function moves the value in member string16_value.
RTPS_DllAPI uint32_t uint32_value() const
This function returns the value of member uint32_value.
RTPS_DllAPI void string8_value(std::string &&_string8_value)
This function moves the value in member string8_value.
RTPS_DllAPI const std::wstring & string16_value() const
This function returns a constant reference to member string16_value.
RTPS_DllAPI uint8_t byte_value() const
This function returns the value of member byte_value.
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 std::string to_string() const
Aux method to return value as its string representation.
Definition AnnotationParameterValue.h:644
RTPS_DllAPI const ExtendedAnnotationParameterValue & extended_value() const
This function returns a constant reference to member extended_value.
RTPS_DllAPI void deserialize(eprosima::fastcdr::Cdr &cdr)
This function deserializes an object using CDR serialization.
RTPS_DllAPI bool boolean_value() const
This function returns the value of member boolean_value.
RTPS_DllAPI int16_t int16_value() const
This function returns the value of member int16_value.
RTPS_DllAPI float float32_value() const
This function returns the value of member float32_value.
RTPS_DllAPI void enumerated_value(int32_t _enumerated_value)
This function sets a value in member enumerated_value.
RTPS_DllAPI int32_t enumerated_value() const
This function returns the value of member enumerated_value.
RTPS_DllAPI uint8_t & byte_value()
This function returns a reference to member byte_value.
RTPS_DllAPI void uint32_value(uint32_t _uint32_value)
This function sets a value in member uint32_value.
RTPS_DllAPI int32_t & int32_value()
This function returns a reference to member int32_value.
RTPS_DllAPI bool & boolean_value()
This function returns a reference to member boolean_value.
RTPS_DllAPI int64_t int64_value() const
This function returns the value of member int64_value.
RTPS_DllAPI std::string & string8_value()
This function returns a reference to member string8_value.
static RTPS_DllAPI bool isKeyDefined()
This function tells you if the Key has been defined for this type.
RTPS_DllAPI void serialize(eprosima::fastcdr::Cdr &cdr) const
This function serializes an object using CDR serialization.
RTPS_DllAPI void int32_value(int32_t _int32_value)
This function sets a value in member int32_value.
RTPS_DllAPI char _d() const
This function returns the value of the discriminator.
RTPS_DllAPI int16_t & int16_value()
This function returns a reference to member int16_value.
RTPS_DllAPI AnnotationParameterValue(AnnotationParameterValue &&x)
Move constructor.
RTPS_DllAPI wchar_t wchar_value() const
This function returns the value of member wchar_value.
RTPS_DllAPI uint64_t uint64_value() const
This function returns the value of member uint64_value.
RTPS_DllAPI void string16_value(const std::wstring &_string16_value)
This function copies the value in member string16_value.
RTPS_DllAPI void extended_value(ExtendedAnnotationParameterValue &&_extended_value)
This function moves the value in member extended_value.
RTPS_DllAPI void float32_value(float _float32_value)
This function sets a value in member float32_value.
RTPS_DllAPI void int64_value(int64_t _int64_value)
This function sets a value in member int64_value.
RTPS_DllAPI void float128_value(long double _float128_value)
This function sets a value in member float128_value.
RTPS_DllAPI int64_t & int64_value()
This function returns a reference to member int64_value.
RTPS_DllAPI void char_value(char _char_value)
This function sets a value in member char_value.
RTPS_DllAPI double float64_value() const
This function returns the value of member float64_value.
RTPS_DllAPI AnnotationParameterValue & operator=(const AnnotationParameterValue &x)
Copy assignment.
RTPS_DllAPI void uint_16_value(uint16_t _uint_16_value)
This function sets a value in member uint_16_value.
RTPS_DllAPI ~AnnotationParameterValue()
Default destructor.
RTPS_DllAPI float & float32_value()
This function returns a reference to member float32_value.
RTPS_DllAPI AnnotationParameterValue()
Default constructor.
RTPS_DllAPI uint16_t & uint_16_value()
This function returns a reference to member uint_16_value.
RTPS_DllAPI void serializeKey(eprosima::fastcdr::Cdr &cdr) const
This function serializes the key members of an object using CDR serialization.
RTPS_DllAPI int32_t & enumerated_value()
This function returns a reference to member enumerated_value.
RTPS_DllAPI bool operator==(const AnnotationParameterValue &other) const
RTPS_DllAPI void string8_value(const std::string &_string8_value)
This function copies the value in member string8_value.
RTPS_DllAPI void _d(char __d)
This function sets the discriminator value.
RTPS_DllAPI uint16_t uint_16_value() const
This function returns the value of member uint_16_value.
RTPS_DllAPI void uint64_value(uint64_t _uint64_value)
This function sets a value in member uint64_value.
RTPS_DllAPI void boolean_value(bool _boolean_value)
This function sets a value in member boolean_value.
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.
RTPS_DllAPI char char_value() const
This function returns the value of member char_value.
RTPS_DllAPI char & _d()
This function returns a reference to the discriminator.
RTPS_DllAPI ExtendedAnnotationParameterValue & extended_value()
This function returns a reference to member extended_value.
RTPS_DllAPI void float64_value(double _float64_value)
This function sets a value in member float64_value.
Definition AnnotationParameterValue.h:1037
RTPS_DllAPI bool operator==(const AppliedAnnotation &other) const
void param_seq(const AppliedAnnotationParameterSeq &_param_seq)
Definition AnnotationParameterValue.h:1076
const TypeIdentifier & annotation_typeid() const
Definition AnnotationParameterValue.h:1066
void annotation_typeid(const TypeIdentifier &_annotation_typeid)
Definition AnnotationParameterValue.h:1054
TypeIdentifier & annotation_typeid()
Definition AnnotationParameterValue.h:1071
static RTPS_DllAPI size_t getKeyMaxCdrSerializedSize(size_t current_alignment=0)
const AppliedAnnotationParameterSeq & param_seq() const
Definition AnnotationParameterValue.h:1088
RTPS_DllAPI void deserialize(eprosima::fastcdr::Cdr &cdr)
void param_seq(AppliedAnnotationParameterSeq &&_param_seq)
Definition AnnotationParameterValue.h:1082
RTPS_DllAPI void serialize(eprosima::fastcdr::Cdr &cdr) const
static RTPS_DllAPI size_t getCdrSerializedSize(const AppliedAnnotation &data, size_t current_alignment=0)
RTPS_DllAPI AppliedAnnotation(AppliedAnnotation &&x)
RTPS_DllAPI AppliedAnnotation & operator=(const AppliedAnnotation &x)
AppliedAnnotationParameterSeq & param_seq()
Definition AnnotationParameterValue.h:1093
RTPS_DllAPI void serializeKey(eprosima::fastcdr::Cdr &cdr) const
RTPS_DllAPI AppliedAnnotation(const AppliedAnnotation &x)
void annotation_typeid(TypeIdentifier &&_annotation_typeid)
Definition AnnotationParameterValue.h:1060
This class represents the structure AppliedAnnotationParameter defined by the user in the IDL file.
Definition AnnotationParameterValue.h:816
RTPS_DllAPI AppliedAnnotationParameter()
Default constructor.
const NameHash & paramname_hash() const
This function returns a constant reference to member paramname_hash.
Definition AnnotationParameterValue.h:881
RTPS_DllAPI bool operator==(const AppliedAnnotationParameter &other) const
RTPS_DllAPI AppliedAnnotationParameter(const AppliedAnnotationParameter &x)
Copy constructor.
void value(const AnnotationParameterValue &_value)
This function copies the value in member value.
Definition AnnotationParameterValue.h:899
AnnotationParameterValue & value()
This function returns a reference to member value.
Definition AnnotationParameterValue.h:928
void value(AnnotationParameterValue &&_value)
This function moves the value in member value.
Definition AnnotationParameterValue.h:909
const AnnotationParameterValue & value() const
This function returns a constant reference to member value.
Definition AnnotationParameterValue.h:919
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...
NameHash & paramname_hash()
This function returns a reference to member paramname_hash.
Definition AnnotationParameterValue.h:890
RTPS_DllAPI void deserialize(eprosima::fastcdr::Cdr &cdr)
This function deserializes an object using CDR serialization.
void paramname_hash(const NameHash &_paramname_hash)
This function copies the value in member paramname_hash.
Definition AnnotationParameterValue.h:861
RTPS_DllAPI AppliedAnnotationParameter & operator=(const AppliedAnnotationParameter &x)
Copy assignment.
static RTPS_DllAPI bool isKeyDefined()
This function tells you if the Key has been defined for this type.
RTPS_DllAPI void serialize(eprosima::fastcdr::Cdr &cdr) const
This function serializes an object using CDR serialization.
RTPS_DllAPI AppliedAnnotationParameter(AppliedAnnotationParameter &&x)
Move constructor.
void paramname_hash(NameHash &&_paramname_hash)
This function moves the value in member paramname_hash.
Definition AnnotationParameterValue.h:871
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.
RTPS_DllAPI void serializeKey(eprosima::fastcdr::Cdr &cdr) const
This function serializes the key members of an object using CDR serialization.
RTPS_DllAPI ~AppliedAnnotationParameter()
Default destructor.
Definition AnnotationParameterValue.h:1252
void max(const AnnotationParameterValue &_max)
Definition AnnotationParameterValue.h:1315
void min(AnnotationParameterValue &&_min)
Definition AnnotationParameterValue.h:1299
AnnotationParameterValue & max()
Definition AnnotationParameterValue.h:1332
AnnotationParameterValue & min()
Definition AnnotationParameterValue.h:1310
static RTPS_DllAPI size_t getCdrSerializedSize(const AppliedBuiltinMemberAnnotations &data, size_t current_alignment=0)
std::string & unit()
Definition AnnotationParameterValue.h:1288
void hash_id(std::string &&_hash_id)
Definition AnnotationParameterValue.h:1343
void unit(std::string &&_unit)
Definition AnnotationParameterValue.h:1277
void max(AnnotationParameterValue &&_max)
Definition AnnotationParameterValue.h:1321
static RTPS_DllAPI size_t getKeyMaxCdrSerializedSize(size_t current_alignment=0)
const AnnotationParameterValue & min() const
Definition AnnotationParameterValue.h:1305
RTPS_DllAPI AppliedBuiltinMemberAnnotations(AppliedBuiltinMemberAnnotations &&x)
std::string & hash_id()
Definition AnnotationParameterValue.h:1354
RTPS_DllAPI void deserialize(eprosima::fastcdr::Cdr &cdr)
const AnnotationParameterValue & max() const
Definition AnnotationParameterValue.h:1327
RTPS_DllAPI void serialize(eprosima::fastcdr::Cdr &cdr) const
RTPS_DllAPI AppliedBuiltinMemberAnnotations(const AppliedBuiltinMemberAnnotations &x)
RTPS_DllAPI AppliedBuiltinMemberAnnotations & operator=(const AppliedBuiltinMemberAnnotations &x)
const std::string & unit() const
Definition AnnotationParameterValue.h:1283
void unit(const std::string &_unit)
Definition AnnotationParameterValue.h:1271
RTPS_DllAPI void serializeKey(eprosima::fastcdr::Cdr &cdr) const
void hash_id(const std::string &_hash_id)
Definition AnnotationParameterValue.h:1337
void min(const AnnotationParameterValue &_min)
Definition AnnotationParameterValue.h:1293
RTPS_DllAPI bool operator==(const AppliedBuiltinMemberAnnotations &other) const
const std::string & hash_id() const
Definition AnnotationParameterValue.h:1349
Definition AnnotationParameterValue.h:1130
void text(const std::string &_text)
Definition AnnotationParameterValue.h:1193
void text(std::string &&_text)
Definition AnnotationParameterValue.h:1199
const std::string & language() const
Definition AnnotationParameterValue.h:1183
static RTPS_DllAPI size_t getKeyMaxCdrSerializedSize(size_t current_alignment=0)
void placement(std::string &&_placement)
Definition AnnotationParameterValue.h:1155
RTPS_DllAPI void deserialize(eprosima::fastcdr::Cdr &cdr)
RTPS_DllAPI AppliedVerbatimAnnotation(const AppliedVerbatimAnnotation &x)
const std::string & placement() const
Definition AnnotationParameterValue.h:1161
RTPS_DllAPI void serialize(eprosima::fastcdr::Cdr &cdr) const
static RTPS_DllAPI size_t getCdrSerializedSize(const AppliedVerbatimAnnotation &data, size_t current_alignment=0)
RTPS_DllAPI bool operator==(const AppliedVerbatimAnnotation &other) const
void placement(const std::string &_placement)
Definition AnnotationParameterValue.h:1149
RTPS_DllAPI AppliedVerbatimAnnotation(AppliedVerbatimAnnotation &&x)
void language(const std::string &_language)
Definition AnnotationParameterValue.h:1171
void language(std::string &&_language)
Definition AnnotationParameterValue.h:1177
std::string & language()
Definition AnnotationParameterValue.h:1188
const std::string & text() const
Definition AnnotationParameterValue.h:1205
RTPS_DllAPI void serializeKey(eprosima::fastcdr::Cdr &cdr) const
std::string & text()
Definition AnnotationParameterValue.h:1210
std::string & placement()
Definition AnnotationParameterValue.h:1166
RTPS_DllAPI AppliedVerbatimAnnotation & operator=(const AppliedVerbatimAnnotation &x)
This class represents the structure ExtendedAnnotationParameterValue defined by the user in the IDL f...
Definition AnnotationParameterValue.h:63
RTPS_DllAPI ExtendedAnnotationParameterValue & operator=(const ExtendedAnnotationParameterValue &x)
Copy assignment.
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 ExtendedAnnotationParameterValue(ExtendedAnnotationParameterValue &&x)
Move constructor.
RTPS_DllAPI void deserialize(eprosima::fastcdr::Cdr &cdr)
This function deserializes an object using CDR serialization.
RTPS_DllAPI ExtendedAnnotationParameterValue(const ExtendedAnnotationParameterValue &x)
Copy constructor.
RTPS_DllAPI ExtendedAnnotationParameterValue()
Default constructor.
static RTPS_DllAPI bool isKeyDefined()
This function tells you if the Key has been defined for this type.
RTPS_DllAPI void serialize(eprosima::fastcdr::Cdr &cdr) const
This function serializes an object using CDR serialization.
RTPS_DllAPI bool operator==(const ExtendedAnnotationParameterValue &) const
Definition AnnotationParameterValue.h:152
RTPS_DllAPI ~ExtendedAnnotationParameterValue()
Default destructor.
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 serializeKey(eprosima::fastcdr::Cdr &cdr) const
This function serializes the key members of an object using CDR serialization.
Definition TypeIdentifier.h:81
const octet TK_FLOAT32
Definition TypesBase.h:130
const octet TK_BYTE
Definition TypesBase.h:123
const octet TK_UINT64
Definition TypesBase.h:129
const octet TK_FLOAT64
Definition TypesBase.h:131
const octet TK_STRING16
Definition TypesBase.h:138
const octet TK_INT32
Definition TypesBase.h:125
const octet TK_UINT16
Definition TypesBase.h:127
const octet TK_CHAR8
Definition TypesBase.h:133
std::vector< AppliedAnnotationParameter > AppliedAnnotationParameterSeq
Definition AnnotationParameterValue.h:1030
const octet TK_CHAR16
Definition TypesBase.h:134
const std::string CONST_TRUE
Definition TypesBase.h:58
const octet TK_INT16
Definition TypesBase.h:124
const octet TK_BOOLEAN
Definition TypesBase.h:122
const octet TK_FLOAT128
Definition TypesBase.h:132
const octet TK_ENUM
Definition TypesBase.h:145
std::vector< AppliedAnnotation > AppliedAnnotationSeq
Definition AnnotationParameterValue.h:1121
const octet TK_INT64
Definition TypesBase.h:126
const octet TK_NONE
Definition TypesBase.h:121
const octet TK_STRING8
Definition TypesBase.h:137
const octet TK_UINT32
Definition TypesBase.h:128
std::array< uint8_t, 4 > NameHash
Definition TypesBase.h:178
std::string wstring_to_bytes(const std::wstring &str)
std::wstring wstring_from_bytes(const std::string &str)
eProsima namespace.
Definition LibrarySettingsAttributes.h:23