Fast RTPS  Version 2.10.6
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 <fastrtps/fastrtps_dll.h>
45 #include <stdint.h>
46 #include <array>
47 #include <vector>
48 
49 namespace eprosima {
50 namespace fastcdr {
51 class Cdr;
52 } // namespace fastcdr
53 } // namespace eprosima
54 namespace eprosima {
55 namespace fastrtps {
56 
57 namespace types {
58 
64 {
65 public:
66 
71 
76 
83 
90 
97 
104 
112  RTPS_DllAPI static size_t getCdrSerializedSize(
114  size_t current_alignment = 0);
115 
116 
121  RTPS_DllAPI void serialize(
122  eprosima::fastcdr::Cdr& cdr) const;
123 
128  RTPS_DllAPI void deserialize(
129  eprosima::fastcdr::Cdr& cdr);
130 
131 
132 
139  RTPS_DllAPI static size_t getKeyMaxCdrSerializedSize(
140  size_t current_alignment = 0);
141 
145  RTPS_DllAPI static bool isKeyDefined();
146 
151  RTPS_DllAPI void serializeKey(
152  eprosima::fastcdr::Cdr& cdr) const;
153 
154  RTPS_DllAPI bool operator ==(
156  {
157  return true;
158  }
159 
160 private:
161 };
167 {
168 public:
169 
174 
179 
185  const AnnotationParameterValue& x);
186 
193 
199  const AnnotationParameterValue& x);
200 
207 
213  RTPS_DllAPI void _d(
214  char __d);
215 
220  RTPS_DllAPI char _d() const;
221 
226  RTPS_DllAPI char& _d();
227 
232  RTPS_DllAPI void boolean_value(
233  bool _boolean_value);
234 
240  RTPS_DllAPI bool boolean_value() const;
241 
247  RTPS_DllAPI bool& boolean_value();
252  RTPS_DllAPI void byte_value(
253  uint8_t _byte_value);
254 
260  RTPS_DllAPI uint8_t byte_value() const;
261 
267  RTPS_DllAPI uint8_t& byte_value();
272  RTPS_DllAPI void int16_value(
273  int16_t _int16_value);
274 
280  RTPS_DllAPI int16_t int16_value() const;
281 
287  RTPS_DllAPI int16_t& int16_value();
292  RTPS_DllAPI void uint_16_value(
293  uint16_t _uint_16_value);
294 
300  RTPS_DllAPI uint16_t uint_16_value() const;
301 
307  RTPS_DllAPI uint16_t& uint_16_value();
312  RTPS_DllAPI void int32_value(
313  int32_t _int32_value);
314 
320  RTPS_DllAPI int32_t int32_value() const;
321 
327  RTPS_DllAPI int32_t& int32_value();
332  RTPS_DllAPI void uint32_value(
333  uint32_t _uint32_value);
334 
340  RTPS_DllAPI uint32_t uint32_value() const;
341 
347  RTPS_DllAPI uint32_t& uint32_value();
352  RTPS_DllAPI void int64_value(
353  int64_t _int64_value);
354 
360  RTPS_DllAPI int64_t int64_value() const;
361 
367  RTPS_DllAPI int64_t& int64_value();
368 
373  RTPS_DllAPI void uint64_value(
374  uint64_t _uint64_value);
375 
381  RTPS_DllAPI uint64_t uint64_value() const;
382 
388  RTPS_DllAPI uint64_t& uint64_value();
393  RTPS_DllAPI void float32_value(
394  float _float32_value);
395 
401  RTPS_DllAPI float float32_value() const;
402 
408  RTPS_DllAPI float& float32_value();
413  RTPS_DllAPI void float64_value(
414  double _float64_value);
415 
421  RTPS_DllAPI double float64_value() const;
422 
428  RTPS_DllAPI double& float64_value();
429 
434  RTPS_DllAPI void float128_value(
435  long double _float128_value);
436 
442  RTPS_DllAPI long double float128_value() const;
443 
449  RTPS_DllAPI long double& float128_value();
454  RTPS_DllAPI void char_value(
455  char _char_value);
456 
462  RTPS_DllAPI char char_value() const;
463 
469  RTPS_DllAPI char& char_value();
474  RTPS_DllAPI void wchar_value(
475  wchar_t _wchar_value);
476 
482  RTPS_DllAPI wchar_t wchar_value() const;
483 
489  RTPS_DllAPI wchar_t& wchar_value();
494  RTPS_DllAPI void enumerated_value(
495  int32_t _enumerated_value);
496 
502  RTPS_DllAPI int32_t enumerated_value() const;
503 
509  RTPS_DllAPI int32_t& enumerated_value();
514  RTPS_DllAPI void string8_value(
515  const std::string& _string8_value);
516 
521  RTPS_DllAPI void string8_value(
522  std::string&& _string8_value);
523 
529  RTPS_DllAPI const std::string& string8_value() const;
530 
536  RTPS_DllAPI std::string& string8_value();
541  RTPS_DllAPI void string16_value(
542  const std::wstring& _string16_value);
543 
548  RTPS_DllAPI void string16_value(
549  std::wstring&& _string16_value);
550 
556  RTPS_DllAPI const std::wstring& string16_value() const;
557 
563  RTPS_DllAPI std::wstring& string16_value();
564 
569  RTPS_DllAPI void extended_value(
570  const ExtendedAnnotationParameterValue& _extended_value);
571 
576  RTPS_DllAPI void extended_value(
577  ExtendedAnnotationParameterValue&& _extended_value);
578 
585 
592 
599  RTPS_DllAPI static size_t getCdrSerializedSize(
600  const AnnotationParameterValue& data,
601  size_t current_alignment = 0);
602 
603 
608  RTPS_DllAPI void serialize(
609  eprosima::fastcdr::Cdr& cdr) const;
610 
615  RTPS_DllAPI void deserialize(
616  eprosima::fastcdr::Cdr& cdr);
617 
618 
619 
626  RTPS_DllAPI static size_t getKeyMaxCdrSerializedSize(
627  size_t current_alignment = 0);
628 
632  RTPS_DllAPI static bool isKeyDefined();
633 
638  RTPS_DllAPI void serializeKey(
639  eprosima::fastcdr::Cdr& cdr) const;
640 
641  RTPS_DllAPI bool operator ==(
642  const AnnotationParameterValue& other) const;
643 
647  RTPS_DllAPI std::string to_string() const
648  {
649  switch (m__d)
650  {
651  case TK_BOOLEAN:
652  return (m_boolean_value) ? "true" : "false";
653  case TK_BYTE:
654  return std::to_string(m_byte_value);
655  case TK_INT16:
656  return std::to_string(m_int16_value);
657  case TK_UINT16:
658  return std::to_string(m_uint_16_value);
659  case TK_INT32:
660  return std::to_string(m_int32_value);
661  case TK_UINT32:
662  return std::to_string(m_uint32_value);
663  case TK_INT64:
664  return std::to_string(m_int64_value);
665  case TK_UINT64:
666  return std::to_string(m_uint64_value);
667  case TK_FLOAT32:
668  return std::to_string(m_float32_value);
669  case TK_FLOAT64:
670  return std::to_string(m_float64_value);
671  case TK_FLOAT128:
672  return std::to_string(m_float128_value);
673  case TK_CHAR8:
674  return std::to_string(m_char_value);
675  case TK_CHAR16:
676  return std::to_string(m_wchar_value);
677  case TK_ENUM:
678  return std::to_string(m_enumerated_value);
679  case TK_STRING16:
680  {
681  return wstring_to_bytes(m_string16_value);
682  }
683  case TK_STRING8:
684  case TK_NONE: // Cheat!
685  return m_string8_value;
686  default:
687  return "";
688  }
689  }
690 
694  RTPS_DllAPI void from_string(
695  const std::string& value)
696  {
697  switch (m__d)
698  {
699  case TK_BOOLEAN:
700  {
701  std::string val_ = value;
702  std::transform(val_.begin(), val_.end(), val_.begin(),
703  [](unsigned char c)
704  {
705  return static_cast<char>(std::tolower(c));
706  });
707  boolean_value(val_.compare("0") != 0 || val_.compare(CONST_TRUE) == 0);
708  }
709  break;
710  case TK_BYTE:
711  {
712  byte_value(static_cast<uint8_t>(std::stoul(value)));
713  }
714  break;
715  case TK_INT16:
716  {
717  int16_value(static_cast<int16_t>(std::stoi(value)));
718  }
719  break;
720  case TK_INT32:
721  {
722  int32_value(static_cast<int32_t>(std::stoi(value)));
723  }
724  break;
725  case TK_INT64:
726  {
727  int64_value(static_cast<int64_t>(std::stoll(value)));
728  }
729  break;
730  case TK_UINT16:
731  {
732  uint_16_value(static_cast<uint16_t>(std::stoul(value)));
733  }
734  break;
735  case TK_UINT32:
736  {
737  uint32_value(static_cast<uint32_t>(std::stoul(value)));
738  }
739  break;
740  case TK_UINT64:
741  {
742  uint64_value(static_cast<uint64_t>(std::stoull(value)));
743  }
744  break;
745  case TK_FLOAT32:
746  {
747  float32_value(std::stof(value));
748  }
749  break;
750  case TK_FLOAT64:
751  {
752  float64_value(std::stod(value));
753  }
754  break;
755  case TK_FLOAT128:
756  {
757  float128_value(std::stold(value));
758  }
759  break;
760  case TK_CHAR8:
761  {
762  char_value(value.c_str()[0]);
763  }
764  break;
765  case TK_CHAR16:
766  {
767  wchar_value(wstring_from_bytes(value).c_str()[0]);
768  }
769  break;
770  case TK_STRING8:
771  case TK_NONE: // Cheat!
772  {
773  string8_value(value);
774  }
775  break;
776  case TK_STRING16:
777  {
779  }
780  break;
781  case TK_ENUM:
782  {
783  // TODO Translate from enum value name to integer value
784  enumerated_value(static_cast<int32_t>(std::stoul(value)));
785  }
786  break;
787  default:
788  break;
789  }
790  }
791 
792 private:
793 
794  char m__d;
795 
796  bool m_boolean_value;
797  uint8_t m_byte_value;
798  int16_t m_int16_value;
799  uint16_t m_uint_16_value;
800  int32_t m_int32_value;
801  uint32_t m_uint32_value;
802  int64_t m_int64_value;
803  uint64_t m_uint64_value;
804  float m_float32_value;
805  double m_float64_value;
806  long double m_float128_value;
807  char m_char_value;
808  wchar_t m_wchar_value;
809  int32_t m_enumerated_value;
810  std::string m_string8_value;
811  std::wstring m_string16_value;
812  ExtendedAnnotationParameterValue m_extended_value;
813 };
814 
820 {
821 public:
822 
827 
832 
838  const AppliedAnnotationParameter& x);
839 
846 
852  const AppliedAnnotationParameter& x);
853 
860 
865  inline void paramname_hash(
866  const NameHash& _paramname_hash)
867  {
868  m_paramname_hash = _paramname_hash;
869  }
870 
875  inline void paramname_hash(
876  NameHash&& _paramname_hash)
877  {
878  m_paramname_hash = std::move(_paramname_hash);
879  }
880 
885  inline const NameHash& paramname_hash() const
886  {
887  return m_paramname_hash;
888  }
889 
895  {
896  return m_paramname_hash;
897  }
898 
903  inline void value(
904  const AnnotationParameterValue& _value)
905  {
906  m_value = _value;
907  }
908 
913  inline void value(
914  AnnotationParameterValue&& _value)
915  {
916  m_value = std::move(_value);
917  }
918 
923  inline const AnnotationParameterValue& value() const
924  {
925  return m_value;
926  }
927 
933  {
934  return m_value;
935  }
936 
943  RTPS_DllAPI static size_t getCdrSerializedSize(
944  const AppliedAnnotationParameter& data,
945  size_t current_alignment = 0);
946 
947 
952  RTPS_DllAPI void serialize(
953  eprosima::fastcdr::Cdr& cdr) const;
954 
959  RTPS_DllAPI void deserialize(
960  eprosima::fastcdr::Cdr& cdr);
961 
962 
963 
970  RTPS_DllAPI static size_t getKeyMaxCdrSerializedSize(
971  size_t current_alignment = 0);
972 
976  RTPS_DllAPI static bool isKeyDefined();
977 
982  RTPS_DllAPI void serializeKey(
983  eprosima::fastcdr::Cdr& cdr) const;
984 
985  RTPS_DllAPI bool operator ==(
986  const AppliedAnnotationParameter& other) const;
987 
988 private:
989 
990  NameHash m_paramname_hash;
991  AnnotationParameterValue m_value;
992 };
993 
994 
995 // The application of an annotation to some type or type member
996 /*struct AppliedAnnotationParameter {
997  NameHash paramname_hash;
998  AnnotationParameterValue value;
999  };*/
1000 /*
1001  class AppliedAnnotationParameter
1002  {
1003  public:
1004  AppliedAnnotationParameter();
1005  ~AppliedAnnotationParameter();
1006  AppliedAnnotationParameter(const AppliedAnnotationParameter &x);
1007  AppliedAnnotationParameter(AppliedAnnotationParameter &&x);
1008  AppliedAnnotationParameter& operator=(const AppliedAnnotationParameter &x);
1009  AppliedAnnotationParameter& operator=(AppliedAnnotationParameter &&x);
1010 
1011  inline void paramname_hash(const NameHash &_paramname_hash) { m_paramname_hash = _paramname_hash; }
1012  inline void paramname_hash(NameHash &&_paramname_hash) { m_paramname_hash = std::move(_paramname_hash); }
1013  inline const NameHash& paramname_hash() const { return m_paramname_hash; }
1014  inline NameHash& paramname_hash() { return m_paramname_hash; }
1015 
1016  inline void value(const AnnotationParameterValue &_value) { m_value = _value; }
1017  inline void value(AnnotationParameterValue &&_value) { m_value = std::move(_value); }
1018  inline const AnnotationParameterValue& value() const { return m_value; }
1019  inline AnnotationParameterValue& value() { return m_value; }
1020 
1021  static size_t getCdrSerializedSize(const AppliedAnnotationParameter& data, size_t current_alignment = 0);
1022  void serialize(eprosima::fastcdr::Cdr &cdr) const;
1023  void deserialize(eprosima::fastcdr::Cdr &cdr);
1024  static size_t getKeyMaxCdrSerializedSize(size_t current_alignment = 0);
1025  static bool isKeyDefined();
1026  void serializeKey(eprosima::fastcdr::Cdr &cdr) const;
1027 
1028  private:
1029  NameHash m_paramname_hash;
1030  AnnotationParameterValue m_value;
1031  };
1032  */
1033 // Sorted by AppliedAnnotationParameter.paramname_hash
1034 typedef std::vector<AppliedAnnotationParameter> AppliedAnnotationParameterSeq;
1035 
1036 /*struct AppliedAnnotation {
1037  TypeIdentifier annotation_typeid;
1038  AppliedAnnotationParameterSeq param_seq; // @Optional
1039  };*/
1041 {
1042 public:
1043 
1044  RTPS_DllAPI AppliedAnnotation();
1045 
1046  RTPS_DllAPI ~AppliedAnnotation();
1047 
1048  RTPS_DllAPI AppliedAnnotation(
1049  const AppliedAnnotation& x);
1050 
1051  RTPS_DllAPI AppliedAnnotation(
1052  AppliedAnnotation&& x);
1054  const AppliedAnnotation& x);
1056  AppliedAnnotation&& x);
1057 
1058  inline void annotation_typeid(
1059  const TypeIdentifier& _annotation_typeid)
1060  {
1061  m_annotation_typeid = _annotation_typeid;
1062  }
1063 
1064  inline void annotation_typeid(
1065  TypeIdentifier&& _annotation_typeid)
1066  {
1067  m_annotation_typeid = std::move(_annotation_typeid);
1068  }
1069 
1070  inline const TypeIdentifier& annotation_typeid() const
1071  {
1072  return m_annotation_typeid;
1073  }
1074 
1076  {
1077  return m_annotation_typeid;
1078  }
1079 
1080  inline void param_seq(
1081  const AppliedAnnotationParameterSeq& _param_seq)
1082  {
1083  m_param_seq = _param_seq;
1084  }
1085 
1086  inline void param_seq(
1087  AppliedAnnotationParameterSeq&& _param_seq)
1088  {
1089  m_param_seq = std::move(_param_seq);
1090  }
1091 
1093  {
1094  return m_param_seq;
1095  }
1096 
1098  {
1099  return m_param_seq;
1100  }
1101 
1102  RTPS_DllAPI static size_t getCdrSerializedSize(
1103  const AppliedAnnotation& data,
1104  size_t current_alignment = 0);
1105  RTPS_DllAPI void serialize(
1106  eprosima::fastcdr::Cdr& cdr) const;
1107  RTPS_DllAPI void deserialize(
1108  eprosima::fastcdr::Cdr& cdr);
1109  RTPS_DllAPI static size_t getKeyMaxCdrSerializedSize(
1110  size_t current_alignment = 0);
1111  RTPS_DllAPI static bool isKeyDefined();
1112  RTPS_DllAPI void serializeKey(
1113  eprosima::fastcdr::Cdr& cdr) const;
1114 
1115  RTPS_DllAPI bool operator ==(
1116  const AppliedAnnotation& other) const;
1117 
1118 private:
1119 
1120  TypeIdentifier m_annotation_typeid;
1121  AppliedAnnotationParameterSeq m_param_seq;
1122 };
1123 
1124 // Sorted by AppliedAnnotation.annotation_typeid
1125 typedef std::vector<AppliedAnnotation> AppliedAnnotationSeq;
1126 
1127 // @verbatim(placement="<placement>", language="<lang>", text="<text>")
1128 /*struct AppliedVerbatimAnnotation {
1129  std::string placement; // 32
1130  std::string language; // 32
1131  std::string text;
1132  };*/
1134 {
1135 public:
1136 
1138 
1140 
1142  const AppliedVerbatimAnnotation& x);
1143 
1146 
1148  const AppliedVerbatimAnnotation& x);
1149 
1152 
1153  inline void placement(
1154  const std::string& _placement)
1155  {
1156  m_placement = _placement;
1157  }
1158 
1159  inline void placement(
1160  std::string&& _placement)
1161  {
1162  m_placement = std::move(_placement);
1163  }
1164 
1165  inline const std::string& placement() const
1166  {
1167  return m_placement;
1168  }
1169 
1170  inline std::string& placement()
1171  {
1172  return m_placement;
1173  }
1174 
1175  inline void language(
1176  const std::string& _language)
1177  {
1178  m_language = _language;
1179  }
1180 
1181  inline void language(
1182  std::string&& _language)
1183  {
1184  m_language = std::move(_language);
1185  }
1186 
1187  inline const std::string& language() const
1188  {
1189  return m_language;
1190  }
1191 
1192  inline std::string& language()
1193  {
1194  return m_language;
1195  }
1196 
1197  inline void text(
1198  const std::string& _text)
1199  {
1200  m_text = _text;
1201  }
1202 
1203  inline void text(
1204  std::string&& _text)
1205  {
1206  m_text = std::move(_text);
1207  }
1208 
1209  inline const std::string& text() const
1210  {
1211  return m_text;
1212  }
1213 
1214  inline std::string& text()
1215  {
1216  return m_text;
1217  }
1218 
1219  RTPS_DllAPI static size_t getCdrSerializedSize(
1220  const AppliedVerbatimAnnotation& data,
1221  size_t current_alignment = 0);
1222 
1223  RTPS_DllAPI void serialize(
1224  eprosima::fastcdr::Cdr& cdr) const;
1225 
1226  RTPS_DllAPI void deserialize(
1227  eprosima::fastcdr::Cdr& cdr);
1228 
1229  RTPS_DllAPI static size_t getKeyMaxCdrSerializedSize(
1230  size_t current_alignment = 0);
1231 
1232  RTPS_DllAPI static bool isKeyDefined();
1233 
1234  RTPS_DllAPI void serializeKey(
1235  eprosima::fastcdr::Cdr& cdr) const;
1236 
1237  RTPS_DllAPI bool operator ==(
1238  const AppliedVerbatimAnnotation& other) const;
1239 
1240 private:
1241 
1242  std::string m_placement;
1243  std::string m_language;
1244  std::string m_text;
1245 };
1246 
1247 // --- Aggregate types: -----------------------------------------------
1248 /*struct AppliedBuiltinMemberAnnotations {
1249  std::string unit; // @unit("<unit>") // @Optional
1250  AnnotationParameterValue min; // @min , @range // @Optional
1251  AnnotationParameterValue max; // @max , @range // @Optional
1252  std::string hash_id; // @hash_id("<membername>") // @Optional
1253  };
1254  */
1256 {
1257 public:
1258 
1260 
1262 
1265 
1268 
1271 
1274 
1275  inline void unit(
1276  const std::string& _unit)
1277  {
1278  m_unit = _unit;
1279  }
1280 
1281  inline void unit(
1282  std::string&& _unit)
1283  {
1284  m_unit = std::move(_unit);
1285  }
1286 
1287  inline const std::string& unit() const
1288  {
1289  return m_unit;
1290  }
1291 
1292  inline std::string& unit()
1293  {
1294  return m_unit;
1295  }
1296 
1297  inline void min(
1298  const AnnotationParameterValue& _min)
1299  {
1300  m_min = _min;
1301  }
1302 
1303  inline void min(
1304  AnnotationParameterValue&& _min)
1305  {
1306  m_min = std::move(_min);
1307  }
1308 
1309  inline const AnnotationParameterValue& min() const
1310  {
1311  return m_min;
1312  }
1313 
1315  {
1316  return m_min;
1317  }
1318 
1319  inline void max(
1320  const AnnotationParameterValue& _max)
1321  {
1322  m_max = _max;
1323  }
1324 
1325  inline void max(
1326  AnnotationParameterValue&& _max)
1327  {
1328  m_max = std::move(_max);
1329  }
1330 
1331  inline const AnnotationParameterValue& max() const
1332  {
1333  return m_max;
1334  }
1335 
1337  {
1338  return m_max;
1339  }
1340 
1341  inline void hash_id(
1342  const std::string& _hash_id)
1343  {
1344  m_hash_id = _hash_id;
1345  }
1346 
1347  inline void hash_id(
1348  std::string&& _hash_id)
1349  {
1350  m_hash_id = std::move(_hash_id);
1351  }
1352 
1353  inline const std::string& hash_id() const
1354  {
1355  return m_hash_id;
1356  }
1357 
1358  inline std::string& hash_id()
1359  {
1360  return m_hash_id;
1361  }
1362 
1363  RTPS_DllAPI static size_t getCdrSerializedSize(
1364  const AppliedBuiltinMemberAnnotations& data,
1365  size_t current_alignment = 0);
1366 
1367  RTPS_DllAPI void serialize(
1368  eprosima::fastcdr::Cdr& cdr) const;
1369 
1370  RTPS_DllAPI void deserialize(
1371  eprosima::fastcdr::Cdr& cdr);
1372 
1373  RTPS_DllAPI static size_t getKeyMaxCdrSerializedSize(
1374  size_t current_alignment = 0);
1375 
1376  RTPS_DllAPI static bool isKeyDefined();
1377 
1378  RTPS_DllAPI void serializeKey(
1379  eprosima::fastcdr::Cdr& cdr) const;
1380 
1381  RTPS_DllAPI bool operator ==(
1382  const AppliedBuiltinMemberAnnotations& other) const;
1383 
1384 private:
1385 
1386  std::string m_unit;
1389  std::string m_hash_id;
1390 };
1391 
1392 
1393 } // namespace types
1394 } // namespace fastrtps
1395 } // namespace eprosima
1396 
1397 #if _MSC_VER
1398 
1399 #if defined(FASTDDS_RESTORE_MIN)
1400 #pragma pop_macro("min")
1401 #undef FASTDDS_RESTORE_MIN
1402 #endif // defined(FASTDDS_RESTORE_MIN)
1403 
1404 #if defined(FASTDDS_RESTORE_MAX)
1405 #pragma pop_macro("max")
1406 #undef FASTDDS_RESTORE_MAX
1407 #endif // defined(FASTDDS_RESTORE_MAX)
1408 
1409 #endif // if _MSC_VER
1410 
1411 #endif // _ANNOTATIONPARAMETERVALUE_H_
This class represents the union AnnotationParameterValue defined by the user in the IDL file.
Definition: AnnotationParameterValue.h:167
RTPS_DllAPI void int16_value(int16_t _int16_value)
This function sets a value in member int16_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 wchar_t & wchar_value()
This function returns a reference to member wchar_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 int32_t & enumerated_value()
This function returns a reference to member enumerated_value.
RTPS_DllAPI void from_string(const std::string &value)
Aux method to set value from its string representation.
Definition: AnnotationParameterValue.h:694
RTPS_DllAPI const std::string & string8_value() const
This function returns a constant reference to member string8_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 char & _d()
This function returns a reference to the discriminator.
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 uint16_t & uint_16_value()
This function returns a reference to member uint_16_value.
RTPS_DllAPI uint8_t byte_value() const
This function returns the value of member byte_value.
RTPS_DllAPI double & float64_value()
This function returns a reference to member float64_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 float & float32_value()
This function returns a reference to member float32_value.
RTPS_DllAPI std::string to_string() const
Aux method to return value as its string representation.
Definition: AnnotationParameterValue.h:647
RTPS_DllAPI AnnotationParameterValue & operator=(const AnnotationParameterValue &x)
Copy assignment.
RTPS_DllAPI uint32_t & uint32_value()
This function returns a reference to member uint32_value.
RTPS_DllAPI std::wstring & string16_value()
This function returns a reference to member string16_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 int16_t & int16_value()
This function returns a reference to member int16_value.
RTPS_DllAPI void uint32_value(uint32_t _uint32_value)
This function sets a value in member uint32_value.
RTPS_DllAPI int64_t int64_value() const
This function returns the value of member int64_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 AnnotationParameterValue(AnnotationParameterValue &&x)
Move constructor.
RTPS_DllAPI wchar_t wchar_value() const
This function returns the value of member wchar_value.
RTPS_DllAPI std::string & string8_value()
This function returns a reference to member string8_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 char & char_value()
This function returns a reference to member char_value.
RTPS_DllAPI const std::wstring & string16_value() const
This function returns a constant reference to member string16_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 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 void uint_16_value(uint16_t _uint_16_value)
This function sets a value in member uint_16_value.
RTPS_DllAPI bool & boolean_value()
This function returns a reference to member boolean_value.
RTPS_DllAPI ~AnnotationParameterValue()
Default destructor.
RTPS_DllAPI uint8_t & byte_value()
This function returns a reference to member byte_value.
RTPS_DllAPI AnnotationParameterValue()
Default constructor.
RTPS_DllAPI void serializeKey(eprosima::fastcdr::Cdr &cdr) const
This function serializes the key members of an object using CDR serialization.
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 int32_t & int32_value()
This function returns a reference to member int32_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 int64_t & int64_value()
This function returns a reference to member int64_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 ExtendedAnnotationParameterValue & extended_value()
This function returns a reference to member extended_value.
RTPS_DllAPI char char_value() const
This function returns the value of member char_value.
RTPS_DllAPI const ExtendedAnnotationParameterValue & extended_value() const
This function returns a constant 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:1041
TypeIdentifier & annotation_typeid()
Definition: AnnotationParameterValue.h:1075
AppliedAnnotationParameterSeq & param_seq()
Definition: AnnotationParameterValue.h:1097
RTPS_DllAPI bool operator==(const AppliedAnnotation &other) const
void param_seq(const AppliedAnnotationParameterSeq &_param_seq)
Definition: AnnotationParameterValue.h:1080
void annotation_typeid(const TypeIdentifier &_annotation_typeid)
Definition: AnnotationParameterValue.h:1058
static RTPS_DllAPI size_t getKeyMaxCdrSerializedSize(size_t current_alignment=0)
RTPS_DllAPI AppliedAnnotation & operator=(const AppliedAnnotation &x)
RTPS_DllAPI void deserialize(eprosima::fastcdr::Cdr &cdr)
void param_seq(AppliedAnnotationParameterSeq &&_param_seq)
Definition: AnnotationParameterValue.h:1086
RTPS_DllAPI void serialize(eprosima::fastcdr::Cdr &cdr) const
static RTPS_DllAPI size_t getCdrSerializedSize(const AppliedAnnotation &data, size_t current_alignment=0)
const AppliedAnnotationParameterSeq & param_seq() const
Definition: AnnotationParameterValue.h:1092
RTPS_DllAPI AppliedAnnotation(AppliedAnnotation &&x)
RTPS_DllAPI void serializeKey(eprosima::fastcdr::Cdr &cdr) const
RTPS_DllAPI AppliedAnnotation(const AppliedAnnotation &x)
const TypeIdentifier & annotation_typeid() const
Definition: AnnotationParameterValue.h:1070
void annotation_typeid(TypeIdentifier &&_annotation_typeid)
Definition: AnnotationParameterValue.h:1064
This class represents the structure AppliedAnnotationParameter defined by the user in the IDL file.
Definition: AnnotationParameterValue.h:820
RTPS_DllAPI AppliedAnnotationParameter()
Default constructor.
RTPS_DllAPI bool operator==(const AppliedAnnotationParameter &other) const
NameHash & paramname_hash()
This function returns a reference to member paramname_hash.
Definition: AnnotationParameterValue.h:894
RTPS_DllAPI AppliedAnnotationParameter(const AppliedAnnotationParameter &x)
Copy constructor.
void value(const AnnotationParameterValue &_value)
This function copies the value in member value.
Definition: AnnotationParameterValue.h:903
void value(AnnotationParameterValue &&_value)
This function moves the value in member value.
Definition: AnnotationParameterValue.h:913
static RTPS_DllAPI size_t getKeyMaxCdrSerializedSize(size_t current_alignment=0)
This function returns the maximum serialized size of the Key of an object depending on the buffer ali...
AnnotationParameterValue & value()
This function returns a reference to member value.
Definition: AnnotationParameterValue.h:932
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:865
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:875
RTPS_DllAPI AppliedAnnotationParameter & operator=(const AppliedAnnotationParameter &x)
Copy assignment.
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.
const AnnotationParameterValue & value() const
This function returns a constant reference to member value.
Definition: AnnotationParameterValue.h:923
const NameHash & paramname_hash() const
This function returns a constant reference to member paramname_hash.
Definition: AnnotationParameterValue.h:885
RTPS_DllAPI ~AppliedAnnotationParameter()
Default destructor.
Definition: AnnotationParameterValue.h:1256
RTPS_DllAPI AppliedBuiltinMemberAnnotations & operator=(const AppliedBuiltinMemberAnnotations &x)
const AnnotationParameterValue & min() const
Definition: AnnotationParameterValue.h:1309
void max(const AnnotationParameterValue &_max)
Definition: AnnotationParameterValue.h:1319
void min(AnnotationParameterValue &&_min)
Definition: AnnotationParameterValue.h:1303
AnnotationParameterValue & min()
Definition: AnnotationParameterValue.h:1314
static RTPS_DllAPI size_t getCdrSerializedSize(const AppliedBuiltinMemberAnnotations &data, size_t current_alignment=0)
const std::string & unit() const
Definition: AnnotationParameterValue.h:1287
void hash_id(std::string &&_hash_id)
Definition: AnnotationParameterValue.h:1347
void unit(std::string &&_unit)
Definition: AnnotationParameterValue.h:1281
AnnotationParameterValue & max()
Definition: AnnotationParameterValue.h:1336
void max(AnnotationParameterValue &&_max)
Definition: AnnotationParameterValue.h:1325
std::string & unit()
Definition: AnnotationParameterValue.h:1292
static RTPS_DllAPI size_t getKeyMaxCdrSerializedSize(size_t current_alignment=0)
RTPS_DllAPI AppliedBuiltinMemberAnnotations(AppliedBuiltinMemberAnnotations &&x)
std::string & hash_id()
Definition: AnnotationParameterValue.h:1358
RTPS_DllAPI void deserialize(eprosima::fastcdr::Cdr &cdr)
RTPS_DllAPI void serialize(eprosima::fastcdr::Cdr &cdr) const
RTPS_DllAPI AppliedBuiltinMemberAnnotations(const AppliedBuiltinMemberAnnotations &x)
void unit(const std::string &_unit)
Definition: AnnotationParameterValue.h:1275
RTPS_DllAPI void serializeKey(eprosima::fastcdr::Cdr &cdr) const
void hash_id(const std::string &_hash_id)
Definition: AnnotationParameterValue.h:1341
void min(const AnnotationParameterValue &_min)
Definition: AnnotationParameterValue.h:1297
const AnnotationParameterValue & max() const
Definition: AnnotationParameterValue.h:1331
RTPS_DllAPI bool operator==(const AppliedBuiltinMemberAnnotations &other) const
const std::string & hash_id() const
Definition: AnnotationParameterValue.h:1353
Definition: AnnotationParameterValue.h:1134
void text(const std::string &_text)
Definition: AnnotationParameterValue.h:1197
RTPS_DllAPI AppliedVerbatimAnnotation & operator=(const AppliedVerbatimAnnotation &x)
void text(std::string &&_text)
Definition: AnnotationParameterValue.h:1203
std::string & text()
Definition: AnnotationParameterValue.h:1214
static RTPS_DllAPI size_t getKeyMaxCdrSerializedSize(size_t current_alignment=0)
void placement(std::string &&_placement)
Definition: AnnotationParameterValue.h:1159
std::string & placement()
Definition: AnnotationParameterValue.h:1170
const std::string & text() const
Definition: AnnotationParameterValue.h:1209
RTPS_DllAPI void deserialize(eprosima::fastcdr::Cdr &cdr)
RTPS_DllAPI AppliedVerbatimAnnotation(const AppliedVerbatimAnnotation &x)
const std::string & placement() const
Definition: AnnotationParameterValue.h:1165
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:1153
RTPS_DllAPI AppliedVerbatimAnnotation(AppliedVerbatimAnnotation &&x)
void language(const std::string &_language)
Definition: AnnotationParameterValue.h:1175
void language(std::string &&_language)
Definition: AnnotationParameterValue.h:1181
std::string & language()
Definition: AnnotationParameterValue.h:1192
RTPS_DllAPI void serializeKey(eprosima::fastcdr::Cdr &cdr) const
const std::string & language() const
Definition: AnnotationParameterValue.h:1187
This class represents the structure ExtendedAnnotationParameterValue defined by the user in the IDL f...
Definition: AnnotationParameterValue.h:64
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:154
RTPS_DllAPI ExtendedAnnotationParameterValue & operator=(const ExtendedAnnotationParameterValue &x)
Copy assignment.
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:1034
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:1125
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::wstring wstring_from_bytes(const std::string &str)
std::string wstring_to_bytes(const std::wstring &str)
eProsima namespace.
Definition: LibrarySettingsAttributes.h:23