CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
Class.define.hpp File Reference
#include "Box.hpp"
#include "Class.hpp"
#include "Enum.hpp"
#include "MetaArgument.hpp"
#include "MetaContainer.hpp"
#include "MetaItem.hpp"
#include "MetaSignature.hpp"
#include "Type.define.hpp"
#include "Type.hpp"
#include "CeresEngine/Foundation/String.hpp"
#include <type_traits>

Go to the source code of this file.

Classes

class  CeresEngine::impl::TMetaReflectableClassType< T >
 
class  CeresEngine::impl::TMetaReflectableClassType< T >
 
class  CeresEngine::TClass< T >
 
struct  CeresEngine::internal::VoidStaticFunctionTag
 
struct  CeresEngine::internal::ReturnStaticFunctionTag
 
struct  CeresEngine::internal::VoidMemberFunctionTag
 
struct  CeresEngine::internal::ReturnMemberFunctionTag
 
struct  CeresEngine::internal::MethodInvokerInternal< F, VoidStaticFunctionTag >
 
struct  CeresEngine::internal::MethodInvokerInternal< F, ReturnStaticFunctionTag >
 
struct  CeresEngine::internal::MethodInvokerInternal< F, VoidMemberFunctionTag >
 
struct  CeresEngine::internal::MethodInvokerInternal< F, ReturnMemberFunctionTag >
 
struct  CeresEngine::internal::PropertyTypeTrait< P * >
 
struct  CeresEngine::internal::PropertyTypeTrait< T C::* >
 
struct  CeresEngine::internal::PropertyClassTrait< T C::* >
 
struct  CeresEngine::internal::StaticPointerTag
 
struct  CeresEngine::internal::MemberPointerTag
 
struct  CeresEngine::internal::MetaPropertyAccessorInternal< P, StaticPointerTag >
 
struct  CeresEngine::internal::MetaPropertyAccessorInternal< P, MemberPointerTag >
 
class  CeresEngine::MetaPointerProperty< PointerType >
 An implementation of MetaProperty that uses a direct pointer (or pointer to member) to access the property. More...
 
class  CeresEngine::MetaAccessorProperty< GetterType, SetterType >
 An implementation of MetaProperty that uses a getter and setter method pairs to access the property. More...
 
class  CeresEngine::TMetaMethod< F >
 
class  CeresEngine::TMetaConstructor< C, Args >
 

Namespaces

namespace  CeresEngine
 
namespace  CeresEngine::impl
 Helper functions for comparing iterators.
 
namespace  CeresEngine::internal
 

Concepts

concept  CeresEngine::impl::ReflectableClass
 

Macros

#define CE_META_CLASS_DEFINE_BASE(...)
 
#define CE_META_REFLECTABLE_CLASS_BASE(...)
 
#define CE_META_CLASS_DEFINE(...)
 
#define CE_META_REFLECTABLE_CLASS_DEFINE(...)
 
#define CE_META_CLASS_TEMPLATE_DEFINE(TType, ...)
 
#define CE_META_CLASS_TEMPLATE_SPECIALIZATION_EXTERN(...)   extern template struct ::CeresEngine::GetTypeInfo<__VA_ARGS__>;
 
#define CE_META_CLASS_TEMPLATE_SPECIALIZATION_DEFINE(...)
 

Typedefs

using CeresEngine::MetaAttributeList = Vector< Box >
 
template<typename F >
using CeresEngine::internal::MethodInvokerTag = std::conditional_t< std::is_void_v< typename function_traits< F >::result_type >, std::conditional_t< std::is_void_v< typename function_traits< F >::class_type >, VoidStaticFunctionTag, VoidMemberFunctionTag >, std::conditional_t< std::is_void_v< typename function_traits< F >::class_type >, ReturnStaticFunctionTag, ReturnMemberFunctionTag > >
 
template<typename P >
using CeresEngine::internal::PropertyType = typename PropertyTypeTrait< P >::type
 
template<typename P >
using CeresEngine::internal::PropertyClass = typename PropertyClassTrait< P >::type
 
template<typename P >
using CeresEngine::internal::MetaPropertyAccessorTag = std::conditional_t< std::is_member_pointer_v< P >, MemberPointerTag, StaticPointerTag >
 

Functions

template<typename DerivedType , typename BaseType >
void constCeresEngine::metacast_to_base (void const *value)
 

Macro Definition Documentation

◆ CE_META_CLASS_DEFINE

#define CE_META_CLASS_DEFINE (   ...)
Value:
template<> CE_META_CLASS_DEFINE_BASE(__VA_ARGS__); \
template<> const ::CeresEngine::TypeInfo& ::CeresEngine::GetTypeInfo<__VA_ARGS__>::get() { \
static const TUserTypeInfo<__VA_ARGS__> typeInfo; \
return typeInfo; \
} \
CE_META_TYPE_AUTO_REGISTRATION(__VA_ARGS__); \
void ::CeresEngine::TUserTypeInfo<__VA_ARGS__>::define(TUserTypeInfo& define)
#define CE_META_CLASS_DEFINE_BASE(...)
Definition Class.define.hpp:79
static const TypeInfo & get()

◆ CE_META_CLASS_DEFINE_BASE

#define CE_META_CLASS_DEFINE_BASE (   ...)
Value:
class ::CeresEngine::TUserTypeInfo<__VA_ARGS__> final : public TClass<__VA_ARGS__> { \
using ClassType = __VA_ARGS__; \
\
public: \
explicit TUserTypeInfo() { define(*this); } \
\
private: \
inline void define(TUserTypeInfo& define); \
}

◆ CE_META_CLASS_TEMPLATE_DEFINE

#define CE_META_CLASS_TEMPLATE_DEFINE (   TType,
  ... 
)
Value:
template<__VA_ARGS__> CE_META_CLASS_DEFINE_BASE(TType); \
template<__VA_ARGS__> struct ::CeresEngine::GetTypeInfo<TType> { \
static const TypeInfo& get() noexcept { \
static const TUserTypeInfo<TType> typeInfo; \
return typeInfo; \
} \
}; \
\
template<__VA_ARGS__> void ::CeresEngine::TUserTypeInfo<TType>::define(TUserTypeInfo& define)

◆ CE_META_CLASS_TEMPLATE_SPECIALIZATION_DEFINE

#define CE_META_CLASS_TEMPLATE_SPECIALIZATION_DEFINE (   ...)
Value:
template struct ::CeresEngine::GetTypeInfo<__VA_ARGS__>; \
CE_META_TYPE_AUTO_REGISTRATION(__VA_ARGS__);

◆ CE_META_CLASS_TEMPLATE_SPECIALIZATION_EXTERN

#define CE_META_CLASS_TEMPLATE_SPECIALIZATION_EXTERN (   ...)    extern template struct ::CeresEngine::GetTypeInfo<__VA_ARGS__>;

◆ CE_META_REFLECTABLE_CLASS_BASE

#define CE_META_REFLECTABLE_CLASS_BASE (   ...)
Value:
[[nodiscard]] ::CeresEngine::ClassInfo __VA_ARGS__::getClassInfo() noexcept { \
return ::CeresEngine::ClassInfo{ \
::CeresEngine::getTypeID<std::decay_t<decltype(*this)>>(), \
this, \
}; \
} \
\
[[nodiscard]] ::CeresEngine::ClassInfo __VA_ARGS__::getClassInfo() const noexcept { \
return ::CeresEngine::ClassInfo{ \
::CeresEngine::getTypeID<std::decay_t<decltype(*this)>>(), \
this, \
}; \
}
constexpr TypeID getTypeID()
Definition Type.hpp:425
A structure that contains type information for a class.
Definition IReflectable.hpp:15

◆ CE_META_REFLECTABLE_CLASS_DEFINE

#define CE_META_REFLECTABLE_CLASS_DEFINE (   ...)
Value:
template<> CE_META_CLASS_DEFINE_BASE(__VA_ARGS__); \
template<> const ::CeresEngine::TypeInfo& ::CeresEngine::GetTypeInfo<__VA_ARGS__>::get() { \
static const TUserTypeInfo<__VA_ARGS__> typeInfo; \
return typeInfo; \
} \
CE_META_TYPE_AUTO_REGISTRATION(__VA_ARGS__); \
CE_META_REFLECTABLE_CLASS_BASE(__VA_ARGS__) \
void ::CeresEngine::TUserTypeInfo<__VA_ARGS__>::define(TUserTypeInfo& define)