1 #ifndef ZSERIO_TYPE_INFO_INC_H
2 #define ZSERIO_TYPE_INFO_INC_H
29 template <
typename ALLOC>
30 class TypeInfoBase :
public IBasicTypeInfo<ALLOC>
40 TypeInfoBase(std::string_view schemaName,
SchemaType schemaType,
CppType cppType);
46 TypeInfoBase(
const TypeInfoBase&) =
delete;
47 TypeInfoBase& operator=(
const TypeInfoBase&) =
delete;
49 TypeInfoBase(
const TypeInfoBase&&) =
delete;
50 TypeInfoBase& operator=(
const TypeInfoBase&&) =
delete;
55 ~TypeInfoBase()
override = 0;
62 Span<const BasicFieldInfo<ALLOC>>
getFields()
const override;
63 Span<const BasicParameterInfo<ALLOC>>
getParameters()
const override;
64 Span<const BasicFunctionInfo<ALLOC>>
getFunctions()
const override;
67 Span<const BasicCaseInfo<ALLOC>>
getCases()
const override;
73 Span<const BasicColumnInfo<ALLOC>>
getColumns()
const override;
78 Span<const BasicTableInfo<ALLOC>>
getTables()
const override;
83 Span<const BasicMessageInfo<ALLOC>>
getMessages()
const override;
84 Span<const BasicMethodInfo<ALLOC>>
getMethods()
const override;
86 IBasicReflectableDataPtr<ALLOC>
createInstance(
const ALLOC& allocator)
const override;
90 std::string_view m_schemaName;
98 template <
typename ALLOC = std::allocator<u
int8_t>>
99 class BuiltinTypeInfo :
public TypeInfoBase<ALLOC>
109 BuiltinTypeInfo(std::string_view schemaName,
SchemaType schemaType,
CppType cppType);
111 template <
typename T>
112 static const BuiltinTypeInfo& getDynamicBitField();
118 template <
typename ALLOC>
119 class FixedSizeBuiltinTypeInfo :
public BuiltinTypeInfo<ALLOC>
130 FixedSizeBuiltinTypeInfo(
131 std::string_view schemaName,
SchemaType schemaType,
CppType cppType, uint8_t bitSize);
135 template <BitSize BIT_SIZE,
bool IS_SIGNED>
136 static const FixedSizeBuiltinTypeInfo& getFixedBitField();
145 template <
typename ALLOC>
146 class TemplatableTypeInfoBase :
public TypeInfoBase<ALLOC>
158 TemplatableTypeInfoBase(std::string_view schemaName,
SchemaType schemaType,
CppType cppType,
159 std::string_view templateName, Span<
const BasicTemplateArgumentInfo<ALLOC>> templateArguments);
161 ~TemplatableTypeInfoBase()
override = 0;
163 TemplatableTypeInfoBase(
const TemplatableTypeInfoBase&) =
default;
164 TemplatableTypeInfoBase& operator=(
const TemplatableTypeInfoBase&) =
default;
166 TemplatableTypeInfoBase(TemplatableTypeInfoBase&&) =
default;
167 TemplatableTypeInfoBase& operator=(TemplatableTypeInfoBase&&) =
default;
173 std::string_view m_templateName;
174 Span<const BasicTemplateArgumentInfo<ALLOC>> m_templateArguments;
180 template <
typename ALLOC>
181 class CompoundTypeInfoBase :
public TemplatableTypeInfoBase<ALLOC>
184 using TypeInfoBase<ALLOC>::getSchemaName;
185 using CreateInstanceFunc = IBasicReflectableDataPtr<ALLOC> (*)(
const ALLOC&);
199 CompoundTypeInfoBase(std::string_view schemaName, CreateInstanceFunc createInstanceFunc,
201 Span<
const BasicTemplateArgumentInfo<ALLOC>> templateArguments,
202 Span<
const BasicFieldInfo<ALLOC>> fields, Span<
const BasicParameterInfo<ALLOC>> parameters,
203 Span<
const BasicFunctionInfo<ALLOC>> functions);
205 ~CompoundTypeInfoBase()
override = 0;
207 CompoundTypeInfoBase(
const CompoundTypeInfoBase&) =
default;
208 CompoundTypeInfoBase& operator=(
const CompoundTypeInfoBase&) =
default;
210 CompoundTypeInfoBase(CompoundTypeInfoBase&&) =
default;
211 CompoundTypeInfoBase& operator=(CompoundTypeInfoBase&&) =
default;
213 Span<const BasicFieldInfo<ALLOC>>
getFields()
const override;
214 Span<const BasicParameterInfo<ALLOC>>
getParameters()
const override;
215 Span<const BasicFunctionInfo<ALLOC>>
getFunctions()
const override;
217 IBasicReflectableDataPtr<ALLOC>
createInstance(
const ALLOC& allocator)
const override;
220 CreateInstanceFunc m_createInstanceFunc;
221 Span<const BasicFieldInfo<ALLOC>> m_fields;
222 Span<const BasicParameterInfo<ALLOC>> m_parameters;
223 Span<const BasicFunctionInfo<ALLOC>> m_functions;
229 template <
typename ALLOC>
230 class StructTypeInfo :
public detail::CompoundTypeInfoBase<ALLOC>
233 using CreateInstanceFunc =
typename CompoundTypeInfoBase<ALLOC>::CreateInstanceFunc;
245 StructTypeInfo(std::string_view schemaName, CreateInstanceFunc createInstanceFunc,
246 std::string_view templateName, Span<
const BasicTemplateArgumentInfo<ALLOC>> templateArguments,
247 Span<
const BasicFieldInfo<ALLOC>> fields, Span<
const BasicParameterInfo<ALLOC>> parameters,
248 Span<
const BasicFunctionInfo<ALLOC>> functions);
254 template <
typename ALLOC>
255 class UnionTypeInfo :
public CompoundTypeInfoBase<ALLOC>
258 using CreateInstanceFunc =
typename CompoundTypeInfoBase<ALLOC>::CreateInstanceFunc;
270 UnionTypeInfo(std::string_view schemaName, CreateInstanceFunc createInstanceFunc,
271 std::string_view templateName, Span<
const BasicTemplateArgumentInfo<ALLOC>> templateArguments,
272 Span<
const BasicFieldInfo<ALLOC>> fields, Span<
const BasicParameterInfo<ALLOC>> parameters,
273 Span<
const BasicFunctionInfo<ALLOC>> functions);
279 template <
typename ALLOC>
280 class ChoiceTypeInfo :
public CompoundTypeInfoBase<ALLOC>
283 using CreateInstanceFunc =
typename CompoundTypeInfoBase<ALLOC>::CreateInstanceFunc;
297 ChoiceTypeInfo(std::string_view schemaName, CreateInstanceFunc createInstanceFunc,
298 std::string_view templateName, Span<
const BasicTemplateArgumentInfo<ALLOC>> templateArguments,
299 Span<
const BasicFieldInfo<ALLOC>> fields, Span<
const BasicParameterInfo<ALLOC>> parameters,
300 Span<
const BasicFunctionInfo<ALLOC>> functions, std::string_view selector,
301 Span<
const BasicCaseInfo<ALLOC>> cases);
304 Span<const BasicCaseInfo<ALLOC>>
getCases()
const override;
307 std::string_view m_selector;
308 Span<const BasicCaseInfo<ALLOC>> m_cases;
314 template <
typename ALLOC>
315 class TypeInfoWithUnderlyingTypeBase :
public TypeInfoBase<ALLOC>
326 TypeInfoWithUnderlyingTypeBase(std::string_view schemaName,
SchemaType schemaType,
CppType cppType,
327 const IBasicTypeInfo<ALLOC>& underlyingType);
332 const IBasicTypeInfo<ALLOC>& m_underlyingType;
338 template <
typename ALLOC>
339 class EnumTypeInfo :
public TypeInfoWithUnderlyingTypeBase<ALLOC>
349 EnumTypeInfo(std::string_view schemaName,
const IBasicTypeInfo<ALLOC>& underlyingType,
350 Span<const ItemInfo> enumItems);
355 Span<const ItemInfo> m_enumItems;
361 template <
typename ALLOC>
362 class BitmaskTypeInfo :
public TypeInfoWithUnderlyingTypeBase<ALLOC>
372 BitmaskTypeInfo(std::string_view schemaName,
const IBasicTypeInfo<ALLOC>& underlyingType,
373 Span<const ItemInfo> bitmaskValues);
378 Span<const ItemInfo> m_bitmaskValues;
384 template <
typename ALLOC>
385 class SqlTableTypeInfo :
public TemplatableTypeInfoBase<ALLOC>
399 SqlTableTypeInfo(std::string_view schemaName, std::string_view templateName,
400 Span<
const BasicTemplateArgumentInfo<ALLOC>> templateArguments,
401 Span<
const BasicColumnInfo<ALLOC>> columns, std::string_view sqlConstraint,
402 std::string_view virtualTableUsing,
bool isWithoutRowId);
404 Span<const BasicColumnInfo<ALLOC>>
getColumns()
const override;
410 Span<const BasicColumnInfo<ALLOC>> m_columns;
411 std::string_view m_sqlConstraint;
412 std::string_view m_virtualTableUsing;
413 bool m_isWithoutRowId;
419 template <
typename ALLOC>
420 class SqlDatabaseTypeInfo :
public TypeInfoBase<ALLOC>
429 SqlDatabaseTypeInfo(std::string_view schemaName, Span<
const BasicTableInfo<ALLOC>> tables);
431 Span<const BasicTableInfo<ALLOC>>
getTables()
const override;
434 Span<const BasicTableInfo<ALLOC>> m_tables;
440 template <
typename ALLOC>
441 class PubsubTypeInfo :
public TypeInfoBase<ALLOC>
450 PubsubTypeInfo(std::string_view schemaName, Span<
const BasicMessageInfo<ALLOC>> messages);
452 Span<const BasicMessageInfo<ALLOC>>
getMessages()
const override;
455 Span<const BasicMessageInfo<ALLOC>> m_messages;
461 template <
typename ALLOC>
462 class ServiceTypeInfo :
public TypeInfoBase<ALLOC>
471 ServiceTypeInfo(std::string_view schemaName, Span<
const BasicMethodInfo<ALLOC>> methods);
473 Span<const BasicMethodInfo<ALLOC>>
getMethods()
const override;
476 Span<const BasicMethodInfo<ALLOC>> m_methods;
483 template <
typename ALLOC>
484 class RecursiveTypeInfo :
public IBasicTypeInfo<ALLOC>
488 using TypeInfoFunc =
const IBasicTypeInfo<ALLOC>& (*)();
495 explicit RecursiveTypeInfo(TypeInfoFunc typeInfoFunc) :
496 m_typeInfoFunc(typeInfoFunc)
499 ~RecursiveTypeInfo()
override =
default;
505 RecursiveTypeInfo(
const RecursiveTypeInfo&) =
delete;
506 RecursiveTypeInfo& operator=(
const RecursiveTypeInfo&) =
delete;
508 RecursiveTypeInfo(
const RecursiveTypeInfo&&) =
delete;
509 RecursiveTypeInfo& operator=(
const RecursiveTypeInfo&&) =
delete;
519 Span<const BasicFieldInfo<ALLOC>>
getFields()
const override;
520 Span<const BasicParameterInfo<ALLOC>>
getParameters()
const override;
521 Span<const BasicFunctionInfo<ALLOC>>
getFunctions()
const override;
524 Span<const BasicCaseInfo<ALLOC>>
getCases()
const override;
530 Span<const BasicColumnInfo<ALLOC>>
getColumns()
const override;
535 Span<const BasicTableInfo<ALLOC>>
getTables()
const override;
540 Span<const BasicMessageInfo<ALLOC>>
getMessages()
const override;
541 Span<const BasicMethodInfo<ALLOC>>
getMethods()
const override;
543 IBasicReflectableDataPtr<ALLOC>
createInstance(
const ALLOC& allocator)
const override;
547 TypeInfoFunc m_typeInfoFunc;
550 template <
typename ALLOC>
551 TypeInfoBase<ALLOC>::TypeInfoBase(std::string_view schemaName,
SchemaType schemaType,
CppType cppType) :
552 m_schemaName(schemaName),
553 m_schemaType(schemaType),
557 template <
typename ALLOC>
558 TypeInfoBase<ALLOC>::~TypeInfoBase() =
default;
560 template <
typename ALLOC>
561 std::string_view TypeInfoBase<ALLOC>::getSchemaName()
const
566 template <
typename ALLOC>
567 SchemaType TypeInfoBase<ALLOC>::getSchemaType()
const
572 template <
typename ALLOC>
573 CppType TypeInfoBase<ALLOC>::getCppType()
const
578 template <
typename ALLOC>
579 uint8_t TypeInfoBase<ALLOC>::getBitSize()
const
581 throw CppRuntimeException(
"Type '") << getSchemaName() <<
"' is not a fixed size type!";
584 template <
typename ALLOC>
585 Span<const BasicFieldInfo<ALLOC>> TypeInfoBase<ALLOC>::getFields()
const
587 throw CppRuntimeException(
"Type '") << getSchemaName() <<
"' is not a compound type!";
590 template <
typename ALLOC>
591 Span<const BasicParameterInfo<ALLOC>> TypeInfoBase<ALLOC>::getParameters()
const
593 throw CppRuntimeException(
"Type '") << getSchemaName() <<
"' is not a compound type!";
596 template <
typename ALLOC>
597 Span<const BasicFunctionInfo<ALLOC>> TypeInfoBase<ALLOC>::getFunctions()
const
599 throw CppRuntimeException(
"Type '") << getSchemaName() <<
"' is not a compound type!";
602 template <
typename ALLOC>
603 std::string_view TypeInfoBase<ALLOC>::getSelector()
const
605 throw CppRuntimeException(
"Type '") << getSchemaName() <<
"' is not a choice type!";
608 template <
typename ALLOC>
609 Span<const BasicCaseInfo<ALLOC>> TypeInfoBase<ALLOC>::getCases()
const
611 throw CppRuntimeException(
"Type '") << getSchemaName() <<
"' is not a choice type!";
614 template <
typename ALLOC>
615 const IBasicTypeInfo<ALLOC>& TypeInfoBase<ALLOC>::getUnderlyingType()
const
617 throw CppRuntimeException(
"Type '") << getSchemaName() <<
"' does not have underlying type!";
620 template <
typename ALLOC>
621 Span<const ItemInfo> TypeInfoBase<ALLOC>::getEnumItems()
const
623 throw CppRuntimeException(
"Type '") << getSchemaName() <<
"' is not an enum type!";
626 template <
typename ALLOC>
627 Span<const ItemInfo> TypeInfoBase<ALLOC>::getBitmaskValues()
const
629 throw CppRuntimeException(
"Type '") << getSchemaName() <<
"' is not a bitmask type!";
632 template <
typename ALLOC>
633 Span<const BasicColumnInfo<ALLOC>> TypeInfoBase<ALLOC>::getColumns()
const
635 throw CppRuntimeException(
"Type '") << getSchemaName() <<
"' is not a SQL table type!";
638 template <
typename ALLOC>
639 std::string_view TypeInfoBase<ALLOC>::getSqlConstraint()
const
641 throw CppRuntimeException(
"Type '") << getSchemaName() <<
"' is not a SQL table type!";
644 template <
typename ALLOC>
645 std::string_view TypeInfoBase<ALLOC>::getVirtualTableUsing()
const
647 throw CppRuntimeException(
"Type '") << getSchemaName() <<
"' is not a SQL table type!";
650 template <
typename ALLOC>
651 bool TypeInfoBase<ALLOC>::isWithoutRowId()
const
653 throw CppRuntimeException(
"Type '") << getSchemaName() <<
"' is not a SQL table type!";
656 template <
typename ALLOC>
657 Span<const BasicTableInfo<ALLOC>> TypeInfoBase<ALLOC>::getTables()
const
659 throw CppRuntimeException(
"Type '") << getSchemaName() <<
"' is not a SQL database type!";
662 template <
typename ALLOC>
663 std::string_view TypeInfoBase<ALLOC>::getTemplateName()
const
665 throw CppRuntimeException(
"Type '") << getSchemaName() <<
"' is not a templatable type!";
668 template <
typename ALLOC>
669 Span<const BasicTemplateArgumentInfo<ALLOC>> TypeInfoBase<ALLOC>::getTemplateArguments()
const
671 throw CppRuntimeException(
"Type '") << getSchemaName() <<
"' is not a templatable type!";
674 template <
typename ALLOC>
675 Span<const BasicMessageInfo<ALLOC>> TypeInfoBase<ALLOC>::getMessages()
const
677 throw CppRuntimeException(
"Type '") << getSchemaName() <<
"' is not a pubsub type!";
680 template <
typename ALLOC>
681 Span<const BasicMethodInfo<ALLOC>> TypeInfoBase<ALLOC>::getMethods()
const
683 throw CppRuntimeException(
"Type '") << getSchemaName() <<
"' is not a service type!";
686 template <
typename ALLOC>
687 IBasicReflectableDataPtr<ALLOC> TypeInfoBase<ALLOC>::createInstance(
const ALLOC&)
const
689 throw CppRuntimeException(
"Type '") << getSchemaName() <<
"' is not a compound type!";
692 template <
typename ALLOC>
693 IBasicReflectableDataPtr<ALLOC> TypeInfoBase<ALLOC>::createInstance()
const
695 return createInstance(ALLOC());
698 template <
typename ALLOC>
699 BuiltinTypeInfo<ALLOC>::BuiltinTypeInfo(std::string_view schemaName,
SchemaType schemaType,
CppType cppType) :
700 TypeInfoBase<ALLOC>(schemaName, schemaType, cppType)
703 template <
typename ALLOC>
704 template <
typename T>
705 const BuiltinTypeInfo<ALLOC>& BuiltinTypeInfo<ALLOC>::getDynamicBitField()
707 static constexpr
BitSize maxBitSize =
sizeof(T) * 8;
709 static_assert(maxBitSize <= 64,
"Max bit size out of range!");
711 if constexpr (std::is_signed_v<T>)
715 static const BuiltinTypeInfo<ALLOC>
typeInfo = {
716 "int<>", SchemaType::DYNAMIC_SIGNED_BITFIELD, CppType::INT8};
719 else if (maxBitSize <= 16)
721 static const BuiltinTypeInfo<ALLOC>
typeInfo = {
722 "int<>", SchemaType::DYNAMIC_SIGNED_BITFIELD, CppType::INT16};
725 else if (maxBitSize <= 32)
727 static const BuiltinTypeInfo<ALLOC>
typeInfo = {
728 "int<>", SchemaType::DYNAMIC_SIGNED_BITFIELD, CppType::INT32};
733 static const BuiltinTypeInfo<ALLOC>
typeInfo = {
734 "int<>", SchemaType::DYNAMIC_SIGNED_BITFIELD, CppType::INT64};
742 static const BuiltinTypeInfo<ALLOC>
typeInfo = {
743 "bit<>", SchemaType::DYNAMIC_UNSIGNED_BITFIELD, CppType::UINT8};
746 else if (maxBitSize <= 16)
748 static const BuiltinTypeInfo<ALLOC>
typeInfo = {
749 "bit<>", SchemaType::DYNAMIC_UNSIGNED_BITFIELD, CppType::UINT16};
752 else if (maxBitSize <= 32)
754 static const BuiltinTypeInfo<ALLOC>
typeInfo = {
755 "bit<>", SchemaType::DYNAMIC_UNSIGNED_BITFIELD, CppType::UINT32};
760 static const BuiltinTypeInfo<ALLOC>
typeInfo = {
761 "bit<>", SchemaType::DYNAMIC_UNSIGNED_BITFIELD, CppType::UINT64};
767 template <
typename ALLOC>
768 FixedSizeBuiltinTypeInfo<ALLOC>::FixedSizeBuiltinTypeInfo(
769 std::string_view schemaName,
SchemaType schemaType,
CppType cppType, uint8_t bitSize) :
770 BuiltinTypeInfo<ALLOC>(schemaName, schemaType, cppType),
774 template <
typename ALLOC>
775 uint8_t FixedSizeBuiltinTypeInfo<ALLOC>::getBitSize()
const
780 template <
typename ALLOC>
781 template <BitSize BIT_SIZE,
bool IS_SIGNED>
782 const FixedSizeBuiltinTypeInfo<ALLOC>& FixedSizeBuiltinTypeInfo<ALLOC>::getFixedBitField()
784 static_assert(BIT_SIZE > 0 && BIT_SIZE <= 64,
"Bit size out of range!");
786 if constexpr (IS_SIGNED)
788 static const std::array<FixedSizeBuiltinTypeInfo<ALLOC>, 64> bitFieldTypeInfoArray = {
789 {{
"int:1", SchemaType::INT1, CppType::INT8, 1},
790 {
"int:2", SchemaType::INT2, CppType::INT8, 2},
791 {
"int:3", SchemaType::INT3, CppType::INT8, 3},
792 {
"int:4", SchemaType::INT4, CppType::INT8, 4},
793 {
"int:5", SchemaType::INT5, CppType::INT8, 5},
794 {
"int:6", SchemaType::INT6, CppType::INT8, 6},
795 {
"int:7", SchemaType::INT7, CppType::INT8, 7},
796 {
"int:8", SchemaType::INT8, CppType::INT8, 8},
797 {
"int:9", SchemaType::INT9, CppType::INT16, 9},
798 {
"int:10", SchemaType::INT10, CppType::INT16, 10},
799 {
"int:11", SchemaType::INT11, CppType::INT16, 11},
800 {
"int:12", SchemaType::INT12, CppType::INT16, 12},
801 {
"int:13", SchemaType::INT13, CppType::INT16, 13},
802 {
"int:14", SchemaType::INT14, CppType::INT16, 14},
803 {
"int:15", SchemaType::INT15, CppType::INT16, 15},
804 {
"int:16", SchemaType::INT16, CppType::INT16, 16},
805 {
"int:17", SchemaType::INT17, CppType::INT32, 17},
806 {
"int:18", SchemaType::INT18, CppType::INT32, 18},
807 {
"int:19", SchemaType::INT19, CppType::INT32, 19},
808 {
"int:20", SchemaType::INT20, CppType::INT32, 20},
809 {
"int:21", SchemaType::INT21, CppType::INT32, 21},
810 {
"int:22", SchemaType::INT22, CppType::INT32, 22},
811 {
"int:23", SchemaType::INT23, CppType::INT32, 23},
812 {
"int:24", SchemaType::INT24, CppType::INT32, 24},
813 {
"int:25", SchemaType::INT25, CppType::INT32, 25},
814 {
"int:26", SchemaType::INT26, CppType::INT32, 26},
815 {
"int:27", SchemaType::INT27, CppType::INT32, 27},
816 {
"int:28", SchemaType::INT28, CppType::INT32, 28},
817 {
"int:29", SchemaType::INT29, CppType::INT32, 29},
818 {
"int:30", SchemaType::INT30, CppType::INT32, 30},
819 {
"int:31", SchemaType::INT31, CppType::INT32, 31},
820 {
"int:32", SchemaType::INT32, CppType::INT32, 32},
821 {
"int:33", SchemaType::INT33, CppType::INT64, 33},
822 {
"int:34", SchemaType::INT34, CppType::INT64, 34},
823 {
"int:35", SchemaType::INT35, CppType::INT64, 35},
824 {
"int:36", SchemaType::INT36, CppType::INT64, 36},
825 {
"int:37", SchemaType::INT37, CppType::INT64, 37},
826 {
"int:38", SchemaType::INT38, CppType::INT64, 38},
827 {
"int:39", SchemaType::INT39, CppType::INT64, 39},
828 {
"int:40", SchemaType::INT40, CppType::INT64, 40},
829 {
"int:41", SchemaType::INT41, CppType::INT64, 41},
830 {
"int:42", SchemaType::INT42, CppType::INT64, 42},
831 {
"int:43", SchemaType::INT43, CppType::INT64, 43},
832 {
"int:44", SchemaType::INT44, CppType::INT64, 44},
833 {
"int:45", SchemaType::INT45, CppType::INT64, 45},
834 {
"int:46", SchemaType::INT46, CppType::INT64, 46},
835 {
"int:47", SchemaType::INT47, CppType::INT64, 47},
836 {
"int:48", SchemaType::INT48, CppType::INT64, 48},
837 {
"int:49", SchemaType::INT49, CppType::INT64, 49},
838 {
"int:50", SchemaType::INT50, CppType::INT64, 50},
839 {
"int:51", SchemaType::INT51, CppType::INT64, 51},
840 {
"int:52", SchemaType::INT52, CppType::INT64, 52},
841 {
"int:53", SchemaType::INT53, CppType::INT64, 53},
842 {
"int:54", SchemaType::INT54, CppType::INT64, 54},
843 {
"int:55", SchemaType::INT55, CppType::INT64, 55},
844 {
"int:56", SchemaType::INT56, CppType::INT64, 56},
845 {
"int:57", SchemaType::INT57, CppType::INT64, 57},
846 {
"int:58", SchemaType::INT58, CppType::INT64, 58},
847 {
"int:59", SchemaType::INT59, CppType::INT64, 59},
848 {
"int:60", SchemaType::INT60, CppType::INT64, 60},
849 {
"int:61", SchemaType::INT61, CppType::INT64, 61},
850 {
"int:62", SchemaType::INT62, CppType::INT64, 62},
851 {
"int:63", SchemaType::INT63, CppType::INT64, 63},
852 {
"int:64", SchemaType::INT64, CppType::INT64, 64}}};
854 return bitFieldTypeInfoArray[BIT_SIZE - 1U];
858 static const std::array<FixedSizeBuiltinTypeInfo<ALLOC>, 64> bitFieldTypeInfoArray = {
859 {{
"bit:1", SchemaType::UINT1, CppType::UINT8, 1},
860 {
"bit:2", SchemaType::UINT2, CppType::UINT8, 2},
861 {
"bit:3", SchemaType::UINT3, CppType::UINT8, 3},
862 {
"bit:4", SchemaType::UINT4, CppType::UINT8, 4},
863 {
"bit:5", SchemaType::UINT5, CppType::UINT8, 5},
864 {
"bit:6", SchemaType::UINT6, CppType::UINT8, 6},
865 {
"bit:7", SchemaType::UINT7, CppType::UINT8, 7},
866 {
"bit:8", SchemaType::UINT8, CppType::UINT8, 8},
867 {
"bit:9", SchemaType::UINT9, CppType::UINT16, 9},
868 {
"bit:10", SchemaType::UINT10, CppType::UINT16, 10},
869 {
"bit:11", SchemaType::UINT11, CppType::UINT16, 11},
870 {
"bit:12", SchemaType::UINT12, CppType::UINT16, 12},
871 {
"bit:13", SchemaType::UINT13, CppType::UINT16, 13},
872 {
"bit:14", SchemaType::UINT14, CppType::UINT16, 14},
873 {
"bit:15", SchemaType::UINT15, CppType::UINT16, 15},
874 {
"bit:16", SchemaType::UINT16, CppType::UINT16, 16},
875 {
"bit:17", SchemaType::UINT17, CppType::UINT32, 17},
876 {
"bit:18", SchemaType::UINT18, CppType::UINT32, 18},
877 {
"bit:19", SchemaType::UINT19, CppType::UINT32, 19},
878 {
"bit:20", SchemaType::UINT20, CppType::UINT32, 20},
879 {
"bit:21", SchemaType::UINT21, CppType::UINT32, 21},
880 {
"bit:22", SchemaType::UINT22, CppType::UINT32, 22},
881 {
"bit:23", SchemaType::UINT23, CppType::UINT32, 23},
882 {
"bit:24", SchemaType::UINT24, CppType::UINT32, 24},
883 {
"bit:25", SchemaType::UINT25, CppType::UINT32, 25},
884 {
"bit:26", SchemaType::UINT26, CppType::UINT32, 26},
885 {
"bit:27", SchemaType::UINT27, CppType::UINT32, 27},
886 {
"bit:28", SchemaType::UINT28, CppType::UINT32, 28},
887 {
"bit:29", SchemaType::UINT29, CppType::UINT32, 29},
888 {
"bit:30", SchemaType::UINT30, CppType::UINT32, 30},
889 {
"bit:31", SchemaType::UINT31, CppType::UINT32, 31},
890 {
"bit:32", SchemaType::UINT32, CppType::UINT32, 32},
891 {
"bit:33", SchemaType::UINT33, CppType::UINT64, 33},
892 {
"bit:34", SchemaType::UINT34, CppType::UINT64, 34},
893 {
"bit:35", SchemaType::UINT35, CppType::UINT64, 35},
894 {
"bit:36", SchemaType::UINT36, CppType::UINT64, 36},
895 {
"bit:37", SchemaType::UINT37, CppType::UINT64, 37},
896 {
"bit:38", SchemaType::UINT38, CppType::UINT64, 38},
897 {
"bit:39", SchemaType::UINT39, CppType::UINT64, 39},
898 {
"bit:40", SchemaType::UINT40, CppType::UINT64, 40},
899 {
"bit:41", SchemaType::UINT41, CppType::UINT64, 41},
900 {
"bit:42", SchemaType::UINT42, CppType::UINT64, 42},
901 {
"bit:43", SchemaType::UINT43, CppType::UINT64, 43},
902 {
"bit:44", SchemaType::UINT44, CppType::UINT64, 44},
903 {
"bit:45", SchemaType::UINT45, CppType::UINT64, 45},
904 {
"bit:46", SchemaType::UINT46, CppType::UINT64, 46},
905 {
"bit:47", SchemaType::UINT47, CppType::UINT64, 47},
906 {
"bit:48", SchemaType::UINT48, CppType::UINT64, 48},
907 {
"bit:49", SchemaType::UINT49, CppType::UINT64, 49},
908 {
"bit:50", SchemaType::UINT50, CppType::UINT64, 50},
909 {
"bit:51", SchemaType::UINT51, CppType::UINT64, 51},
910 {
"bit:52", SchemaType::UINT52, CppType::UINT64, 52},
911 {
"bit:53", SchemaType::UINT53, CppType::UINT64, 53},
912 {
"bit:54", SchemaType::UINT54, CppType::UINT64, 54},
913 {
"bit:55", SchemaType::UINT55, CppType::UINT64, 55},
914 {
"bit:56", SchemaType::UINT56, CppType::UINT64, 56},
915 {
"bit:57", SchemaType::UINT57, CppType::UINT64, 57},
916 {
"bit:58", SchemaType::UINT58, CppType::UINT64, 58},
917 {
"bit:59", SchemaType::UINT59, CppType::UINT64, 59},
918 {
"bit:60", SchemaType::UINT60, CppType::UINT64, 60},
919 {
"bit:61", SchemaType::UINT61, CppType::UINT64, 61},
920 {
"bit:62", SchemaType::UINT62, CppType::UINT64, 62},
921 {
"bit:63", SchemaType::UINT63, CppType::UINT64, 63},
922 {
"bit:64", SchemaType::UINT64, CppType::UINT64, 64}}};
924 return bitFieldTypeInfoArray[
static_cast<size_t>(BIT_SIZE - 1)];
928 template <
typename ALLOC>
929 TemplatableTypeInfoBase<ALLOC>::TemplatableTypeInfoBase(std::string_view schemaName,
SchemaType schemaType,
930 CppType cppType, std::string_view templateName,
931 Span<
const BasicTemplateArgumentInfo<ALLOC>> templateArguments) :
932 TypeInfoBase<ALLOC>(schemaName, schemaType, cppType),
933 m_templateName(templateName),
934 m_templateArguments(templateArguments)
937 template <
typename ALLOC>
938 TemplatableTypeInfoBase<ALLOC>::~TemplatableTypeInfoBase() =
default;
940 template <
typename ALLOC>
941 std::string_view TemplatableTypeInfoBase<ALLOC>::getTemplateName()
const
943 return m_templateName;
946 template <
typename ALLOC>
947 Span<const BasicTemplateArgumentInfo<ALLOC>> TemplatableTypeInfoBase<ALLOC>::getTemplateArguments()
const
949 return m_templateArguments;
952 template <
typename ALLOC>
953 CompoundTypeInfoBase<ALLOC>::CompoundTypeInfoBase(std::string_view schemaName,
955 std::string_view templateName, Span<
const BasicTemplateArgumentInfo<ALLOC>> templateArguments,
956 Span<
const BasicFieldInfo<ALLOC>> fields, Span<
const BasicParameterInfo<ALLOC>> parameters,
957 Span<
const BasicFunctionInfo<ALLOC>> functions) :
958 TemplatableTypeInfoBase<ALLOC>(schemaName, schemaType, cppType, templateName, templateArguments),
959 m_createInstanceFunc(createInstanceFunc),
961 m_parameters(parameters),
962 m_functions(functions)
965 template <
typename ALLOC>
966 CompoundTypeInfoBase<ALLOC>::~CompoundTypeInfoBase() =
default;
968 template <
typename ALLOC>
969 Span<const BasicFieldInfo<ALLOC>> CompoundTypeInfoBase<ALLOC>::getFields()
const
974 template <
typename ALLOC>
975 Span<const BasicParameterInfo<ALLOC>> CompoundTypeInfoBase<ALLOC>::getParameters()
const
980 template <
typename ALLOC>
981 Span<const BasicFunctionInfo<ALLOC>> CompoundTypeInfoBase<ALLOC>::getFunctions()
const
986 template <
typename ALLOC>
987 IBasicReflectableDataPtr<ALLOC> CompoundTypeInfoBase<ALLOC>::createInstance(
const ALLOC& allocator)
const
989 if (!m_createInstanceFunc)
991 throw CppRuntimeException(
"Reflectable '")
992 << getSchemaName() <<
"': Cannot create instance, not implemented!";
994 return m_createInstanceFunc(allocator);
997 template <
typename ALLOC>
998 StructTypeInfo<ALLOC>::StructTypeInfo(std::string_view schemaName, CreateInstanceFunc createInstanceFunc,
999 std::string_view templateName, Span<
const BasicTemplateArgumentInfo<ALLOC>> templateArguments,
1000 Span<
const BasicFieldInfo<ALLOC>> fields, Span<
const BasicParameterInfo<ALLOC>> parameters,
1001 Span<
const BasicFunctionInfo<ALLOC>> functions) :
1003 templateName, templateArguments, fields, parameters, functions)
1006 template <
typename ALLOC>
1007 UnionTypeInfo<ALLOC>::UnionTypeInfo(std::string_view schemaName, CreateInstanceFunc createInstanceFunc,
1008 std::string_view templateName, Span<
const BasicTemplateArgumentInfo<ALLOC>> templateArguments,
1009 Span<
const BasicFieldInfo<ALLOC>> fields, Span<
const BasicParameterInfo<ALLOC>> parameters,
1010 Span<
const BasicFunctionInfo<ALLOC>> functions) :
1012 templateName, templateArguments, fields, parameters, functions)
1015 template <
typename ALLOC>
1016 ChoiceTypeInfo<ALLOC>::ChoiceTypeInfo(std::string_view schemaName, CreateInstanceFunc createInstanceFunc,
1017 std::string_view templateName, Span<
const BasicTemplateArgumentInfo<ALLOC>> templateArguments,
1018 Span<
const BasicFieldInfo<ALLOC>> fields, Span<
const BasicParameterInfo<ALLOC>> parameters,
1019 Span<
const BasicFunctionInfo<ALLOC>> functions, std::string_view selector,
1020 Span<
const BasicCaseInfo<ALLOC>> cases) :
1022 templateName, templateArguments, fields, parameters, functions),
1023 m_selector(selector),
1027 template <
typename ALLOC>
1028 std::string_view ChoiceTypeInfo<ALLOC>::getSelector()
const
1033 template <
typename ALLOC>
1034 Span<const BasicCaseInfo<ALLOC>> ChoiceTypeInfo<ALLOC>::getCases()
const
1039 template <
typename ALLOC>
1040 SqlTableTypeInfo<ALLOC>::SqlTableTypeInfo(std::string_view schemaName, std::string_view templateName,
1041 Span<
const BasicTemplateArgumentInfo<ALLOC>> templateArguments,
1042 Span<
const BasicColumnInfo<ALLOC>> columns, std::string_view sqlConstraint,
1043 std::string_view virtualTableUsing,
bool isWithoutRowId) :
1044 TemplatableTypeInfoBase<ALLOC>(
1047 m_sqlConstraint(sqlConstraint),
1048 m_virtualTableUsing(virtualTableUsing),
1049 m_isWithoutRowId(isWithoutRowId)
1052 template <
typename ALLOC>
1053 Span<const BasicColumnInfo<ALLOC>> SqlTableTypeInfo<ALLOC>::getColumns()
const
1058 template <
typename ALLOC>
1059 std::string_view SqlTableTypeInfo<ALLOC>::getSqlConstraint()
const
1061 return m_sqlConstraint;
1064 template <
typename ALLOC>
1065 std::string_view SqlTableTypeInfo<ALLOC>::getVirtualTableUsing()
const
1067 return m_virtualTableUsing;
1070 template <
typename ALLOC>
1071 bool SqlTableTypeInfo<ALLOC>::isWithoutRowId()
const
1073 return m_isWithoutRowId;
1076 template <
typename ALLOC>
1077 SqlDatabaseTypeInfo<ALLOC>::SqlDatabaseTypeInfo(
1078 std::string_view schemaName, Span<
const BasicTableInfo<ALLOC>> tables) :
1083 template <
typename ALLOC>
1084 Span<const BasicTableInfo<ALLOC>> SqlDatabaseTypeInfo<ALLOC>::getTables()
const
1089 template <
typename ALLOC>
1090 TypeInfoWithUnderlyingTypeBase<ALLOC>::TypeInfoWithUnderlyingTypeBase(std::string_view schemaName,
1091 SchemaType schemaType,
CppType cppType,
const IBasicTypeInfo<ALLOC>& underlyingType) :
1092 TypeInfoBase<ALLOC>(schemaName, schemaType, cppType),
1093 m_underlyingType(underlyingType)
1096 template <
typename ALLOC>
1097 const IBasicTypeInfo<ALLOC>& TypeInfoWithUnderlyingTypeBase<ALLOC>::getUnderlyingType()
const
1099 return m_underlyingType;
1102 template <
typename ALLOC>
1103 EnumTypeInfo<ALLOC>::EnumTypeInfo(std::string_view schemaName,
const IBasicTypeInfo<ALLOC>& underlyingType,
1104 Span<const ItemInfo> enumItems) :
1106 m_enumItems(enumItems)
1109 template <
typename ALLOC>
1110 Span<const ItemInfo> EnumTypeInfo<ALLOC>::getEnumItems()
const
1115 template <
typename ALLOC>
1116 BitmaskTypeInfo<ALLOC>::BitmaskTypeInfo(std::string_view schemaName,
1117 const IBasicTypeInfo<ALLOC>& underlyingType, Span<const ItemInfo> bitmaskValues) :
1118 TypeInfoWithUnderlyingTypeBase<ALLOC>(
1120 m_bitmaskValues(bitmaskValues)
1123 template <
typename ALLOC>
1124 Span<const ItemInfo> BitmaskTypeInfo<ALLOC>::getBitmaskValues()
const
1126 return m_bitmaskValues;
1129 template <
typename ALLOC>
1130 PubsubTypeInfo<ALLOC>::PubsubTypeInfo(
1131 std::string_view schemaName, Span<
const BasicMessageInfo<ALLOC>> messages) :
1133 m_messages(messages)
1136 template <
typename ALLOC>
1137 Span<const BasicMessageInfo<ALLOC>> PubsubTypeInfo<ALLOC>::getMessages()
const
1142 template <
typename ALLOC>
1143 ServiceTypeInfo<ALLOC>::ServiceTypeInfo(
1144 std::string_view schemaName, Span<
const BasicMethodInfo<ALLOC>> methods) :
1149 template <
typename ALLOC>
1150 Span<const BasicMethodInfo<ALLOC>> ServiceTypeInfo<ALLOC>::getMethods()
const
1155 template <
typename ALLOC>
1156 std::string_view RecursiveTypeInfo<ALLOC>::getSchemaName()
const
1158 return m_typeInfoFunc().getSchemaName();
1161 template <
typename ALLOC>
1162 SchemaType RecursiveTypeInfo<ALLOC>::getSchemaType()
const
1164 return m_typeInfoFunc().getSchemaType();
1167 template <
typename ALLOC>
1168 CppType RecursiveTypeInfo<ALLOC>::getCppType()
const
1170 return m_typeInfoFunc().getCppType();
1173 template <
typename ALLOC>
1174 uint8_t RecursiveTypeInfo<ALLOC>::getBitSize()
const
1176 return m_typeInfoFunc().getBitSize();
1179 template <
typename ALLOC>
1180 Span<const BasicFieldInfo<ALLOC>> RecursiveTypeInfo<ALLOC>::getFields()
const
1182 return m_typeInfoFunc().getFields();
1185 template <
typename ALLOC>
1186 Span<const BasicParameterInfo<ALLOC>> RecursiveTypeInfo<ALLOC>::getParameters()
const
1188 return m_typeInfoFunc().getParameters();
1191 template <
typename ALLOC>
1192 Span<const BasicFunctionInfo<ALLOC>> RecursiveTypeInfo<ALLOC>::getFunctions()
const
1194 return m_typeInfoFunc().getFunctions();
1197 template <
typename ALLOC>
1198 std::string_view RecursiveTypeInfo<ALLOC>::getSelector()
const
1200 return m_typeInfoFunc().getSelector();
1203 template <
typename ALLOC>
1204 Span<const BasicCaseInfo<ALLOC>> RecursiveTypeInfo<ALLOC>::getCases()
const
1206 return m_typeInfoFunc().getCases();
1209 template <
typename ALLOC>
1210 const IBasicTypeInfo<ALLOC>& RecursiveTypeInfo<ALLOC>::getUnderlyingType()
const
1212 return m_typeInfoFunc().getUnderlyingType();
1215 template <
typename ALLOC>
1216 Span<const ItemInfo> RecursiveTypeInfo<ALLOC>::getEnumItems()
const
1218 return m_typeInfoFunc().getEnumItems();
1221 template <
typename ALLOC>
1222 Span<const ItemInfo> RecursiveTypeInfo<ALLOC>::getBitmaskValues()
const
1224 return m_typeInfoFunc().getBitmaskValues();
1227 template <
typename ALLOC>
1228 Span<const BasicColumnInfo<ALLOC>> RecursiveTypeInfo<ALLOC>::getColumns()
const
1230 return m_typeInfoFunc().getColumns();
1233 template <
typename ALLOC>
1234 std::string_view RecursiveTypeInfo<ALLOC>::getSqlConstraint()
const
1236 return m_typeInfoFunc().getSqlConstraint();
1239 template <
typename ALLOC>
1240 std::string_view RecursiveTypeInfo<ALLOC>::getVirtualTableUsing()
const
1242 return m_typeInfoFunc().getVirtualTableUsing();
1245 template <
typename ALLOC>
1246 bool RecursiveTypeInfo<ALLOC>::isWithoutRowId()
const
1248 return m_typeInfoFunc().isWithoutRowId();
1251 template <
typename ALLOC>
1252 Span<const BasicTableInfo<ALLOC>> RecursiveTypeInfo<ALLOC>::getTables()
const
1254 return m_typeInfoFunc().getTables();
1257 template <
typename ALLOC>
1258 std::string_view RecursiveTypeInfo<ALLOC>::getTemplateName()
const
1260 return m_typeInfoFunc().getTemplateName();
1263 template <
typename ALLOC>
1264 Span<const BasicTemplateArgumentInfo<ALLOC>> RecursiveTypeInfo<ALLOC>::getTemplateArguments()
const
1266 return m_typeInfoFunc().getTemplateArguments();
1269 template <
typename ALLOC>
1270 Span<const BasicMessageInfo<ALLOC>> RecursiveTypeInfo<ALLOC>::getMessages()
const
1272 return m_typeInfoFunc().getMessages();
1275 template <
typename ALLOC>
1276 Span<const BasicMethodInfo<ALLOC>> RecursiveTypeInfo<ALLOC>::getMethods()
const
1278 return m_typeInfoFunc().getMethods();
1281 template <
typename ALLOC>
1282 IBasicReflectableDataPtr<ALLOC> RecursiveTypeInfo<ALLOC>::createInstance(
const ALLOC& allocator)
const
1284 return m_typeInfoFunc().createInstance(allocator);
1287 template <
typename ALLOC>
1288 IBasicReflectableDataPtr<ALLOC> RecursiveTypeInfo<ALLOC>::createInstance()
const
1290 return createInstance(ALLOC());
1293 template <
typename ALLOC>
1294 struct TypeInfo<
Bool, ALLOC>
1296 static const IBasicTypeInfo<ALLOC>&
get()
1298 static const FixedSizeBuiltinTypeInfo<ALLOC>
typeInfo = {
"bool", SchemaType::BOOL, CppType::BOOL, 1};
1303 template <BitSize BIT_SIZE,
bool IS_SIGNED,
typename ALLOC>
1304 struct TypeInfo<detail::FixedIntWrapper<BIT_SIZE, IS_SIGNED>, ALLOC>
1306 static const IBasicTypeInfo<ALLOC>&
get()
1308 return FixedSizeBuiltinTypeInfo<ALLOC>::template getFixedBitField<BIT_SIZE, IS_SIGNED>();
1312 template <
typename T,
typename ALLOC>
1313 struct TypeInfo<detail::DynIntWrapper<T>, ALLOC>
1315 static const IBasicTypeInfo<ALLOC>&
get()
1317 return BuiltinTypeInfo<ALLOC>::template getDynamicBitField<T>();
1321 template <
typename ALLOC>
1324 static const IBasicTypeInfo<ALLOC>&
get()
1326 static const BuiltinTypeInfo<ALLOC>
typeInfo = {
"varint16", SchemaType::VARINT16, CppType::INT16};
1331 template <
typename ALLOC>
1334 static const IBasicTypeInfo<ALLOC>&
get()
1336 static const BuiltinTypeInfo<ALLOC>
typeInfo = {
"varint32", SchemaType::VARINT32, CppType::INT32};
1341 template <
typename ALLOC>
1344 static const IBasicTypeInfo<ALLOC>&
get()
1346 static const BuiltinTypeInfo<ALLOC>
typeInfo = {
"varint64", SchemaType::VARINT64, CppType::INT64};
1351 template <
typename ALLOC>
1352 struct TypeInfo<
VarInt, ALLOC>
1354 static const IBasicTypeInfo<ALLOC>&
get()
1356 static const BuiltinTypeInfo<ALLOC>
typeInfo = {
"varint", SchemaType::VARINT, CppType::INT64};
1361 template <
typename ALLOC>
1364 static const IBasicTypeInfo<ALLOC>&
get()
1366 static const BuiltinTypeInfo<ALLOC>
typeInfo = {
"varuint16", SchemaType::VARUINT16, CppType::UINT16};
1371 template <
typename ALLOC>
1374 static const IBasicTypeInfo<ALLOC>&
get()
1376 static const BuiltinTypeInfo<ALLOC>
typeInfo = {
"varuint32", SchemaType::VARUINT32, CppType::UINT32};
1381 template <
typename ALLOC>
1384 static const IBasicTypeInfo<ALLOC>&
get()
1386 static const BuiltinTypeInfo<ALLOC>
typeInfo = {
"varuint64", SchemaType::VARUINT64, CppType::UINT64};
1391 template <
typename ALLOC>
1392 struct TypeInfo<
VarUInt, ALLOC>
1394 static const IBasicTypeInfo<ALLOC>&
get()
1396 static const BuiltinTypeInfo<ALLOC>
typeInfo = {
"varuint", SchemaType::VARUINT, CppType::UINT64};
1401 template <
typename ALLOC>
1402 struct TypeInfo<
VarSize, ALLOC>
1404 static const IBasicTypeInfo<ALLOC>&
get()
1406 static const BuiltinTypeInfo<ALLOC>
typeInfo = {
"varsize", SchemaType::VARSIZE, CppType::UINT32};
1411 template <
typename ALLOC>
1412 struct TypeInfo<
Float16, ALLOC>
1414 static const IBasicTypeInfo<ALLOC>&
get()
1416 static const FixedSizeBuiltinTypeInfo<ALLOC>
typeInfo = {
1417 "float16", SchemaType::FLOAT16, CppType::FLOAT, 16};
1422 template <
typename ALLOC>
1423 struct TypeInfo<
Float32, ALLOC>
1425 static const IBasicTypeInfo<ALLOC>&
get()
1427 static const FixedSizeBuiltinTypeInfo<ALLOC>
typeInfo = {
1428 "float32", SchemaType::FLOAT32, CppType::FLOAT, 32};
1433 template <
typename ALLOC>
1434 struct TypeInfo<
Float64, ALLOC>
1436 static const IBasicTypeInfo<ALLOC>&
get()
1438 static const FixedSizeBuiltinTypeInfo<ALLOC>
typeInfo = {
1439 "float64", SchemaType::FLOAT64, CppType::DOUBLE, 64};
1444 template <
typename ALLOC>
1447 static const IBasicTypeInfo<ALLOC>&
get()
1449 static const BuiltinTypeInfo<ALLOC>
typeInfo = {
"bytes", SchemaType::BYTES, CppType::BYTES};
1454 template <
typename ALLOC>
1457 static const IBasicTypeInfo<RebindAlloc<ALLOC, uint8_t>>&
get()
1459 static const BuiltinTypeInfo<RebindAlloc<ALLOC, uint8_t>>
typeInfo = {
1460 "string", SchemaType::STRING, CppType::STRING};
1465 template <
typename ALLOC>
1466 struct TypeInfo<
std::string_view, ALLOC>
1468 static const IBasicTypeInfo<ALLOC>&
get()
1470 static const BuiltinTypeInfo<ALLOC>
typeInfo = {
"string", SchemaType::STRING, CppType::STRING};
1475 template <
typename ALLOC>
1476 struct TypeInfo<BasicBitBuffer<ALLOC>, ALLOC>
1478 static const IBasicTypeInfo<ALLOC>&
get()
1480 static const BuiltinTypeInfo<ALLOC>
typeInfo = {
"extern", SchemaType::EXTERN, CppType::BIT_BUFFER};
virtual Span< const BasicMethodInfo< ALLOC > > getMethods() const=0
virtual Span< const BasicTemplateArgumentInfo< ALLOC > > getTemplateArguments() const=0
virtual Span< const BasicCaseInfo< ALLOC > > getCases() const=0
virtual Span< const BasicFieldInfo< ALLOC > > getFields() const=0
virtual std::string_view getVirtualTableUsing() const=0
virtual uint8_t getBitSize() const=0
virtual bool isWithoutRowId() const=0
virtual Span< const BasicParameterInfo< ALLOC > > getParameters() const=0
virtual IBasicReflectableDataPtr< ALLOC > createInstance(const ALLOC &allocator) const=0
virtual const IBasicTypeInfo< ALLOC > & getUnderlyingType() const=0
virtual std::string_view getSqlConstraint() const=0
virtual Span< const BasicMessageInfo< ALLOC > > getMessages() const=0
virtual Span< const BasicTableInfo< ALLOC > > getTables() const=0
virtual std::string_view getTemplateName() const=0
virtual Span< const BasicFunctionInfo< ALLOC > > getFunctions() const=0
virtual Span< const BasicColumnInfo< ALLOC > > getColumns() const=0
virtual CppType getCppType() const=0
virtual Span< const ItemInfo > getEnumItems() const=0
virtual SchemaType getSchemaType() const=0
virtual std::string_view getSelector() const=0
virtual Span< const ItemInfo > getBitmaskValues() const=0
virtual std::string_view getSchemaName() const=0
detail::VarIntWrapper< uint64_t, detail::VarIntType::VAR > VarUInt
std::basic_string< char, std::char_traits< char >, ALLOC > BasicString
detail::FloatWrapper< float, detail::FloatType::FLOAT16 > Float16
std::vector< uint8_t, ALLOC > BasicBytes
detail::FloatWrapper< float, detail::FloatType::FLOAT32 > Float32
detail::VarIntWrapper< int32_t, detail::VarIntType::VAR32 > VarInt32
typename std::allocator_traits< ALLOC >::template rebind_alloc< T > RebindAlloc
detail::VarIntWrapper< uint16_t, detail::VarIntType::VAR16 > VarUInt16
decltype(auto) get(BasicVariant< ALLOC, INDEX, T... > &var)
detail::VarIntWrapper< uint64_t, detail::VarIntType::VAR64 > VarUInt64
const IBasicTypeInfo< ALLOC > & typeInfo()
detail::VarIntWrapper< int16_t, detail::VarIntType::VAR16 > VarInt16
detail::FloatWrapper< double, detail::FloatType::FLOAT64 > Float64
detail::VarIntWrapper< uint32_t, detail::VarIntType::VAR32 > VarUInt32
detail::VarIntWrapper< int64_t, detail::VarIntType::VAR > VarInt
detail::VarIntWrapper< int64_t, detail::VarIntType::VAR64 > VarInt64
detail::VarIntWrapper< uint32_t, detail::VarIntType::VARSIZE > VarSize