Holds together a TypeInfo, a StringView and a type-erased builder function pointer. More...
#include <ReflectionSchemaCompiler.h>
Public Types | |
using | TypeBuildFunction = bool(*)(TypeVisitor &builder) |
Public Member Functions | |
constexpr | SchemaType (const TypeInfo typeInfo, TypeStringView typeName, TypeBuildFunction typeBuild) |
Static Public Member Functions | |
template<typename T > | |
static constexpr SchemaType | createGeneric () |
Create from a generic type T. More... | |
template<typename T > | |
static constexpr SchemaType | createStruct (TypeStringView name=TypeToString< T >::get()) |
Create from a Struct type T. More... | |
template<typename R , typename T , int N> | |
static constexpr SchemaType | createMember (uint8_t memberTag, R T::*, const char(&name)[N], size_t offset) |
Create from a struct member with given name, memberTag and offset. More... | |
template<typename T > | |
static constexpr SchemaType | createArray (TypeStringView name, uint8_t numChildren, TypeInfo::ArrayInfo arrayInfo) |
Create from an array-like type. More... | |
Public Attributes | |
TypeInfo | typeInfo |
TypeStringView | typeName |
TypeBuildFunction | typeBuild |
Holds together a TypeInfo, a StringView and a type-erased builder function pointer.
TypeVisitor | The type of member visitor that is parameter of the builder function |
|
inlinestaticconstexpr |
Create from an array-like type.
|
inlinestaticconstexpr |
Create from a generic type T.
|
inlinestaticconstexpr |
Create from a struct member with given name, memberTag and offset.
|
inlinestaticconstexpr |
Create from a Struct type T.