Zserio C++ runtime library  1.0.2
Built for Zserio 2.14.1
TypeInfo.h
Go to the documentation of this file.
1 #ifndef ZSERIO_TYPE_INFO_INC_H
2 #define ZSERIO_TYPE_INFO_INC_H
3 
4 #include <algorithm>
5 #include <memory>
6 #include <string>
7 
8 #include "zserio/AnyHolder.h"
9 #include "zserio/BitBuffer.h"
11 #include "zserio/ITypeInfo.h"
12 
13 namespace zserio
14 {
15 
22 template <typename ALLOC>
23 class TypeInfoBase : public IBasicTypeInfo<ALLOC>
24 {
25 public:
33  TypeInfoBase(StringView schemaName, SchemaType schemaType, CppType cppType);
34 
39  TypeInfoBase(const TypeInfoBase&) = delete;
40  TypeInfoBase& operator=(const TypeInfoBase&) = delete;
41 
42  TypeInfoBase(const TypeInfoBase&&) = delete;
43  TypeInfoBase& operator=(const TypeInfoBase&&) = delete;
48  ~TypeInfoBase() override = 0;
49 
50  StringView getSchemaName() const override;
51  SchemaType getSchemaType() const override;
52  CppType getCppType() const override;
53  uint8_t getBitSize() const override;
54 
58 
59  StringView getSelector() const override;
61 
62  const IBasicTypeInfo<ALLOC>& getUnderlyingType() const override;
66 
68  StringView getSqlConstraint() const override;
69  StringView getVirtualTableUsing() const override;
70  bool isWithoutRowId() const override;
71 
73 
74  StringView getTemplateName() const override;
76 
79 
80  IBasicReflectablePtr<ALLOC> createInstance(const ALLOC& allocator) const override;
82 
83 private:
84  StringView m_schemaName;
85  SchemaType m_schemaType;
86  CppType m_cppType;
87 };
88 
92 template <typename ALLOC = std::allocator<uint8_t>>
93 class BuiltinTypeInfo : public TypeInfoBase<ALLOC>
94 {
95 protected:
103  BuiltinTypeInfo(StringView schemaName, SchemaType schemaType, CppType cppType);
104 
105 public:
112 
119 
126 
133 
140 
147 
154 
161 
168 
175 
182 
189 
196 
203 
210 
217 
224 
231 
238 
245 
252 
259 
266 
273 
281  static const IBasicTypeInfo<ALLOC>& getFixedSignedBitField(uint8_t bitSize);
282 
290  static const IBasicTypeInfo<ALLOC>& getFixedUnsignedBitField(uint8_t bitSize);
291 
299  static const IBasicTypeInfo<ALLOC>& getDynamicSignedBitField(uint8_t maxBitSize);
300 
308  static const IBasicTypeInfo<ALLOC>& getDynamicUnsignedBitField(uint8_t maxBitSize);
309 };
310 
314 template <typename ALLOC>
316 {
317 protected:
326  FixedSizeBuiltinTypeInfo(StringView schemaName, SchemaType schemaType, CppType cppType, uint8_t bitSize);
327 
328 public:
329  uint8_t getBitSize() const override;
330 
336  static const IBasicTypeInfo<ALLOC>& getBool();
337 
343  static const IBasicTypeInfo<ALLOC>& getInt8();
344 
350  static const IBasicTypeInfo<ALLOC>& getInt16();
351 
357  static const IBasicTypeInfo<ALLOC>& getInt32();
358 
364  static const IBasicTypeInfo<ALLOC>& getInt64();
365 
371  static const IBasicTypeInfo<ALLOC>& getUInt8();
372 
378  static const IBasicTypeInfo<ALLOC>& getUInt16();
379 
385  static const IBasicTypeInfo<ALLOC>& getUInt32();
386 
392  static const IBasicTypeInfo<ALLOC>& getUInt64();
393 
399  static const IBasicTypeInfo<ALLOC>& getFloat16();
400 
406  static const IBasicTypeInfo<ALLOC>& getFloat32();
407 
413  static const IBasicTypeInfo<ALLOC>& getFloat64();
414 
422  static const IBasicTypeInfo<ALLOC>& getFixedSignedBitField(uint8_t bitSize);
423 
431  static const IBasicTypeInfo<ALLOC>& getFixedUnsignedBitField(uint8_t bitSize);
432 
433 private:
434  uint8_t m_bitSize;
435 };
436 
440 template <typename ALLOC>
442 {
443 public:
453  TemplatableTypeInfoBase(StringView schemaName, SchemaType schemaType, CppType cppType,
454  StringView templateName, Span<const BasicTemplateArgumentInfo<ALLOC>> templateArguments);
455 
456  ~TemplatableTypeInfoBase() override = 0;
457 
460 
463 
464  StringView getTemplateName() const override;
466 
467 private:
468  StringView m_templateName;
469  Span<const BasicTemplateArgumentInfo<ALLOC>> m_templateArguments;
470 };
471 
475 template <typename ALLOC>
477 {
478 public:
481 
494  CompoundTypeInfoBase(StringView schemaName, CreateInstanceFunc createInstanceFunc, SchemaType schemaType,
495  CppType cppType, StringView templateName,
496  Span<const BasicTemplateArgumentInfo<ALLOC>> templateArguments,
497  Span<const BasicFieldInfo<ALLOC>> fields, Span<const BasicParameterInfo<ALLOC>> parameters,
498  Span<const BasicFunctionInfo<ALLOC>> functions);
499 
500  ~CompoundTypeInfoBase() override = 0;
501 
504 
507 
511 
512  IBasicReflectablePtr<ALLOC> createInstance(const ALLOC& allocator) const override;
513 
514 private:
515  CreateInstanceFunc m_createInstanceFunc;
519 };
520 
524 template <typename ALLOC>
526 {
527 public:
529 
540  StructTypeInfo(StringView schemaName, CreateInstanceFunc createInstanceFunc, StringView templateName,
541  Span<const BasicTemplateArgumentInfo<ALLOC>> templateArguments,
542  Span<const BasicFieldInfo<ALLOC>> fields, Span<const BasicParameterInfo<ALLOC>> parameters,
543  Span<const BasicFunctionInfo<ALLOC>> functions);
544 };
545 
549 template <typename ALLOC>
550 class UnionTypeInfo : public CompoundTypeInfoBase<ALLOC>
551 {
552 public:
554 
565  UnionTypeInfo(StringView schemaName, CreateInstanceFunc createInstanceFunc, StringView templateName,
566  Span<const BasicTemplateArgumentInfo<ALLOC>> templateArguments,
567  Span<const BasicFieldInfo<ALLOC>> fields, Span<const BasicParameterInfo<ALLOC>> parameters,
568  Span<const BasicFunctionInfo<ALLOC>> functions);
569 };
570 
574 template <typename ALLOC>
576 {
577 public:
579 
592  ChoiceTypeInfo(StringView schemaName, CreateInstanceFunc createInstanceFunc, StringView templateName,
593  Span<const BasicTemplateArgumentInfo<ALLOC>> templateArguments,
594  Span<const BasicFieldInfo<ALLOC>> fields, Span<const BasicParameterInfo<ALLOC>> parameters,
595  Span<const BasicFunctionInfo<ALLOC>> functions, StringView selector,
596  Span<const BasicCaseInfo<ALLOC>> cases);
597 
598  StringView getSelector() const override;
599  Span<const BasicCaseInfo<ALLOC>> getCases() const override;
600 
601 private:
602  StringView m_selector;
604 };
605 
609 template <typename ALLOC>
611 {
612 public:
622  TypeInfoWithUnderlyingTypeBase(StringView schemaName, SchemaType schemaType, CppType cppType,
623  const IBasicTypeInfo<ALLOC>& underlyingType, Span<const StringView> underlyingTypeArguments);
624 
625  const IBasicTypeInfo<ALLOC>& getUnderlyingType() const override;
627 
628 private:
629  const IBasicTypeInfo<ALLOC>& m_underlyingType;
630  Span<const StringView> m_underlyingTypeArguments;
631 };
632 
636 template <typename ALLOC>
638 {
639 public:
648  EnumTypeInfo(StringView schemaName, const IBasicTypeInfo<ALLOC>& underlyingType,
649  Span<const StringView> underlyingTypeArguments, Span<const ItemInfo> enumItems);
650 
651  Span<const ItemInfo> getEnumItems() const override;
652 
653 private:
654  Span<const ItemInfo> m_enumItems;
655 };
656 
660 template <typename ALLOC>
662 {
663 public:
672  BitmaskTypeInfo(StringView schemaName, const IBasicTypeInfo<ALLOC>& underlyingType,
673  Span<const StringView> underlyingTypeArguments, Span<const ItemInfo> bitmaskValues);
674 
675  Span<const ItemInfo> getBitmaskValues() const override;
676 
677 private:
678  Span<const ItemInfo> m_bitmaskValues;
679 };
680 
684 template <typename ALLOC>
686 {
687 public:
699  SqlTableTypeInfo(StringView schemaName, StringView templateName,
700  Span<const BasicTemplateArgumentInfo<ALLOC>> templateArguments,
701  Span<const BasicColumnInfo<ALLOC>> columns, StringView sqlConstraint, StringView virtualTableUsing,
702  bool isWithoutRowId);
703 
705  StringView getSqlConstraint() const override;
706  StringView getVirtualTableUsing() const override;
707  bool isWithoutRowId() const override;
708 
709 private:
711  StringView m_sqlConstraint;
712  StringView m_virtualTableUsing;
713  bool m_isWithoutRowId;
714 };
715 
719 template <typename ALLOC>
720 class SqlDatabaseTypeInfo : public TypeInfoBase<ALLOC>
721 {
722 public:
729  SqlDatabaseTypeInfo(StringView schemaName, Span<const BasicTableInfo<ALLOC>> tables);
730 
732 
733 private:
735 };
736 
740 template <typename ALLOC>
741 class PubsubTypeInfo : public TypeInfoBase<ALLOC>
742 {
743 public:
750  PubsubTypeInfo(StringView schemaName, Span<const BasicMessageInfo<ALLOC>> messages);
751 
753 
754 private:
756 };
757 
761 template <typename ALLOC>
762 class ServiceTypeInfo : public TypeInfoBase<ALLOC>
763 {
764 public:
771  ServiceTypeInfo(StringView schemaName, Span<const BasicMethodInfo<ALLOC>> methods);
772 
774 
775 private:
777 };
778 
783 template <typename ALLOC>
784 class RecursiveTypeInfo : public IBasicTypeInfo<ALLOC>
785 {
786 public:
788  using TypeInfoFunc = const IBasicTypeInfo<ALLOC>& (*)();
789 
795  explicit RecursiveTypeInfo(TypeInfoFunc typeInfoFunc) :
796  m_typeInfoFunc(typeInfoFunc)
797  {}
798 
799  ~RecursiveTypeInfo() override = default;
800 
807 
814  StringView getSchemaName() const override;
815  SchemaType getSchemaType() const override;
816  CppType getCppType() const override;
817  uint8_t getBitSize() const override;
818 
822 
823  StringView getSelector() const override;
824  Span<const BasicCaseInfo<ALLOC>> getCases() const override;
825 
826  const IBasicTypeInfo<ALLOC>& getUnderlyingType() const override;
828  Span<const ItemInfo> getEnumItems() const override;
829  Span<const ItemInfo> getBitmaskValues() const override;
830 
832  StringView getSqlConstraint() const override;
833  StringView getVirtualTableUsing() const override;
834  bool isWithoutRowId() const override;
835 
837 
838  StringView getTemplateName() const override;
840 
843 
844  IBasicReflectablePtr<ALLOC> createInstance(const ALLOC& allocator) const override;
846 
847 private:
848  TypeInfoFunc m_typeInfoFunc;
849 };
850 
851 template <typename ALLOC>
853  m_schemaName(schemaName),
854  m_schemaType(schemaType),
855  m_cppType(cppType)
856 {}
857 
858 template <typename ALLOC>
860 
861 template <typename ALLOC>
863 {
864  return m_schemaName;
865 }
866 
867 template <typename ALLOC>
869 {
870  return m_schemaType;
871 }
872 
873 template <typename ALLOC>
875 {
876  return m_cppType;
877 }
878 
879 template <typename ALLOC>
881 {
882  throw CppRuntimeException("Type '") << getSchemaName() << "' is not a fixed size type!";
883 }
884 
885 template <typename ALLOC>
887 {
888  throw CppRuntimeException("Type '") << getSchemaName() << "' is not a compound type!";
889 }
890 
891 template <typename ALLOC>
893 {
894  throw CppRuntimeException("Type '") << getSchemaName() << "' is not a compound type!";
895 }
896 
897 template <typename ALLOC>
899 {
900  throw CppRuntimeException("Type '") << getSchemaName() << "' is not a compound type!";
901 }
902 
903 template <typename ALLOC>
905 {
906  throw CppRuntimeException("Type '") << getSchemaName() << "' is not a choice type!";
907 }
908 
909 template <typename ALLOC>
911 {
912  throw CppRuntimeException("Type '") << getSchemaName() << "' is not a choice type!";
913 }
914 
915 template <typename ALLOC>
917 {
918  throw CppRuntimeException("Type '") << getSchemaName() << "' does not have underlying type!";
919 }
920 
921 template <typename ALLOC>
923 {
924  throw CppRuntimeException("Type '") << getSchemaName() << "' does not have underlying type!";
925 }
926 
927 template <typename ALLOC>
929 {
930  throw CppRuntimeException("Type '") << getSchemaName() << "' is not an enum type!";
931 }
932 
933 template <typename ALLOC>
935 {
936  throw CppRuntimeException("Type '") << getSchemaName() << "' is not a bitmask type!";
937 }
938 
939 template <typename ALLOC>
941 {
942  throw CppRuntimeException("Type '") << getSchemaName() << "' is not a SQL table type!";
943 }
944 
945 template <typename ALLOC>
947 {
948  throw CppRuntimeException("Type '") << getSchemaName() << "' is not a SQL table type!";
949 }
950 
951 template <typename ALLOC>
953 {
954  throw CppRuntimeException("Type '") << getSchemaName() << "' is not a SQL table type!";
955 }
956 
957 template <typename ALLOC>
959 {
960  throw CppRuntimeException("Type '") << getSchemaName() << "' is not a SQL table type!";
961 }
962 
963 template <typename ALLOC>
965 {
966  throw CppRuntimeException("Type '") << getSchemaName() << "' is not a SQL database type!";
967 }
968 
969 template <typename ALLOC>
971 {
972  throw CppRuntimeException("Type '") << getSchemaName() << "' is not a templatable type!";
973 }
974 
975 template <typename ALLOC>
977 {
978  throw CppRuntimeException("Type '") << getSchemaName() << "' is not a templatable type!";
979 }
980 
981 template <typename ALLOC>
983 {
984  throw CppRuntimeException("Type '") << getSchemaName() << "' is not a pubsub type!";
985 }
986 
987 template <typename ALLOC>
989 {
990  throw CppRuntimeException("Type '") << getSchemaName() << "' is not a service type!";
991 }
992 
993 template <typename ALLOC>
995 {
996  throw CppRuntimeException("Type '") << getSchemaName() << "' is not a compound type!";
997 }
998 
999 template <typename ALLOC>
1001 {
1002  return createInstance(ALLOC());
1003 }
1004 
1005 template <typename ALLOC>
1007  TypeInfoBase<ALLOC>(schemaName, schemaType, cppType)
1008 {}
1009 
1010 template <typename ALLOC>
1012 {
1014 }
1015 
1016 template <typename ALLOC>
1018 {
1020 }
1021 
1022 template <typename ALLOC>
1024 {
1026 }
1027 
1028 template <typename ALLOC>
1030 {
1032 }
1033 
1034 template <typename ALLOC>
1036 {
1038 }
1039 
1040 template <typename ALLOC>
1042 {
1044 }
1045 
1046 template <typename ALLOC>
1048 {
1050 }
1051 
1052 template <typename ALLOC>
1054 {
1056 }
1057 
1058 template <typename ALLOC>
1060 {
1062 }
1063 
1064 template <typename ALLOC>
1066 {
1067  static const BuiltinTypeInfo<ALLOC> typeInfo = {
1068  makeStringView("varint16"), SchemaType::VARINT16, CppType::INT16};
1069  return typeInfo;
1070 }
1071 
1072 template <typename ALLOC>
1074 {
1075  static const BuiltinTypeInfo<ALLOC> typeInfo = {
1076  makeStringView("varint32"), SchemaType::VARINT32, CppType::INT32};
1077  return typeInfo;
1078 }
1079 
1080 template <typename ALLOC>
1082 {
1083  static const BuiltinTypeInfo<ALLOC> typeInfo = {
1084  makeStringView("varint64"), SchemaType::VARINT64, CppType::INT64};
1085  return typeInfo;
1086 }
1087 
1088 template <typename ALLOC>
1090 {
1091  static const BuiltinTypeInfo<ALLOC> typeInfo = {
1092  makeStringView("varint"), SchemaType::VARINT, CppType::INT64};
1093  return typeInfo;
1094 }
1095 
1096 template <typename ALLOC>
1098 {
1099  static const BuiltinTypeInfo<ALLOC> typeInfo = {
1100  makeStringView("varuint16"), SchemaType::VARUINT16, CppType::UINT16};
1101  return typeInfo;
1102 }
1103 
1104 template <typename ALLOC>
1106 {
1107  static const BuiltinTypeInfo<ALLOC> typeInfo = {
1108  makeStringView("varuint32"), SchemaType::VARUINT32, CppType::UINT32};
1109  return typeInfo;
1110 }
1111 
1112 template <typename ALLOC>
1114 {
1115  static const BuiltinTypeInfo<ALLOC> typeInfo = {
1116  makeStringView("varuint64"), SchemaType::VARUINT64, CppType::UINT64};
1117  return typeInfo;
1118 }
1119 
1120 template <typename ALLOC>
1122 {
1123  static const BuiltinTypeInfo<ALLOC> typeInfo = {
1124  makeStringView("varuint"), SchemaType::VARUINT, CppType::UINT64};
1125  return typeInfo;
1126 }
1127 
1128 template <typename ALLOC>
1130 {
1131  static const BuiltinTypeInfo<ALLOC> typeInfo = {
1132  makeStringView("varsize"), SchemaType::VARSIZE, CppType::UINT32};
1133  return typeInfo;
1134 }
1135 
1136 template <typename ALLOC>
1138 {
1140 }
1141 
1142 template <typename ALLOC>
1144 {
1146 }
1147 
1148 template <typename ALLOC>
1150 {
1152 }
1153 
1154 template <typename ALLOC>
1156 {
1157  static const BuiltinTypeInfo<ALLOC> typeInfo = {makeStringView("bytes"), SchemaType::BYTES, CppType::BYTES};
1158  return typeInfo;
1159 }
1160 
1161 template <typename ALLOC>
1163 {
1164  static const BuiltinTypeInfo<ALLOC> typeInfo = {
1165  makeStringView("string"), SchemaType::STRING, CppType::STRING};
1166  return typeInfo;
1167 }
1168 
1169 template <typename ALLOC>
1171 {
1172  static const BuiltinTypeInfo<ALLOC> typeInfo = {
1173  makeStringView("extern"), SchemaType::EXTERN, CppType::BIT_BUFFER};
1174  return typeInfo;
1175 }
1176 
1177 template <typename ALLOC>
1179 {
1181 }
1182 
1183 template <typename ALLOC>
1185 {
1187 }
1188 
1189 template <typename ALLOC>
1191 {
1192  if (maxBitSize == 0 || maxBitSize > 64)
1193  {
1194  throw CppRuntimeException("BuiltinTypeInfo::getDynamicSignedBitField: Invalid max bit size '")
1195  << maxBitSize << "'!";
1196  }
1197 
1198  if (maxBitSize <= 8)
1199  {
1200  static const BuiltinTypeInfo<ALLOC> typeInfo = {
1201  "int<>"_sv, SchemaType::DYNAMIC_SIGNED_BITFIELD, CppType::INT8};
1202  return typeInfo;
1203  }
1204  else if (maxBitSize <= 16)
1205  {
1206  static const BuiltinTypeInfo<ALLOC> typeInfo = {
1207  "int<>"_sv, SchemaType::DYNAMIC_SIGNED_BITFIELD, CppType::INT16};
1208  return typeInfo;
1209  }
1210  else if (maxBitSize <= 32)
1211  {
1212  static const BuiltinTypeInfo<ALLOC> typeInfo = {
1213  "int<>"_sv, SchemaType::DYNAMIC_SIGNED_BITFIELD, CppType::INT32};
1214  return typeInfo;
1215  }
1216  else
1217  {
1218  static const BuiltinTypeInfo<ALLOC> typeInfo = {
1219  "int<>"_sv, SchemaType::DYNAMIC_SIGNED_BITFIELD, CppType::INT64};
1220  return typeInfo;
1221  }
1222 }
1223 
1224 template <typename ALLOC>
1226 {
1227  if (maxBitSize == 0 || maxBitSize > 64)
1228  {
1229  throw CppRuntimeException("BuiltinTypeInfo::getDynamicUnsignedBitField: Invalid max bit size '")
1230  << maxBitSize << "'!";
1231  }
1232 
1233  if (maxBitSize <= 8)
1234  {
1235  static const BuiltinTypeInfo<ALLOC> typeInfo = {
1236  "bit<>"_sv, SchemaType::DYNAMIC_UNSIGNED_BITFIELD, CppType::UINT8};
1237  return typeInfo;
1238  }
1239  else if (maxBitSize <= 16)
1240  {
1241  static const BuiltinTypeInfo<ALLOC> typeInfo = {
1242  "bit<>"_sv, SchemaType::DYNAMIC_UNSIGNED_BITFIELD, CppType::UINT16};
1243  return typeInfo;
1244  }
1245  else if (maxBitSize <= 32)
1246  {
1247  static const BuiltinTypeInfo<ALLOC> typeInfo = {
1248  "bit<>"_sv, SchemaType::DYNAMIC_UNSIGNED_BITFIELD, CppType::UINT32};
1249  return typeInfo;
1250  }
1251  else
1252  {
1253  static const BuiltinTypeInfo<ALLOC> typeInfo = {
1254  "bit<>"_sv, SchemaType::DYNAMIC_UNSIGNED_BITFIELD, CppType::UINT64};
1255  return typeInfo;
1256  }
1257 }
1258 
1259 template <typename ALLOC>
1261  StringView schemaName, SchemaType schemaType, CppType cppType, uint8_t bitSize) :
1262  BuiltinTypeInfo<ALLOC>(schemaName, schemaType, cppType),
1263  m_bitSize(bitSize)
1264 {}
1265 
1266 template <typename ALLOC>
1268 {
1269  return m_bitSize;
1270 }
1271 
1272 template <typename ALLOC>
1274 {
1275  static const FixedSizeBuiltinTypeInfo<ALLOC> typeInfo = {
1277  return typeInfo;
1278 }
1279 
1280 template <typename ALLOC>
1282 {
1283  static const FixedSizeBuiltinTypeInfo<ALLOC> typeInfo = {
1285  return typeInfo;
1286 }
1287 
1288 template <typename ALLOC>
1290 {
1291  static const FixedSizeBuiltinTypeInfo<ALLOC> typeInfo = {
1293  return typeInfo;
1294 }
1295 
1296 template <typename ALLOC>
1298 {
1299  static const FixedSizeBuiltinTypeInfo<ALLOC> typeInfo = {
1301  return typeInfo;
1302 }
1303 
1304 template <typename ALLOC>
1306 {
1307  static const FixedSizeBuiltinTypeInfo<ALLOC> typeInfo = {
1309  return typeInfo;
1310 }
1311 
1312 template <typename ALLOC>
1314 {
1315  static const FixedSizeBuiltinTypeInfo<ALLOC> typeInfo = {
1317  return typeInfo;
1318 }
1319 
1320 template <typename ALLOC>
1322 {
1323  static const FixedSizeBuiltinTypeInfo<ALLOC> typeInfo = {
1325  return typeInfo;
1326 }
1327 
1328 template <typename ALLOC>
1330 {
1331  static const FixedSizeBuiltinTypeInfo<ALLOC> typeInfo = {
1333  return typeInfo;
1334 }
1335 
1336 template <typename ALLOC>
1338 {
1339  static const FixedSizeBuiltinTypeInfo<ALLOC> typeInfo = {
1341  return typeInfo;
1342 }
1343 
1344 template <typename ALLOC>
1346 {
1347  static const FixedSizeBuiltinTypeInfo<ALLOC> typeInfo = {
1349  return typeInfo;
1350 }
1351 
1352 template <typename ALLOC>
1354 {
1355  static const FixedSizeBuiltinTypeInfo<ALLOC> typeInfo = {
1357  return typeInfo;
1358 }
1359 
1360 template <typename ALLOC>
1362 {
1363  static const FixedSizeBuiltinTypeInfo<ALLOC> typeInfo = {
1365  return typeInfo;
1366 }
1367 
1368 template <typename ALLOC>
1370 {
1371  if (bitSize == 0 || bitSize > 64)
1372  {
1373  throw CppRuntimeException("FixedSizeBuiltinTypeInfo::getFixedSignedBitField: Invalid bit size '")
1374  << bitSize << "'!";
1375  }
1376 
1377  static const std::array<FixedSizeBuiltinTypeInfo<ALLOC>, 64> bitFieldTypeInfoArray = {
1441  {"int:64"_sv, SchemaType::FIXED_SIGNED_BITFIELD, CppType::INT64, 64}}};
1442 
1443  return bitFieldTypeInfoArray[bitSize - 1U];
1444 }
1445 
1446 template <typename ALLOC>
1448 {
1449  if (bitSize == 0 || bitSize > 64)
1450  {
1451  throw CppRuntimeException("FixedSizeBuiltinTypeInfo::getFixedUnsignedBitField: Invalid bit size '")
1452  << bitSize << "'!";
1453  }
1454 
1455  static const std::array<FixedSizeBuiltinTypeInfo<ALLOC>, 64> bitFieldTypeInfoArray = {
1520 
1521  return bitFieldTypeInfoArray[static_cast<size_t>(bitSize - 1)];
1522 }
1523 
1524 template <typename ALLOC>
1526  CppType cppType, StringView templateName,
1527  Span<const BasicTemplateArgumentInfo<ALLOC>> templateArguments) :
1528  TypeInfoBase<ALLOC>(schemaName, schemaType, cppType),
1529  m_templateName(templateName),
1530  m_templateArguments(templateArguments)
1531 {}
1532 
1533 template <typename ALLOC>
1535 
1536 template <typename ALLOC>
1538 {
1539  return m_templateName;
1540 }
1541 
1542 template <typename ALLOC>
1544 {
1545  return m_templateArguments;
1546 }
1547 
1548 template <typename ALLOC>
1550  SchemaType schemaType, CppType cppType, StringView templateName,
1551  Span<const BasicTemplateArgumentInfo<ALLOC>> templateArguments,
1552  Span<const BasicFieldInfo<ALLOC>> fields, Span<const BasicParameterInfo<ALLOC>> parameters,
1553  Span<const BasicFunctionInfo<ALLOC>> functions) :
1554  TemplatableTypeInfoBase<ALLOC>(schemaName, schemaType, cppType, templateName, templateArguments),
1555  m_createInstanceFunc(createInstanceFunc),
1556  m_fields(fields),
1557  m_parameters(parameters),
1558  m_functions(functions)
1559 {}
1560 
1561 template <typename ALLOC>
1563 
1564 template <typename ALLOC>
1566 {
1567  return m_fields;
1568 }
1569 
1570 template <typename ALLOC>
1572 {
1573  return m_parameters;
1574 }
1575 
1576 template <typename ALLOC>
1578 {
1579  return m_functions;
1580 }
1581 
1582 template <typename ALLOC>
1584 {
1585  if (!m_createInstanceFunc)
1586  {
1587  throw CppRuntimeException("Reflectable '")
1588  << getSchemaName() << "': Cannot create instance, "
1589  << "either '-withoutWriterCode' or '-withoutReflectionCode' zserio option is used!";
1590  }
1591  return m_createInstanceFunc(allocator);
1592 }
1593 
1594 template <typename ALLOC>
1596  StringView templateName, Span<const BasicTemplateArgumentInfo<ALLOC>> templateArguments,
1597  Span<const BasicFieldInfo<ALLOC>> fields, Span<const BasicParameterInfo<ALLOC>> parameters,
1598  Span<const BasicFunctionInfo<ALLOC>> functions) :
1599  CompoundTypeInfoBase<ALLOC>(schemaName, createInstanceFunc, SchemaType::STRUCT, CppType::STRUCT,
1600  templateName, templateArguments, fields, parameters, functions)
1601 {}
1602 
1603 template <typename ALLOC>
1605  StringView templateName, Span<const BasicTemplateArgumentInfo<ALLOC>> templateArguments,
1606  Span<const BasicFieldInfo<ALLOC>> fields, Span<const BasicParameterInfo<ALLOC>> parameters,
1607  Span<const BasicFunctionInfo<ALLOC>> functions) :
1608  CompoundTypeInfoBase<ALLOC>(schemaName, createInstanceFunc, SchemaType::UNION, CppType::UNION,
1609  templateName, templateArguments, fields, parameters, functions)
1610 {}
1611 
1612 template <typename ALLOC>
1614  StringView templateName, Span<const BasicTemplateArgumentInfo<ALLOC>> templateArguments,
1615  Span<const BasicFieldInfo<ALLOC>> fields, Span<const BasicParameterInfo<ALLOC>> parameters,
1616  Span<const BasicFunctionInfo<ALLOC>> functions, StringView selector,
1617  Span<const BasicCaseInfo<ALLOC>> cases) :
1618  CompoundTypeInfoBase<ALLOC>(schemaName, createInstanceFunc, SchemaType::CHOICE, CppType::CHOICE,
1619  templateName, templateArguments, fields, parameters, functions),
1620  m_selector(selector),
1621  m_cases(cases)
1622 {}
1623 
1624 template <typename ALLOC>
1626 {
1627  return m_selector;
1628 }
1629 
1630 template <typename ALLOC>
1632 {
1633  return m_cases;
1634 }
1635 
1636 template <typename ALLOC>
1638  Span<const BasicTemplateArgumentInfo<ALLOC>> templateArguments,
1639  Span<const BasicColumnInfo<ALLOC>> columns, StringView sqlConstraint, StringView virtualTableUsing,
1640  bool isWithoutRowId) :
1641  TemplatableTypeInfoBase<ALLOC>(
1642  schemaName, SchemaType::SQL_TABLE, CppType::SQL_TABLE, templateName, templateArguments),
1643  m_columns(columns),
1644  m_sqlConstraint(sqlConstraint),
1645  m_virtualTableUsing(virtualTableUsing),
1646  m_isWithoutRowId(isWithoutRowId)
1647 {}
1648 
1649 template <typename ALLOC>
1651 {
1652  return m_columns;
1653 }
1654 
1655 template <typename ALLOC>
1657 {
1658  return m_sqlConstraint;
1659 }
1660 
1661 template <typename ALLOC>
1663 {
1664  return m_virtualTableUsing;
1665 }
1666 
1667 template <typename ALLOC>
1669 {
1670  return m_isWithoutRowId;
1671 }
1672 
1673 template <typename ALLOC>
1675  StringView schemaName, Span<const BasicTableInfo<ALLOC>> tables) :
1676  TypeInfoBase<ALLOC>(schemaName, SchemaType::SQL_DATABASE, CppType::SQL_DATABASE),
1677  m_tables(tables)
1678 {}
1679 
1680 template <typename ALLOC>
1682 {
1683  return m_tables;
1684 }
1685 
1686 template <typename ALLOC>
1688  SchemaType schemaType, CppType cppType, const IBasicTypeInfo<ALLOC>& underlyingType,
1689  Span<const StringView> underlyingTypeArguments) :
1690  TypeInfoBase<ALLOC>(schemaName, schemaType, cppType),
1691  m_underlyingType(underlyingType),
1692  m_underlyingTypeArguments(underlyingTypeArguments)
1693 {}
1694 
1695 template <typename ALLOC>
1697 {
1698  return m_underlyingType;
1699 }
1700 
1701 template <typename ALLOC>
1703 {
1704  return m_underlyingTypeArguments;
1705 }
1706 
1707 template <typename ALLOC>
1709  Span<const StringView> underlyingTypeArguments, Span<const ItemInfo> enumItems) :
1711  schemaName, SchemaType::ENUM, CppType::ENUM, underlyingType, underlyingTypeArguments),
1712  m_enumItems(enumItems)
1713 {}
1714 
1715 template <typename ALLOC>
1717 {
1718  return m_enumItems;
1719 }
1720 
1721 template <typename ALLOC>
1723  Span<const StringView> underlyingTypeArguments, Span<const ItemInfo> bitmaskValues) :
1725  schemaName, SchemaType::BITMASK, CppType::BITMASK, underlyingType, underlyingTypeArguments),
1726  m_bitmaskValues(bitmaskValues)
1727 {}
1728 
1729 template <typename ALLOC>
1731 {
1732  return m_bitmaskValues;
1733 }
1734 
1735 template <typename ALLOC>
1737  TypeInfoBase<ALLOC>(schemaName, SchemaType::PUBSUB, CppType::PUBSUB),
1738  m_messages(messages)
1739 {}
1740 
1741 template <typename ALLOC>
1743 {
1744  return m_messages;
1745 }
1746 
1747 template <typename ALLOC>
1749  TypeInfoBase<ALLOC>(schemaName, SchemaType::SERVICE, CppType::SERVICE),
1750  m_methods(methods)
1751 {}
1752 
1753 template <typename ALLOC>
1755 {
1756  return m_methods;
1757 }
1758 
1759 template <typename ALLOC>
1761 {
1762  return m_typeInfoFunc().getSchemaName();
1763 }
1764 
1765 template <typename ALLOC>
1767 {
1768  return m_typeInfoFunc().getSchemaType();
1769 }
1770 
1771 template <typename ALLOC>
1773 {
1774  return m_typeInfoFunc().getCppType();
1775 }
1776 
1777 template <typename ALLOC>
1779 {
1780  return m_typeInfoFunc().getBitSize();
1781 }
1782 
1783 template <typename ALLOC>
1785 {
1786  return m_typeInfoFunc().getFields();
1787 }
1788 
1789 template <typename ALLOC>
1791 {
1792  return m_typeInfoFunc().getParameters();
1793 }
1794 
1795 template <typename ALLOC>
1797 {
1798  return m_typeInfoFunc().getFunctions();
1799 }
1800 
1801 template <typename ALLOC>
1803 {
1804  return m_typeInfoFunc().getSelector();
1805 }
1806 
1807 template <typename ALLOC>
1809 {
1810  return m_typeInfoFunc().getCases();
1811 }
1812 
1813 template <typename ALLOC>
1815 {
1816  return m_typeInfoFunc().getUnderlyingType();
1817 }
1818 
1819 template <typename ALLOC>
1821 {
1822  return m_typeInfoFunc().getUnderlyingTypeArguments();
1823 }
1824 
1825 template <typename ALLOC>
1827 {
1828  return m_typeInfoFunc().getEnumItems();
1829 }
1830 
1831 template <typename ALLOC>
1833 {
1834  return m_typeInfoFunc().getBitmaskValues();
1835 }
1836 
1837 template <typename ALLOC>
1839 {
1840  return m_typeInfoFunc().getColumns();
1841 }
1842 
1843 template <typename ALLOC>
1845 {
1846  return m_typeInfoFunc().getSqlConstraint();
1847 }
1848 
1849 template <typename ALLOC>
1851 {
1852  return m_typeInfoFunc().getVirtualTableUsing();
1853 }
1854 
1855 template <typename ALLOC>
1857 {
1858  return m_typeInfoFunc().isWithoutRowId();
1859 }
1860 
1861 template <typename ALLOC>
1863 {
1864  return m_typeInfoFunc().getTables();
1865 }
1866 
1867 template <typename ALLOC>
1869 {
1870  return m_typeInfoFunc().getTemplateName();
1871 }
1872 
1873 template <typename ALLOC>
1875 {
1876  return m_typeInfoFunc().getTemplateArguments();
1877 }
1878 
1879 template <typename ALLOC>
1881 {
1882  return m_typeInfoFunc().getMessages();
1883 }
1884 
1885 template <typename ALLOC>
1887 {
1888  return m_typeInfoFunc().getMethods();
1889 }
1890 
1891 template <typename ALLOC>
1893 {
1894  return m_typeInfoFunc().createInstance(allocator);
1895 }
1896 
1897 template <typename ALLOC>
1899 {
1900  return createInstance(ALLOC());
1901 }
1902 
1903 } // namespace zserio
1904 
1905 #endif // ZSERIO_TYPE_INFO_INC_H
Span< const ItemInfo > getBitmaskValues() const override
Definition: TypeInfo.h:1730
BitmaskTypeInfo(StringView schemaName, const IBasicTypeInfo< ALLOC > &underlyingType, Span< const StringView > underlyingTypeArguments, Span< const ItemInfo > bitmaskValues)
Definition: TypeInfo.h:1722
static const IBasicTypeInfo< ALLOC > & getDynamicUnsignedBitField(uint8_t maxBitSize)
Definition: TypeInfo.h:1225
static const IBasicTypeInfo< ALLOC > & getFloat32()
Definition: TypeInfo.h:1143
static const IBasicTypeInfo< ALLOC > & getVarUInt64()
Definition: TypeInfo.h:1113
static const IBasicTypeInfo< ALLOC > & getUInt32()
Definition: TypeInfo.h:1053
static const IBasicTypeInfo< ALLOC > & getBool()
Definition: TypeInfo.h:1011
static const IBasicTypeInfo< ALLOC > & getVarInt64()
Definition: TypeInfo.h:1081
static const IBasicTypeInfo< ALLOC > & getVarUInt()
Definition: TypeInfo.h:1121
static const IBasicTypeInfo< ALLOC > & getVarInt32()
Definition: TypeInfo.h:1073
static const IBasicTypeInfo< ALLOC > & getFixedUnsignedBitField(uint8_t bitSize)
Definition: TypeInfo.h:1184
static const IBasicTypeInfo< ALLOC > & getInt32()
Definition: TypeInfo.h:1029
static const IBasicTypeInfo< ALLOC > & getInt16()
Definition: TypeInfo.h:1023
static const IBasicTypeInfo< ALLOC > & getVarInt()
Definition: TypeInfo.h:1089
static const IBasicTypeInfo< ALLOC > & getString()
Definition: TypeInfo.h:1162
static const IBasicTypeInfo< ALLOC > & getInt8()
Definition: TypeInfo.h:1017
static const IBasicTypeInfo< ALLOC > & getVarInt16()
Definition: TypeInfo.h:1065
static const IBasicTypeInfo< ALLOC > & getUInt8()
Definition: TypeInfo.h:1041
static const IBasicTypeInfo< ALLOC > & getBitBuffer()
Definition: TypeInfo.h:1170
BuiltinTypeInfo(StringView schemaName, SchemaType schemaType, CppType cppType)
Definition: TypeInfo.h:1006
static const IBasicTypeInfo< ALLOC > & getUInt64()
Definition: TypeInfo.h:1059
static const IBasicTypeInfo< ALLOC > & getInt64()
Definition: TypeInfo.h:1035
static const IBasicTypeInfo< ALLOC > & getUInt16()
Definition: TypeInfo.h:1047
static const IBasicTypeInfo< ALLOC > & getVarSize()
Definition: TypeInfo.h:1129
static const IBasicTypeInfo< ALLOC > & getFloat16()
Definition: TypeInfo.h:1137
static const IBasicTypeInfo< ALLOC > & getVarUInt32()
Definition: TypeInfo.h:1105
static const IBasicTypeInfo< ALLOC > & getBytes()
Definition: TypeInfo.h:1155
static const IBasicTypeInfo< ALLOC > & getVarUInt16()
Definition: TypeInfo.h:1097
static const IBasicTypeInfo< ALLOC > & getDynamicSignedBitField(uint8_t maxBitSize)
Definition: TypeInfo.h:1190
static const IBasicTypeInfo< ALLOC > & getFixedSignedBitField(uint8_t bitSize)
Definition: TypeInfo.h:1178
static const IBasicTypeInfo< ALLOC > & getFloat64()
Definition: TypeInfo.h:1149
StringView getSelector() const override
Definition: TypeInfo.h:1625
Span< const BasicCaseInfo< ALLOC > > getCases() const override
Definition: TypeInfo.h:1631
ChoiceTypeInfo(StringView schemaName, CreateInstanceFunc createInstanceFunc, StringView templateName, Span< const BasicTemplateArgumentInfo< ALLOC >> templateArguments, Span< const BasicFieldInfo< ALLOC >> fields, Span< const BasicParameterInfo< ALLOC >> parameters, Span< const BasicFunctionInfo< ALLOC >> functions, StringView selector, Span< const BasicCaseInfo< ALLOC >> cases)
Definition: TypeInfo.h:1613
CompoundTypeInfoBase(const CompoundTypeInfoBase &)=default
Span< const BasicFunctionInfo< ALLOC > > getFunctions() const override
Definition: TypeInfo.h:1577
~CompoundTypeInfoBase() override=0
CompoundTypeInfoBase(CompoundTypeInfoBase &&)=default
IBasicReflectablePtr< ALLOC >(*)(const ALLOC &) CreateInstanceFunc
Definition: TypeInfo.h:480
CompoundTypeInfoBase & operator=(const CompoundTypeInfoBase &)=default
CompoundTypeInfoBase(StringView schemaName, CreateInstanceFunc createInstanceFunc, SchemaType schemaType, CppType cppType, StringView templateName, Span< const BasicTemplateArgumentInfo< ALLOC >> templateArguments, Span< const BasicFieldInfo< ALLOC >> fields, Span< const BasicParameterInfo< ALLOC >> parameters, Span< const BasicFunctionInfo< ALLOC >> functions)
Definition: TypeInfo.h:1549
Span< const BasicParameterInfo< ALLOC > > getParameters() const override
Definition: TypeInfo.h:1571
Span< const BasicFieldInfo< ALLOC > > getFields() const override
Definition: TypeInfo.h:1565
CompoundTypeInfoBase & operator=(CompoundTypeInfoBase &&)=default
Span< const ItemInfo > getEnumItems() const override
Definition: TypeInfo.h:1716
EnumTypeInfo(StringView schemaName, const IBasicTypeInfo< ALLOC > &underlyingType, Span< const StringView > underlyingTypeArguments, Span< const ItemInfo > enumItems)
Definition: TypeInfo.h:1708
static const IBasicTypeInfo< ALLOC > & getFloat64()
Definition: TypeInfo.h:1361
static const IBasicTypeInfo< ALLOC > & getUInt64()
Definition: TypeInfo.h:1337
static const IBasicTypeInfo< ALLOC > & getInt32()
Definition: TypeInfo.h:1297
static const IBasicTypeInfo< ALLOC > & getFloat32()
Definition: TypeInfo.h:1353
uint8_t getBitSize() const override
Definition: TypeInfo.h:1267
static const IBasicTypeInfo< ALLOC > & getUInt16()
Definition: TypeInfo.h:1321
static const IBasicTypeInfo< ALLOC > & getFixedSignedBitField(uint8_t bitSize)
Definition: TypeInfo.h:1369
static const IBasicTypeInfo< ALLOC > & getBool()
Definition: TypeInfo.h:1273
static const IBasicTypeInfo< ALLOC > & getInt64()
Definition: TypeInfo.h:1305
static const IBasicTypeInfo< ALLOC > & getFixedUnsignedBitField(uint8_t bitSize)
Definition: TypeInfo.h:1447
static const IBasicTypeInfo< ALLOC > & getUInt8()
Definition: TypeInfo.h:1313
static const IBasicTypeInfo< ALLOC > & getFloat16()
Definition: TypeInfo.h:1345
static const IBasicTypeInfo< ALLOC > & getInt8()
Definition: TypeInfo.h:1281
static const IBasicTypeInfo< ALLOC > & getUInt32()
Definition: TypeInfo.h:1329
static const IBasicTypeInfo< ALLOC > & getInt16()
Definition: TypeInfo.h:1289
FixedSizeBuiltinTypeInfo(StringView schemaName, SchemaType schemaType, CppType cppType, uint8_t bitSize)
Definition: TypeInfo.h:1260
virtual const IBasicTypeInfo< ALLOC > & getUnderlyingType() const =0
PubsubTypeInfo(StringView schemaName, Span< const BasicMessageInfo< ALLOC >> messages)
Definition: TypeInfo.h:1736
Span< const BasicMessageInfo< ALLOC > > getMessages() const override
Definition: TypeInfo.h:1742
Span< const BasicMethodInfo< ALLOC > > getMethods() const override
Definition: TypeInfo.h:1886
StringView getTemplateName() const override
Definition: TypeInfo.h:1868
Span< const BasicMessageInfo< ALLOC > > getMessages() const override
Definition: TypeInfo.h:1880
StringView getSqlConstraint() const override
Definition: TypeInfo.h:1844
Span< const BasicTableInfo< ALLOC > > getTables() const override
Definition: TypeInfo.h:1862
RecursiveTypeInfo(const RecursiveTypeInfo &)=delete
Span< const BasicFunctionInfo< ALLOC > > getFunctions() const override
Definition: TypeInfo.h:1796
RecursiveTypeInfo(const RecursiveTypeInfo &&)=delete
bool isWithoutRowId() const override
Definition: TypeInfo.h:1856
StringView getVirtualTableUsing() const override
Definition: TypeInfo.h:1850
uint8_t getBitSize() const override
Definition: TypeInfo.h:1778
IBasicReflectablePtr< ALLOC > createInstance() const override
Definition: TypeInfo.h:1898
StringView getSchemaName() const override
Definition: TypeInfo.h:1760
~RecursiveTypeInfo() override=default
Span< const ItemInfo > getEnumItems() const override
Definition: TypeInfo.h:1826
StringView getSelector() const override
Definition: TypeInfo.h:1802
Span< const BasicColumnInfo< ALLOC > > getColumns() const override
Definition: TypeInfo.h:1838
Span< const BasicCaseInfo< ALLOC > > getCases() const override
Definition: TypeInfo.h:1808
CppType getCppType() const override
Definition: TypeInfo.h:1772
RecursiveTypeInfo & operator=(const RecursiveTypeInfo &&)=delete
SchemaType getSchemaType() const override
Definition: TypeInfo.h:1766
const IBasicTypeInfo< ALLOC > & getUnderlyingType() const override
Definition: TypeInfo.h:1814
RecursiveTypeInfo & operator=(const RecursiveTypeInfo &)=delete
Span< const BasicFieldInfo< ALLOC > > getFields() const override
Definition: TypeInfo.h:1784
RecursiveTypeInfo(TypeInfoFunc typeInfoFunc)
Definition: TypeInfo.h:795
Span< const BasicTemplateArgumentInfo< ALLOC > > getTemplateArguments() const override
Definition: TypeInfo.h:1874
Span< const ItemInfo > getBitmaskValues() const override
Definition: TypeInfo.h:1832
Span< const StringView > getUnderlyingTypeArguments() const override
Definition: TypeInfo.h:1820
Span< const BasicParameterInfo< ALLOC > > getParameters() const override
Definition: TypeInfo.h:1790
Span< const BasicMethodInfo< ALLOC > > getMethods() const override
Definition: TypeInfo.h:1754
ServiceTypeInfo(StringView schemaName, Span< const BasicMethodInfo< ALLOC >> methods)
Definition: TypeInfo.h:1748
SqlDatabaseTypeInfo(StringView schemaName, Span< const BasicTableInfo< ALLOC >> tables)
Definition: TypeInfo.h:1674
Span< const BasicTableInfo< ALLOC > > getTables() const override
Definition: TypeInfo.h:1681
StringView getVirtualTableUsing() const override
Definition: TypeInfo.h:1662
bool isWithoutRowId() const override
Definition: TypeInfo.h:1668
SqlTableTypeInfo(StringView schemaName, StringView templateName, Span< const BasicTemplateArgumentInfo< ALLOC >> templateArguments, Span< const BasicColumnInfo< ALLOC >> columns, StringView sqlConstraint, StringView virtualTableUsing, bool isWithoutRowId)
Definition: TypeInfo.h:1637
Span< const BasicColumnInfo< ALLOC > > getColumns() const override
Definition: TypeInfo.h:1650
StringView getSqlConstraint() const override
Definition: TypeInfo.h:1656
StructTypeInfo(StringView schemaName, CreateInstanceFunc createInstanceFunc, StringView templateName, Span< const BasicTemplateArgumentInfo< ALLOC >> templateArguments, Span< const BasicFieldInfo< ALLOC >> fields, Span< const BasicParameterInfo< ALLOC >> parameters, Span< const BasicFunctionInfo< ALLOC >> functions)
Definition: TypeInfo.h:1595
TemplatableTypeInfoBase & operator=(TemplatableTypeInfoBase &&)=default
TemplatableTypeInfoBase(StringView schemaName, SchemaType schemaType, CppType cppType, StringView templateName, Span< const BasicTemplateArgumentInfo< ALLOC >> templateArguments)
Definition: TypeInfo.h:1525
Span< const BasicTemplateArgumentInfo< ALLOC > > getTemplateArguments() const override
Definition: TypeInfo.h:1543
TemplatableTypeInfoBase & operator=(const TemplatableTypeInfoBase &)=default
TemplatableTypeInfoBase(const TemplatableTypeInfoBase &)=default
TemplatableTypeInfoBase(TemplatableTypeInfoBase &&)=default
StringView getTemplateName() const override
Definition: TypeInfo.h:1537
CppType getCppType() const override
Definition: TypeInfo.h:874
Span< const BasicFieldInfo< ALLOC > > getFields() const override
Definition: TypeInfo.h:886
TypeInfoBase & operator=(const TypeInfoBase &&)=delete
const IBasicTypeInfo< ALLOC > & getUnderlyingType() const override
Definition: TypeInfo.h:916
Span< const BasicTableInfo< ALLOC > > getTables() const override
Definition: TypeInfo.h:964
bool isWithoutRowId() const override
Definition: TypeInfo.h:958
TypeInfoBase(const TypeInfoBase &&)=delete
Span< const BasicColumnInfo< ALLOC > > getColumns() const override
Definition: TypeInfo.h:940
StringView getSelector() const override
Definition: TypeInfo.h:904
IBasicReflectablePtr< ALLOC > createInstance(const ALLOC &allocator) const override
Definition: TypeInfo.h:994
Span< const StringView > getUnderlyingTypeArguments() const override
Definition: TypeInfo.h:922
StringView getVirtualTableUsing() const override
Definition: TypeInfo.h:952
Span< const BasicMethodInfo< ALLOC > > getMethods() const override
Definition: TypeInfo.h:988
Span< const ItemInfo > getBitmaskValues() const override
Definition: TypeInfo.h:934
StringView getSqlConstraint() const override
Definition: TypeInfo.h:946
StringView getTemplateName() const override
Definition: TypeInfo.h:970
~TypeInfoBase() override=0
Span< const BasicTemplateArgumentInfo< ALLOC > > getTemplateArguments() const override
Definition: TypeInfo.h:976
Span< const ItemInfo > getEnumItems() const override
Definition: TypeInfo.h:928
Span< const BasicMessageInfo< ALLOC > > getMessages() const override
Definition: TypeInfo.h:982
Span< const BasicCaseInfo< ALLOC > > getCases() const override
Definition: TypeInfo.h:910
SchemaType getSchemaType() const override
Definition: TypeInfo.h:868
TypeInfoBase(StringView schemaName, SchemaType schemaType, CppType cppType)
Definition: TypeInfo.h:852
uint8_t getBitSize() const override
Definition: TypeInfo.h:880
Span< const BasicParameterInfo< ALLOC > > getParameters() const override
Definition: TypeInfo.h:892
TypeInfoBase(const TypeInfoBase &)=delete
Span< const BasicFunctionInfo< ALLOC > > getFunctions() const override
Definition: TypeInfo.h:898
StringView getSchemaName() const override
Definition: TypeInfo.h:862
IBasicReflectablePtr< ALLOC > createInstance() const override
Definition: TypeInfo.h:1000
TypeInfoBase & operator=(const TypeInfoBase &)=delete
Span< const StringView > getUnderlyingTypeArguments() const override
Definition: TypeInfo.h:1702
TypeInfoWithUnderlyingTypeBase(StringView schemaName, SchemaType schemaType, CppType cppType, const IBasicTypeInfo< ALLOC > &underlyingType, Span< const StringView > underlyingTypeArguments)
Definition: TypeInfo.h:1687
const IBasicTypeInfo< ALLOC > & getUnderlyingType() const override
Definition: TypeInfo.h:1696
UnionTypeInfo(StringView schemaName, CreateInstanceFunc createInstanceFunc, StringView templateName, Span< const BasicTemplateArgumentInfo< ALLOC >> templateArguments, Span< const BasicFieldInfo< ALLOC >> fields, Span< const BasicParameterInfo< ALLOC >> parameters, Span< const BasicFunctionInfo< ALLOC >> functions)
Definition: TypeInfo.h:1604
SchemaType
Definition: ITypeInfo.h:41
constexpr BasicStringView< CharT > makeStringView(const CharT(&str)[N])
Definition: StringView.h:929
typename IBasicReflectable< ALLOC >::Ptr IBasicReflectablePtr
Definition: IReflectable.h:516