Unravel Engine C++ Reference
Loading...
Searching...
No Matches
reflection.h File Reference
#include <entt/core/hashed_string.hpp>
#include <entt/meta/container.hpp>
#include <entt/meta/factory.hpp>
#include <entt/meta/meta.hpp>
#include <reflection/reflection_export.h>
#include <string>
#include <vector>
#include <functional>
#include <map>

Go to the source code of this file.

Namespaces

namespace  entt
 
namespace  refl_detail
 

Macros

#define CAT_IMPL_(a, b)
 
#define CAT_(a, b)
 
#define ANONYMOUS_VARIABLE(str)
 
#define REFLECT_EXTERN(cls)
 
#define REFLECT_INLINE(cls)
 
#define REFLECT(cls)
 
#define REFLECTION_REGISTRATION
 

Typedefs

using entt::attributes = std::map<std::string, meta_any>
 
using entt::attribute = attributes::value_type
 
using entt::property_predicate_t = std::function<bool(const meta_any&)>
 

Functions

auto entt::get_attribute (const meta_custom &custom, const char *name) -> const meta_any &
 
template<typename T >
auto entt::get_attribute_as (const meta_custom &custom, const char *name) -> T
 
template<>
auto entt::get_attribute_as< std::string > (const meta_custom &custom, const char *name) -> std::string
 
auto entt::get_attribute (const meta_type &t, const char *name) -> const meta_any &
 
template<typename T >
auto entt::get_attribute_as (const meta_type &t, const char *name) -> T
 
auto entt::get_attribute (const meta_data &prop, const char *name) -> const meta_any &
 
template<typename T >
auto entt::get_attribute_as (const meta_data &prop, const char *name) -> T
 
auto entt::copy_meta_any (const entt::meta_any &src) -> entt::meta_any
 
auto entt::get_derived_types (const meta_type &t) -> std::vector< meta_type >
 
auto entt::as_derived (meta_any &obj) -> bool
 
auto entt::get_derived_type (meta_any &obj) -> meta_type
 
auto entt::get_pretty_name (const meta_type &t) -> std::string
 
auto entt::get_name (const meta_type &t) -> std::string
 
auto entt::get_pretty_name (const meta_data &prop) -> std::string
 
auto entt::get_name (const meta_data &prop) -> std::string
 
auto entt::get_pretty_name (const meta_custom &t) -> std::string
 
auto entt::get_name (const meta_custom &t) -> std::string
 
auto entt::property_predicate (property_predicate_t predicate) -> property_predicate_t
 
template<typename Value , typename... Args>
auto entt::make_custom (Args &&...args) -> entt::meta_custom
 
template<typename T >
int refl_detail::get_reg (void(*f)())
 

Macro Definition Documentation

◆ ANONYMOUS_VARIABLE

#define ANONYMOUS_VARIABLE ( str)
Value:
CAT_(str, __LINE__)
#define CAT_(a, b)
Definition reflection.h:99

Definition at line 103 of file reflection.h.

◆ CAT_

#define CAT_ ( a,
b )
Value:
entt::handle b
entt::handle a
#define CAT_IMPL_(a, b)
Definition reflection.h:98

Definition at line 99 of file reflection.h.

◆ CAT_IMPL_

#define CAT_IMPL_ ( a,
b )
Value:
a##b

Definition at line 98 of file reflection.h.

◆ REFLECT

#define REFLECT ( cls)
Value:
template<> \
void reflection_auto_register_reflection_function_t<cls>()

Definition at line 133 of file reflection.h.

◆ REFLECT_EXTERN

#define REFLECT_EXTERN ( cls)
Value:
template<typename T> \
extern void reflection_auto_register_reflection_function_t(); \
template<> \
void reflection_auto_register_reflection_function_t<cls>(); \
static const int ANONYMOUS_VARIABLE(auto_register__) = \
refl_detail::get_reg<cls>(&reflection_auto_register_reflection_function_t<cls>)
#define ANONYMOUS_VARIABLE(str)
Definition reflection.h:103

Definition at line 120 of file reflection.h.

◆ REFLECT_INLINE

#define REFLECT_INLINE ( cls)
Value:
template<> \
inline void reflection_auto_register_reflection_function_t<cls>()
#define REFLECT_EXTERN(cls)
Definition reflection.h:120

Definition at line 128 of file reflection.h.

◆ REFLECTION_REGISTRATION

#define REFLECTION_REGISTRATION
Value:
static void reflection_auto_register_reflection_function_(); \
namespace \
{ \
struct reflection__auto__register__ \
{ \
reflection__auto__register__() \
{ \
reflection_auto_register_reflection_function_(); \
} \
}; \
} \
static const reflection__auto__register__ ANONYMOUS_VARIABLE(auto_register__); \
static void reflection_auto_register_reflection_function_()

Definition at line 137 of file reflection.h.