Fast RTPS  Version 2.4.0
Fast RTPS
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 <stdint.h>
45 #include <array>
46 #include <vector>
47 
48 namespace eprosima {
49 namespace fastcdr {
50 class Cdr;
51 } // namespace fastcdr
52 } // namespace eprosima
53 namespace eprosima {
54 namespace fastrtps {
55 
56 namespace types {
57 
63 {
64 public:
65 
70 
75 
82 
89 
96 
103 
110  static size_t getCdrSerializedSize(
112  size_t current_alignment = 0);
113 
114 
119  void serialize(
120  eprosima::fastcdr::Cdr& cdr) const;
121 
127  eprosima::fastcdr::Cdr& cdr);
128 
129 
130 
138  size_t current_alignment = 0);
139 
143  static bool isKeyDefined();
144 
150  eprosima::fastcdr::Cdr& cdr) const;
151 
154  {
155  return true;
156  }
157 
158 private:
159 };
165 {
166 public:
167 
172 
177 
183  const AnnotationParameterValue& x);
184 
191 
197  const AnnotationParameterValue& x);
198 
205 
211  void _d(
212  char __d);
213 
218  char _d() const;
219 
224  char& _d();
225 
231  bool _boolean_value);
232 
238  bool boolean_value() const;
239 
245  bool& boolean_value();
251  uint8_t _byte_value);
252 
258  uint8_t byte_value() const;
259 
265  uint8_t& byte_value();
271  int16_t _int16_value);
272 
278  int16_t int16_value() const;
279 
285  int16_t& int16_value();
291  uint16_t _uint_16_value);
292 
298  uint16_t uint_16_value() const;
299 
305  uint16_t& uint_16_value();
311  int32_t _int32_value);
312 
318  int32_t int32_value() const;
319 
325  int32_t& int32_value();
331  uint32_t _uint32_value);
332 
338  uint32_t uint32_value() const;
339 
345  uint32_t& uint32_value();
351  int64_t _int64_value);
352 
358  int64_t int64_value() const;
359 
365  int64_t& int64_value();
371  uint64_t _uint64_value);
372 
378  uint64_t uint64_value() const;
379 
385  uint64_t& uint64_value();
391  float _float32_value);
392 
398  float float32_value() const;
399 
405  float& float32_value();
411  double _float64_value);
412 
418  double float64_value() const;
419 
425  double& float64_value();
431  long double _float128_value);
432 
438  long double float128_value() const;
439 
445  long double& float128_value();
451  char _char_value);
452 
458  char char_value() const;
459 
465  char& char_value();
471  wchar_t _wchar_value);
472 
478  wchar_t wchar_value() const;
479 
485  wchar_t& wchar_value();
491  int32_t _enumerated_value);
492 
498  int32_t enumerated_value() const;
499 
505  int32_t& enumerated_value();
511  const std::string& _string8_value);
512 
518  std::string&& _string8_value);
519 
525  const std::string& string8_value() const;
526 
532  std::string& string8_value();
538  const std::wstring& _string16_value);
539 
545  std::wstring&& _string16_value);
546 
552  const std::wstring& string16_value() const;
553 
559  std::wstring& string16_value();
565  const ExtendedAnnotationParameterValue& _extended_value);
566 
572  ExtendedAnnotationParameterValue&& _extended_value);
573 
580 
587 
594  static size_t getCdrSerializedSize(
595  const AnnotationParameterValue& data,
596  size_t current_alignment = 0);
597 
598 
603  void serialize(
604  eprosima::fastcdr::Cdr& cdr) const;
605 
611  eprosima::fastcdr::Cdr& cdr);
612 
613 
614 
622  size_t current_alignment = 0);
623 
627  static bool isKeyDefined();
628 
634  eprosima::fastcdr::Cdr& cdr) const;
635 
637  const AnnotationParameterValue& other) const;
638 
642  std::string to_string() const
643  {
644  switch (m__d)
645  {
646  case TK_BOOLEAN:
647  return (m_boolean_value) ? "true" : "false";
648  case TK_BYTE:
649  return std::to_string(m_byte_value);
650  case TK_INT16:
651  return std::to_string(m_int16_value);
652  case TK_UINT16:
653  return std::to_string(m_uint_16_value);
654  case TK_INT32:
655  return std::to_string(m_int32_value);
656  case TK_UINT32:
657  return std::to_string(m_uint32_value);
658  case TK_INT64:
659  return std::to_string(m_int64_value);
660  case TK_UINT64:
661  return std::to_string(m_uint64_value);
662  case TK_FLOAT32:
663  return std::to_string(m_float32_value);
664  case TK_FLOAT64:
665  return std::to_string(m_float64_value);
666  case TK_FLOAT128:
667  return std::to_string(m_float128_value);
668  case TK_CHAR8:
669  return std::to_string(m_char_value);
670  case TK_CHAR16:
671  return std::to_string(m_wchar_value);
672  case TK_ENUM:
673  return std::to_string(m_enumerated_value);
674  case TK_STRING16:
675  {
676  return wstring_to_bytes(m_string16_value);
677  }
678  case TK_STRING8:
679  case TK_NONE: // Cheat!
680  return m_string8_value;
681  default:
682  return "";
683  }
684  }
685 
690  const std::string& value)
691  {
692  switch (m__d)
693  {
694  case TK_BOOLEAN:
695  {
696  std::string val_ = value;
697  std::transform(val_.begin(), val_.end(), val_.begin(),
698  [](unsigned char c)
699  {
700  return static_cast<char>(std::tolower(c));
701  });
702  boolean_value(val_.compare("0") != 0 || val_.compare(CONST_TRUE) == 0);
703  }
704  break;
705  case TK_BYTE:
706  {
707  byte_value(static_cast<uint8_t>(std::stoul(value)));
708  }
709  break;
710  case TK_INT16:
711  {
712  int16_value(static_cast<int16_t>(std::stoi(value)));
713  }
714  break;
715  case TK_INT32:
716  {
717  int32_value(static_cast<int32_t>(std::stoi(value)));
718  }
719  break;
720  case TK_INT64:
721  {
722  int64_value(static_cast<int64_t>(std::stoll(value)));
723  }
724  break;
725  case TK_UINT16:
726  {
727  uint_16_value(static_cast<uint16_t>(std::stoul(value)));
728  }
729  break;
730  case TK_UINT32:
731  {
732  uint32_value(static_cast<uint32_t>(std::stoul(value)));
733  }
734  break;
735  case TK_UINT64:
736  {
737  uint64_value(static_cast<uint64_t>(std::stoull(value)));
738  }
739  break;
740  case TK_FLOAT32:
741  {
742  float32_value(std::stof(value));
743  }
744  break;
745  case TK_FLOAT64:
746  {
747  float64_value(std::stod(value));
748  }
749  break;
750  case TK_FLOAT128:
751  {
752  float128_value(std::stold(value));
753  }
754  break;
755  case TK_CHAR8:
756  {
757  char_value(value.c_str()[0]);
758  }
759  break;
760  case TK_CHAR16:
761  {
762  wchar_value(wstring_from_bytes(value).c_str()[0]);
763  }
764  break;
765  case TK_STRING8:
766  case TK_NONE: // Cheat!
767  {
768  string8_value(value);
769  }
770  break;
771  case TK_STRING16:
772  {
774  }
775  break;
776  case TK_ENUM:
777  {
778  // TODO Translate from enum value name to integer value
779  enumerated_value(static_cast<int32_t>(std::stoul(value)));
780  }
781  break;
782  default:
783  break;
784  }
785  }
786 
787 private:
788 
789  char m__d;
790 
791  bool m_boolean_value;
792  uint8_t m_byte_value;
793  int16_t m_int16_value;
794  uint16_t m_uint_16_value;
795  int32_t m_int32_value;
796  uint32_t m_uint32_value;
797  int64_t m_int64_value;
798  uint64_t m_uint64_value;
799  float m_float32_value;
800  double m_float64_value;
801  long double m_float128_value;
802  char m_char_value;
803  wchar_t m_wchar_value;
804  int32_t m_enumerated_value;
805  std::string m_string8_value;
806  std::wstring m_string16_value;
807  ExtendedAnnotationParameterValue m_extended_value;
808 };
814 {
815 public:
816 
821 
826 
832  const AppliedAnnotationParameter& x);
833 
840 
846  const AppliedAnnotationParameter& x);
847 
854 
859  inline void paramname_hash(
860  const NameHash& _paramname_hash)
861  {
862  m_paramname_hash = _paramname_hash;
863  }
864 
869  inline void paramname_hash(
870  NameHash&& _paramname_hash)
871  {
872  m_paramname_hash = std::move(_paramname_hash);
873  }
874 
879  inline const NameHash& paramname_hash() const
880  {
881  return m_paramname_hash;
882  }
883 
889  {
890  return m_paramname_hash;
891  }
892 
897  inline void value(
898  const AnnotationParameterValue& _value)
899  {
900  m_value = _value;
901  }
902 
907  inline void value(
908  AnnotationParameterValue&& _value)
909  {
910  m_value = std::move(_value);
911  }
912 
917  inline const AnnotationParameterValue& value() const
918  {
919  return m_value;
920  }
921 
927  {
928  return m_value;
929  }
930 
937  static size_t getCdrSerializedSize(
938  const AppliedAnnotationParameter& data,
939  size_t current_alignment = 0);
940 
941 
946  void serialize(
947  eprosima::fastcdr::Cdr& cdr) const;
948 
954  eprosima::fastcdr::Cdr& cdr);
955 
956 
957 
965  size_t current_alignment = 0);
966 
970  static bool isKeyDefined();
971 
977  eprosima::fastcdr::Cdr& cdr) const;
978 
980  const AppliedAnnotationParameter& other) const;
981 
982 private:
983 
984  NameHash m_paramname_hash;
985  AnnotationParameterValue m_value;
986 };
987 
988 
989 // The application of an annotation to some type or type member
990 /*struct AppliedAnnotationParameter {
991  NameHash paramname_hash;
992  AnnotationParameterValue value;
993  };*/
994 /*
995  class AppliedAnnotationParameter
996  {
997  public:
998  AppliedAnnotationParameter();
999  ~AppliedAnnotationParameter();
1000  AppliedAnnotationParameter(const AppliedAnnotationParameter &x);
1001  AppliedAnnotationParameter(AppliedAnnotationParameter &&x);
1002  AppliedAnnotationParameter& operator=(const AppliedAnnotationParameter &x);
1003  AppliedAnnotationParameter& operator=(AppliedAnnotationParameter &&x);
1004 
1005  inline void paramname_hash(const NameHash &_paramname_hash) { m_paramname_hash = _paramname_hash; }
1006  inline void paramname_hash(NameHash &&_paramname_hash) { m_paramname_hash = std::move(_paramname_hash); }
1007  inline const NameHash& paramname_hash() const { return m_paramname_hash; }
1008  inline NameHash& paramname_hash() { return m_paramname_hash; }
1009 
1010  inline void value(const AnnotationParameterValue &_value) { m_value = _value; }
1011  inline void value(AnnotationParameterValue &&_value) { m_value = std::move(_value); }
1012  inline const AnnotationParameterValue& value() const { return m_value; }
1013  inline AnnotationParameterValue& value() { return m_value; }
1014 
1015  static size_t getCdrSerializedSize(const AppliedAnnotationParameter& data, size_t current_alignment = 0);
1016  void serialize(eprosima::fastcdr::Cdr &cdr) const;
1017  void deserialize(eprosima::fastcdr::Cdr &cdr);
1018  static size_t getKeyMaxCdrSerializedSize(size_t current_alignment = 0);
1019  static bool isKeyDefined();
1020  void serializeKey(eprosima::fastcdr::Cdr &cdr) const;
1021 
1022  private:
1023  NameHash m_paramname_hash;
1024  AnnotationParameterValue m_value;
1025  };
1026  */
1027 // Sorted by AppliedAnnotationParameter.paramname_hash
1028 typedef std::vector<AppliedAnnotationParameter> AppliedAnnotationParameterSeq;
1029 
1030 /*struct AppliedAnnotation {
1031  TypeIdentifier annotation_typeid;
1032  AppliedAnnotationParameterSeq param_seq; // @Optional
1033  };*/
1035 {
1036 public:
1037 
1041  const AppliedAnnotation& x);
1043  AppliedAnnotation&& x);
1045  const AppliedAnnotation& x);
1047  AppliedAnnotation&& x);
1048 
1049  inline void annotation_typeid(
1050  const TypeIdentifier& _annotation_typeid)
1051  {
1052  m_annotation_typeid = _annotation_typeid;
1053  }
1054 
1055  inline void annotation_typeid(
1056  TypeIdentifier&& _annotation_typeid)
1057  {
1058  m_annotation_typeid = std::move(_annotation_typeid);
1059  }
1060 
1061  inline const TypeIdentifier& annotation_typeid() const
1062  {
1063  return m_annotation_typeid;
1064  }
1065 
1067  {
1068  return m_annotation_typeid;
1069  }
1070 
1071  inline void param_seq(
1072  const AppliedAnnotationParameterSeq& _param_seq)
1073  {
1074  m_param_seq = _param_seq;
1075  }
1076 
1077  inline void param_seq(
1078  AppliedAnnotationParameterSeq&& _param_seq)
1079  {
1080  m_param_seq = std::move(_param_seq);
1081  }
1082 
1084  {
1085  return m_param_seq;
1086  }
1087 
1089  {
1090  return m_param_seq;
1091  }
1092 
1093  static size_t getCdrSerializedSize(
1094  const AppliedAnnotation& data,
1095  size_t current_alignment = 0);
1097  eprosima::fastcdr::Cdr& cdr) const;
1099  eprosima::fastcdr::Cdr& cdr);
1101  size_t current_alignment = 0);
1102  static bool isKeyDefined();
1104  eprosima::fastcdr::Cdr& cdr) const;
1105 
1107  const AppliedAnnotation& other) const;
1108 
1109 private:
1110 
1111  TypeIdentifier m_annotation_typeid;
1112  AppliedAnnotationParameterSeq m_param_seq;
1113 };
1114 
1115 // Sorted by AppliedAnnotation.annotation_typeid
1116 typedef std::vector<AppliedAnnotation> AppliedAnnotationSeq;
1117 
1118 // @verbatim(placement="<placement>", language="<lang>", text="<text>")
1119 /*struct AppliedVerbatimAnnotation {
1120  std::string placement; // 32
1121  std::string language; // 32
1122  std::string text;
1123  };*/
1125 {
1126 public:
1127 
1131  const AppliedVerbatimAnnotation& x);
1135  const AppliedVerbatimAnnotation& x);
1138 
1139  inline void placement(
1140  const std::string& _placement)
1141  {
1142  m_placement = _placement;
1143  }
1144 
1145  inline void placement(
1146  std::string&& _placement)
1147  {
1148  m_placement = std::move(_placement);
1149  }
1150 
1151  inline const std::string& placement() const
1152  {
1153  return m_placement;
1154  }
1155 
1156  inline std::string& placement()
1157  {
1158  return m_placement;
1159  }
1160 
1161  inline void language(
1162  const std::string& _language)
1163  {
1164  m_language = _language;
1165  }
1166 
1167  inline void language(
1168  std::string&& _language)
1169  {
1170  m_language = std::move(_language);
1171  }
1172 
1173  inline const std::string& language() const
1174  {
1175  return m_language;
1176  }
1177 
1178  inline std::string& language()
1179  {
1180  return m_language;
1181  }
1182 
1183  inline void text(
1184  const std::string& _text)
1185  {
1186  m_text = _text;
1187  }
1188 
1189  inline void text(
1190  std::string&& _text)
1191  {
1192  m_text = std::move(_text);
1193  }
1194 
1195  inline const std::string& text() const
1196  {
1197  return m_text;
1198  }
1199 
1200  inline std::string& text()
1201  {
1202  return m_text;
1203  }
1204 
1205  static size_t getCdrSerializedSize(
1206  const AppliedVerbatimAnnotation& data,
1207  size_t current_alignment = 0);
1209  eprosima::fastcdr::Cdr& cdr) const;
1211  eprosima::fastcdr::Cdr& cdr);
1213  size_t current_alignment = 0);
1214  static bool isKeyDefined();
1216  eprosima::fastcdr::Cdr& cdr) const;
1217 
1219  const AppliedVerbatimAnnotation& other) const;
1220 
1221 private:
1222 
1223  std::string m_placement;
1224  std::string m_language;
1225  std::string m_text;
1226 };
1227 
1228 // --- Aggregate types: -----------------------------------------------
1229 /*struct AppliedBuiltinMemberAnnotations {
1230  std::string unit; // @unit("<unit>") // @Optional
1231  AnnotationParameterValue min; // @min , @range // @Optional
1232  AnnotationParameterValue max; // @max , @range // @Optional
1233  std::string hash_id; // @hash_id("<membername>") // @Optional
1234  };
1235  */
1237 {
1238 public:
1239 
1250 
1251  inline void unit(
1252  const std::string& _unit)
1253  {
1254  m_unit = _unit;
1255  }
1256 
1257  inline void unit(
1258  std::string&& _unit)
1259  {
1260  m_unit = std::move(_unit);
1261  }
1262 
1263  inline const std::string& unit() const
1264  {
1265  return m_unit;
1266  }
1267 
1268  inline std::string& unit()
1269  {
1270  return m_unit;
1271  }
1272 
1273  inline void min(
1274  const AnnotationParameterValue& _min)
1275  {
1276  m_min = _min;
1277  }
1278 
1279  inline void min(
1280  AnnotationParameterValue&& _min)
1281  {
1282  m_min = std::move(_min);
1283  }
1284 
1285  inline const AnnotationParameterValue& min() const
1286  {
1287  return m_min;
1288  }
1289 
1291  {
1292  return m_min;
1293  }
1294 
1295  inline void max(
1296  const AnnotationParameterValue& _max)
1297  {
1298  m_max = _max;
1299  }
1300 
1301  inline void max(
1302  AnnotationParameterValue&& _max)
1303  {
1304  m_max = std::move(_max);
1305  }
1306 
1307  inline const AnnotationParameterValue& max() const
1308  {
1309  return m_max;
1310  }
1311 
1313  {
1314  return m_max;
1315  }
1316 
1317  inline void hash_id(
1318  const std::string& _hash_id)
1319  {
1320  m_hash_id = _hash_id;
1321  }
1322 
1323  inline void hash_id(
1324  std::string&& _hash_id)
1325  {
1326  m_hash_id = std::move(_hash_id);
1327  }
1328 
1329  inline const std::string& hash_id() const
1330  {
1331  return m_hash_id;
1332  }
1333 
1334  inline std::string& hash_id()
1335  {
1336  return m_hash_id;
1337  }
1338 
1339  static size_t getCdrSerializedSize(
1340  const AppliedBuiltinMemberAnnotations& data,
1341  size_t current_alignment = 0);
1343  eprosima::fastcdr::Cdr& cdr) const;
1345  eprosima::fastcdr::Cdr& cdr);
1347  size_t current_alignment = 0);
1348  static bool isKeyDefined();
1350  eprosima::fastcdr::Cdr& cdr) const;
1351 
1353  const AppliedBuiltinMemberAnnotations& other) const;
1354 
1355 private:
1356 
1357  std::string m_unit;
1360  std::string m_hash_id;
1361 };
1362 
1363 
1364 } // namespace types
1365 } // namespace fastrtps
1366 } // namespace eprosima
1367 
1368 #if _MSC_VER
1369 
1370 #if defined(FASTDDS_RESTORE_MIN)
1371 #pragma pop_macro("min")
1372 #undef FASTDDS_RESTORE_MIN
1373 #endif // defined(FASTDDS_RESTORE_MIN)
1374 
1375 #if defined(FASTDDS_RESTORE_MAX)
1376 #pragma pop_macro("max")
1377 #undef FASTDDS_RESTORE_MAX
1378 #endif // defined(FASTDDS_RESTORE_MAX)
1379 
1380 #endif // if _MSC_VER
1381 
1382 #endif // _ANNOTATIONPARAMETERVALUE_H_
This class represents the union AnnotationParameterValue defined by the user in the IDL file.
Definition: AnnotationParameterValue.h:165
AnnotationParameterValue(AnnotationParameterValue &&x)
Move constructor.
bool operator==(const AnnotationParameterValue &other) const
int64_t & int64_value()
This function returns a reference to member int64_value.
void _d(char __d)
This function sets the discriminator value.
int16_t & int16_value()
This function returns a reference to member int16_value.
const ExtendedAnnotationParameterValue & extended_value() const
This function returns a constant reference to member extended_value.
std::wstring & string16_value()
This function returns a reference to member string16_value.
const std::wstring & string16_value() const
This function returns a constant reference to member string16_value.
double float64_value() const
This function returns the value of member float64_value.
long double float128_value() const
This function returns the value of member float128_value.
void int64_value(int64_t _int64_value)
This function sets a value in member int64_value.
void enumerated_value(int32_t _enumerated_value)
This function sets a value in member enumerated_value.
static 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...
int32_t enumerated_value() const
This function returns the value of member enumerated_value.
void uint32_value(uint32_t _uint32_value)
This function sets a value in member uint32_value.
uint64_t & uint64_value()
This function returns a reference to member uint64_value.
long double & float128_value()
This function returns a reference to member float128_value.
void float128_value(long double _float128_value)
This function sets a value in member float128_value.
void string16_value(const std::wstring &_string16_value)
This function copies the value in member string16_value.
wchar_t & wchar_value()
This function returns a reference to member wchar_value.
void boolean_value(bool _boolean_value)
This function sets a value in member boolean_value.
int32_t & enumerated_value()
This function returns a reference to member enumerated_value.
static 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.
AnnotationParameterValue(const AnnotationParameterValue &x)
Copy constructor.
uint16_t uint_16_value() const
This function returns the value of member uint_16_value.
int16_t int16_value() const
This function returns the value of member int16_value.
const std::string & string8_value() const
This function returns a constant reference to member string8_value.
float & float32_value()
This function returns a reference to member float32_value.
bool & boolean_value()
This function returns a reference to member boolean_value.
double & float64_value()
This function returns a reference to member float64_value.
char & char_value()
This function returns a reference to member char_value.
void wchar_value(wchar_t _wchar_value)
This function sets a value in member wchar_value.
void float64_value(double _float64_value)
This function sets a value in member float64_value.
int32_t int32_value() const
This function returns the value of member int32_value.
static bool isKeyDefined()
This function tells you if the Key has been defined for this type.
void extended_value(ExtendedAnnotationParameterValue &&_extended_value)
This function moves the value in member extended_value.
uint64_t uint64_value() const
This function returns the value of member uint64_value.
void float32_value(float _float32_value)
This function sets a value in member float32_value.
void char_value(char _char_value)
This function sets a value in member char_value.
std::string & string8_value()
This function returns a reference to member string8_value.
void byte_value(uint8_t _byte_value)
This function sets a value in member byte_value.
AnnotationParameterValue & operator=(const AnnotationParameterValue &x)
Copy assignment.
void from_string(const std::string &value)
Aux method to set value from its string representation.
Definition: AnnotationParameterValue.h:689
void serialize(eprosima::fastcdr::Cdr &cdr) const
This function serializes an object using CDR serialization.
void int16_value(int16_t _int16_value)
This function sets a value in member int16_value.
void extended_value(const ExtendedAnnotationParameterValue &_extended_value)
This function copies the value in member extended_value.
void int32_value(int32_t _int32_value)
This function sets a value in member int32_value.
uint8_t & byte_value()
This function returns a reference to member byte_value.
char _d() const
This function returns the value of the discriminator.
float float32_value() const
This function returns the value of member float32_value.
int64_t int64_value() const
This function returns the value of member int64_value.
uint32_t uint32_value() const
This function returns the value of member uint32_value.
wchar_t wchar_value() const
This function returns the value of member wchar_value.
void serializeKey(eprosima::fastcdr::Cdr &cdr) const
This function serializes the key members of an object using CDR serialization.
std::string to_string() const
Aux method to return value as its string representation.
Definition: AnnotationParameterValue.h:642
uint8_t byte_value() const
This function returns the value of member byte_value.
int32_t & int32_value()
This function returns a reference to member int32_value.
ExtendedAnnotationParameterValue & extended_value()
This function returns a reference to member extended_value.
void string16_value(std::wstring &&_string16_value)
This function moves the value in member string16_value.
char char_value() const
This function returns the value of member char_value.
void uint64_value(uint64_t _uint64_value)
This function sets a value in member uint64_value.
char & _d()
This function returns a reference to the discriminator.
bool boolean_value() const
This function returns the value of member boolean_value.
void deserialize(eprosima::fastcdr::Cdr &cdr)
This function deserializes an object using CDR serialization.
void string8_value(std::string &&_string8_value)
This function moves the value in member string8_value.
uint32_t & uint32_value()
This function returns a reference to member uint32_value.
uint16_t & uint_16_value()
This function returns a reference to member uint_16_value.
void uint_16_value(uint16_t _uint_16_value)
This function sets a value in member uint_16_value.
void string8_value(const std::string &_string8_value)
This function copies the value in member string8_value.
Definition: AnnotationParameterValue.h:1035
TypeIdentifier & annotation_typeid()
Definition: AnnotationParameterValue.h:1066
AppliedAnnotationParameterSeq & param_seq()
Definition: AnnotationParameterValue.h:1088
void param_seq(const AppliedAnnotationParameterSeq &_param_seq)
Definition: AnnotationParameterValue.h:1071
void annotation_typeid(const TypeIdentifier &_annotation_typeid)
Definition: AnnotationParameterValue.h:1049
static size_t getKeyMaxCdrSerializedSize(size_t current_alignment=0)
AppliedAnnotation & operator=(const AppliedAnnotation &x)
void param_seq(AppliedAnnotationParameterSeq &&_param_seq)
Definition: AnnotationParameterValue.h:1077
const AppliedAnnotationParameterSeq & param_seq() const
Definition: AnnotationParameterValue.h:1083
void serialize(eprosima::fastcdr::Cdr &cdr) const
bool operator==(const AppliedAnnotation &other) const
void serializeKey(eprosima::fastcdr::Cdr &cdr) const
static size_t getCdrSerializedSize(const AppliedAnnotation &data, size_t current_alignment=0)
AppliedAnnotation(const AppliedAnnotation &x)
void deserialize(eprosima::fastcdr::Cdr &cdr)
const TypeIdentifier & annotation_typeid() const
Definition: AnnotationParameterValue.h:1061
void annotation_typeid(TypeIdentifier &&_annotation_typeid)
Definition: AnnotationParameterValue.h:1055
This class represents the structure AppliedAnnotationParameter defined by the user in the IDL file.
Definition: AnnotationParameterValue.h:814
NameHash & paramname_hash()
This function returns a reference to member paramname_hash.
Definition: AnnotationParameterValue.h:888
static 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...
AppliedAnnotationParameter(const AppliedAnnotationParameter &x)
Copy constructor.
void value(const AnnotationParameterValue &_value)
This function copies the value in member value.
Definition: AnnotationParameterValue.h:897
void value(AnnotationParameterValue &&_value)
This function moves the value in member value.
Definition: AnnotationParameterValue.h:907
AnnotationParameterValue & value()
This function returns a reference to member value.
Definition: AnnotationParameterValue.h:926
bool operator==(const AppliedAnnotationParameter &other) const
static bool isKeyDefined()
This function tells you if the Key has been defined for this type.
void paramname_hash(const NameHash &_paramname_hash)
This function copies the value in member paramname_hash.
Definition: AnnotationParameterValue.h:859
AppliedAnnotationParameter(AppliedAnnotationParameter &&x)
Move constructor.
void serialize(eprosima::fastcdr::Cdr &cdr) const
This function serializes an object using CDR serialization.
void serializeKey(eprosima::fastcdr::Cdr &cdr) const
This function serializes the key members of an object using CDR serialization.
void paramname_hash(NameHash &&_paramname_hash)
This function moves the value in member paramname_hash.
Definition: AnnotationParameterValue.h:869
static 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.
const AnnotationParameterValue & value() const
This function returns a constant reference to member value.
Definition: AnnotationParameterValue.h:917
void deserialize(eprosima::fastcdr::Cdr &cdr)
This function deserializes an object using CDR serialization.
AppliedAnnotationParameter & operator=(const AppliedAnnotationParameter &x)
Copy assignment.
const NameHash & paramname_hash() const
This function returns a constant reference to member paramname_hash.
Definition: AnnotationParameterValue.h:879
Definition: AnnotationParameterValue.h:1237
const AnnotationParameterValue & min() const
Definition: AnnotationParameterValue.h:1285
void max(const AnnotationParameterValue &_max)
Definition: AnnotationParameterValue.h:1295
void min(AnnotationParameterValue &&_min)
Definition: AnnotationParameterValue.h:1279
AnnotationParameterValue & min()
Definition: AnnotationParameterValue.h:1290
static size_t getCdrSerializedSize(const AppliedBuiltinMemberAnnotations &data, size_t current_alignment=0)
static size_t getKeyMaxCdrSerializedSize(size_t current_alignment=0)
const std::string & unit() const
Definition: AnnotationParameterValue.h:1263
void hash_id(std::string &&_hash_id)
Definition: AnnotationParameterValue.h:1323
void unit(std::string &&_unit)
Definition: AnnotationParameterValue.h:1257
AnnotationParameterValue & max()
Definition: AnnotationParameterValue.h:1312
void max(AnnotationParameterValue &&_max)
Definition: AnnotationParameterValue.h:1301
std::string & unit()
Definition: AnnotationParameterValue.h:1268
std::string & hash_id()
Definition: AnnotationParameterValue.h:1334
bool operator==(const AppliedBuiltinMemberAnnotations &other) const
AppliedBuiltinMemberAnnotations & operator=(const AppliedBuiltinMemberAnnotations &x)
void serialize(eprosima::fastcdr::Cdr &cdr) const
void serializeKey(eprosima::fastcdr::Cdr &cdr) const
void unit(const std::string &_unit)
Definition: AnnotationParameterValue.h:1251
AppliedBuiltinMemberAnnotations(AppliedBuiltinMemberAnnotations &&x)
void hash_id(const std::string &_hash_id)
Definition: AnnotationParameterValue.h:1317
void min(const AnnotationParameterValue &_min)
Definition: AnnotationParameterValue.h:1273
const AnnotationParameterValue & max() const
Definition: AnnotationParameterValue.h:1307
const std::string & hash_id() const
Definition: AnnotationParameterValue.h:1329
AppliedBuiltinMemberAnnotations(const AppliedBuiltinMemberAnnotations &x)
Definition: AnnotationParameterValue.h:1125
void text(const std::string &_text)
Definition: AnnotationParameterValue.h:1183
static size_t getCdrSerializedSize(const AppliedVerbatimAnnotation &data, size_t current_alignment=0)
void text(std::string &&_text)
Definition: AnnotationParameterValue.h:1189
static size_t getKeyMaxCdrSerializedSize(size_t current_alignment=0)
AppliedVerbatimAnnotation & operator=(const AppliedVerbatimAnnotation &x)
std::string & text()
Definition: AnnotationParameterValue.h:1200
void placement(std::string &&_placement)
Definition: AnnotationParameterValue.h:1145
std::string & placement()
Definition: AnnotationParameterValue.h:1156
const std::string & text() const
Definition: AnnotationParameterValue.h:1195
const std::string & placement() const
Definition: AnnotationParameterValue.h:1151
AppliedVerbatimAnnotation(AppliedVerbatimAnnotation &&x)
void serialize(eprosima::fastcdr::Cdr &cdr) const
void placement(const std::string &_placement)
Definition: AnnotationParameterValue.h:1139
void serializeKey(eprosima::fastcdr::Cdr &cdr) const
void language(const std::string &_language)
Definition: AnnotationParameterValue.h:1161
void language(std::string &&_language)
Definition: AnnotationParameterValue.h:1167
std::string & language()
Definition: AnnotationParameterValue.h:1178
const std::string & language() const
Definition: AnnotationParameterValue.h:1173
void deserialize(eprosima::fastcdr::Cdr &cdr)
bool operator==(const AppliedVerbatimAnnotation &other) const
AppliedVerbatimAnnotation(const AppliedVerbatimAnnotation &x)
This class represents the structure ExtendedAnnotationParameterValue defined by the user in the IDL f...
Definition: AnnotationParameterValue.h:63
static 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...
ExtendedAnnotationParameterValue(ExtendedAnnotationParameterValue &&x)
Move constructor.
ExtendedAnnotationParameterValue & operator=(const ExtendedAnnotationParameterValue &x)
Copy assignment.
static bool isKeyDefined()
This function tells you if the Key has been defined for this type.
void serialize(eprosima::fastcdr::Cdr &cdr) const
This function serializes an object using CDR serialization.
bool operator==(const ExtendedAnnotationParameterValue &) const
Definition: AnnotationParameterValue.h:152
ExtendedAnnotationParameterValue(const ExtendedAnnotationParameterValue &x)
Copy constructor.
static 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.
void serializeKey(eprosima::fastcdr::Cdr &cdr) const
This function serializes the key members of an object using CDR serialization.
void deserialize(eprosima::fastcdr::Cdr &cdr)
This function deserializes an object using CDR serialization.
Definition: TypeIdentifier.h:81
const octet TK_FLOAT32
Definition: TypesBase.h:127
const octet TK_BYTE
Definition: TypesBase.h:120
const octet TK_UINT64
Definition: TypesBase.h:126
const octet TK_FLOAT64
Definition: TypesBase.h:128
const octet TK_STRING16
Definition: TypesBase.h:135
const octet TK_INT32
Definition: TypesBase.h:122
const octet TK_UINT16
Definition: TypesBase.h:124
const octet TK_CHAR8
Definition: TypesBase.h:130
std::vector< AppliedAnnotationParameter > AppliedAnnotationParameterSeq
Definition: AnnotationParameterValue.h:1028
const octet TK_CHAR16
Definition: TypesBase.h:131
const std::string CONST_TRUE
Definition: TypesBase.h:55
const octet TK_INT16
Definition: TypesBase.h:121
const octet TK_BOOLEAN
Definition: TypesBase.h:119
const octet TK_FLOAT128
Definition: TypesBase.h:129
const octet TK_ENUM
Definition: TypesBase.h:142
std::vector< AppliedAnnotation > AppliedAnnotationSeq
Definition: AnnotationParameterValue.h:1116
const octet TK_INT64
Definition: TypesBase.h:123
const octet TK_NONE
Definition: TypesBase.h:118
const octet TK_STRING8
Definition: TypesBase.h:134
const octet TK_UINT32
Definition: TypesBase.h:125
std::array< uint8_t, 4 > NameHash
Definition: TypesBase.h:175
std::wstring wstring_from_bytes(const std::string &str)
std::string wstring_to_bytes(const std::wstring &str)
eProsima namespace.
Definition: LibrarySettingsAttributes.h:23