Sane C++ Libraries
C++ Platform Abstraction Libraries
SC::Reflection::SchemaType< TypeVisitor > Struct Template Reference

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
 

Detailed Description

template<typename TypeVisitor>
struct SC::Reflection::SchemaType< TypeVisitor >

Holds together a TypeInfo, a StringView and a type-erased builder function pointer.

Template Parameters
TypeVisitorThe type of member visitor that is parameter of the builder function

Member Function Documentation

◆ createArray()

template<typename TypeVisitor >
template<typename T >
static constexpr SchemaType SC::Reflection::SchemaType< TypeVisitor >::createArray ( TypeStringView  name,
uint8_t  numChildren,
TypeInfo::ArrayInfo  arrayInfo 
)
inlinestaticconstexpr

Create from an array-like type.

◆ createGeneric()

template<typename TypeVisitor >
template<typename T >
static constexpr SchemaType SC::Reflection::SchemaType< TypeVisitor >::createGeneric ( )
inlinestaticconstexpr

Create from a generic type T.

◆ createMember()

template<typename TypeVisitor >
template<typename R , typename T , int N>
static constexpr SchemaType SC::Reflection::SchemaType< TypeVisitor >::createMember ( uint8_t  memberTag,
R T::*  ,
const char(&)  name[N],
size_t  offset 
)
inlinestaticconstexpr

Create from a struct member with given name, memberTag and offset.

◆ createStruct()

template<typename TypeVisitor >
template<typename T >
static constexpr SchemaType SC::Reflection::SchemaType< TypeVisitor >::createStruct ( TypeStringView  name = TypeToString<T>::get())
inlinestaticconstexpr

Create from a Struct type T.


The documentation for this struct was generated from the following file: