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 void * access (const void *target) const override
 Provides access to the object.
 
const TypeInfo & getType (const TypeAttribute attribute) const override
 
- Public Member Functions inherited from CeresEngine::TypeInfo
virtual ~TypeInfo ()=default
 
TypeID getID () const noexcept
 
virtual const TypeInfo & desugar () const
 Desugar the type into a raw type.
 
template<typename T >
bool is () const noexcept
 
template<typename T >
const T * as () const noexcept
 
template<typename T >
const T * being () const noexcept
 
const TypeInfo & removeReference () const
 
const TypeInfo & removePointer () const
 
const TypeInfo & removeConst () const
 
- Public Member Functions inherited from CeresEngine::Class
 Class (const StringView name)
 
 ~Class () override=default
 
Generator< const Class > forEachDirectBase () const
 
Generator< const Class > forEachBase () const
 
bool inheritedFrom (const Class *base) const
 
void forEachConstructor (const MemberIteratorFunc< ClassConstructor > &func) const
 Enumerates over all constructors in the class.
 
MemberIterator< ClassConstructor > forEachConstructor () const
 Enumerates over all constructors in the class.
 
template<typename... Args>
const ClassConstructor * getConstructor () const
 
const ClassConstructor * getConstructor (StringView oldSignature) const
 
const ClassConstructor * getDefaultConstructor () const
 
const ClassConstructor * getCopyConstructor () const
 
const ClassConstructor * getMoveConstructor () 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< ClassProperty > forEachProperty (MetaMemberIterationFlags flags=MetaMemberIterationFlag::Default) const
 Enumerates over all properties in the class.
 
const ClassProperty * getProperty (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< ClassMethod > forEachMethod (MetaMemberIterationFlags flags=MetaMemberIterationFlag::Default) const
 Enumerates over all methods in the class.
 
template<typename... Args>
const ClassMethod * getMethod (StringView name) const
 
const void * cast (const Class *base, const void *instance) const
 
void * cast (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 T > forEach () const
 
Generator< const MetaItem > forEach (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 Class * find (TypeID typeID)
 Finds a Class by it's type ID.
 
static const Class * find (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: