CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::TClass< T > Class Template Reference

#include <CeresEngine/Reflection/Class.define.hpp>

Inheritance diagram for CeresEngine::TClass< T >:
CeresEngine::TTypeInfoBase< T, Traits > CeresEngine::Class CeresEngine::impl::TMetaReflectableClassType< T > CeresEngine::TypeInfo CeresEngine::MetaContainer CeresEngine::ReflectableClassTypeTrait

Public Member Functions

 TClass ()
 
StringView getName () const noexcept final
 
template<typename B >
void base ()
 
template<typename Base0 , typename... Bs>
void bases ()
 
template<typename... Args>
void constructor ()
 
template<typename P >
void property (StringView name, P &&property, MetaAttributeList &&attributes={})
 
template<typename G , typename S >
void property (StringView name, G &&getter, S &&setter, MetaAttributeList &&attributes={})
 
template<typename F >
void method (StringView name, F func, MetaAttributeList &&attributes={})
 
- Public Member Functions inherited from CeresEngine::TTypeInfoBase< T, Traits >
TypeIdentityHash getIdentityHash () const noexcept override
 
std::size_t getSize () const noexcept override
 
std::size_t getAlignment () const noexcept override
 
const voidaccess (const void *target) const override
 Provides access to the object.
 
const TypeInfogetType (const TypeAttribute attribute) const override
 
- Public Member Functions inherited from CeresEngine::TypeInfo
virtual ~TypeInfo ()=default
 
TypeID getID () const noexcept
 
virtual const TypeInfodesugar () const
 Desugar the type into a raw type.
 
template<typename T >
bool is () const noexcept
 
template<typename T >
const Tas () const noexcept
 
template<typename T >
const Tbeing () const noexcept
 
const TypeInforemoveReference () const
 
const TypeInforemovePointer () const
 
const TypeInforemoveConst () const
 
- Public Member Functions inherited from CeresEngine::Class
 Class (const StringView name)
 
 ~Class () override=default
 
Generator< const ClassforEachDirectBase () const
 
Generator< const ClassforEachBase () const
 
bool inheritedFrom (const Class *base) const
 
void forEachConstructor (const MemberIteratorFunc< ClassConstructor > &func) const
 Enumerates over all constructors in the class.
 
MemberIterator< ClassConstructorforEachConstructor () const
 Enumerates over all constructors in the class.
 
template<typename... Args>
const ClassConstructorgetConstructor () const
 
const ClassConstructorgetConstructor (StringView oldSignature) const
 
const ClassConstructorgetDefaultConstructor () const
 
const ClassConstructorgetCopyConstructor () const
 
const ClassConstructorgetMoveConstructor () const
 
void forEachProperty (const MemberIteratorFunc< ClassProperty > &func) const
 Enumerates over all properties in the class.
 
void forEachProperty (const MetaMemberIterationFlags &flags, const MemberIteratorFunc< ClassProperty > &func) const
 Enumerates over all properties in the class.
 
MemberIterator< ClassPropertyforEachProperty (MetaMemberIterationFlags flags=MetaMemberIterationFlag::Default) const
 Enumerates over all properties in the class.
 
const ClassPropertygetProperty (StringView name) const
 
void forEachMethod (const MemberIteratorFunc< ClassMethod > &func) const
 Enumerates over all methods in the class.
 
void forEachMethod (const MetaMemberIterationFlags &flags, const MemberIteratorFunc< ClassMethod > &func) const
 Enumerates over all methods in the class.
 
MemberIterator< ClassMethodforEachMethod (MetaMemberIterationFlags flags=MetaMemberIterationFlag::Default) const
 Enumerates over all methods in the class.
 
template<typename... Args>
const ClassMethodgetMethod (StringView name) const
 
const voidcast (const Class *base, const void *instance) const
 
voidcast (const Class *base, void *instance) const
 
- Public Member Functions inherited from CeresEngine::MetaContainer
template<typename T , typename Func >
void forEach (Func &&func) const
 
template<typename Func >
void forEach (MetaCategory category, Func &&func) const
 
template<typename T >
Generator< const TforEach () const
 
Generator< const MetaItemforEach (MetaCategory category) const
 
- Public Member Functions inherited from CeresEngine::impl::TMetaReflectableClassType< T >
ClassInfo getClassInfo (const void *target) const final
 
ClassInfo getClassInfo (void *target) const final
 
- Public Member Functions inherited from CeresEngine::ReflectableClassTypeTrait
virtual ~ReflectableClassTypeTrait ()=default
 

Additional Inherited Members

- Public Types inherited from CeresEngine::Class
using CastFunctionType = const void *(*)(const void *)
 
template<typename T >
using MemberIterator = Generator< const T >
 
template<typename T >
using MemberIteratorFunc = FunctionView< bool(const T &) const >
 
- Static Public Member Functions inherited from CeresEngine::Class
static const Classfind (TypeID typeID)
 Finds a Class by it's type ID.
 
static const Classfind (StringView name)
 Finds a Class by it's fully qualified name.
 
- Public Attributes inherited from CeresEngine::Class
const StringView name
 
ReflectionAttributeContainer attributes
 
- Protected Member Functions inherited from CeresEngine::Class
void addBaseClass (TypeID typeID, CastFunctionType caster)
 
- Protected Member Functions inherited from CeresEngine::MetaContainer
 MetaContainer ()=default
 
virtual ~MetaContainer ()=default
 
bool addItem (MetaItem *value)
 
std::size_t count (MetaCategory category) const
 

Constructor & Destructor Documentation

◆ TClass()

template<typename T >
CeresEngine::TClass< T >::TClass ( )
inlineexplicit

Member Function Documentation

◆ base()

template<typename T >
template<typename B >
void CeresEngine::TClass< T >::base ( )

◆ bases()

template<typename T >
template<typename Base0 , typename... Bs>
void CeresEngine::TClass< T >::bases ( )

◆ constructor()

template<typename T >
template<typename... Args>
void CeresEngine::TClass< T >::constructor ( )

◆ getName()

template<typename T >
StringView CeresEngine::TClass< T >::getName ( ) const
inlinefinalvirtualnoexcept

Implements CeresEngine::TypeInfo.

◆ method()

template<typename T >
template<typename F >
void CeresEngine::TClass< T >::method ( StringView  name,
F  func,
MetaAttributeList &&  attributes = {} 
)

◆ property() [1/2]

template<typename T >
template<typename G , typename S >
void CeresEngine::TClass< T >::property ( StringView  name,
G &&  getter,
S &&  setter,
MetaAttributeList &&  attributes = {} 
)

◆ property() [2/2]

template<typename T >
template<typename P >
void CeresEngine::TClass< T >::property ( StringView  name,
P &&  property,
MetaAttributeList &&  attributes = {} 
)

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