Unravel Engine C++ Reference
Loading...
Searching...
No Matches
inspector.h File Reference

Go to the source code of this file.

Classes

class  unravel::property_layout
 Manages ImGui layout for property inspection in the editor. More...
 
struct  unravel::var_info
 Metadata about a variable being inspected. More...
 
struct  unravel::inspect_result
 Result of an inspection operation indicating what changes occurred. More...
 
struct  unravel::meta_any_proxy
 Safe deferred property access proxy for arbitrary object properties. More...
 
struct  unravel::meta_any_proxy::meta_any_proxy_impl
 Implementation containing the deferred access functions. More...
 
struct  unravel::inspector
 Base class for type-specific property inspectors in the editor. More...
 

Namespaces

namespace  unravel
 

Macros

#define REFLECT_INSPECTOR_INLINE(inspector_type, inspected_type)
 Macro to register an inspector inline with its inspected type.
 
#define REFLECT_INSPECTOR(inspector_type, inspected_type)
 Macro to register an inspector with its inspected type.
 

Functions

auto unravel::make_proxy (entt::meta_any &var, const std::string &name={}) -> meta_any_proxy
 Creates a simple proxy for direct variable access.
 
auto unravel::make_property_proxy (const meta_any_proxy &var_proxy, const entt::meta_data &prop) -> meta_any_proxy
 
 unravel::REFLECT_INLINE (inspector)
 Reflection registration for the base inspector class.
 

Macro Definition Documentation

◆ REFLECT_INSPECTOR

#define REFLECT_INSPECTOR ( inspector_type,
inspected_type )
Value:
REFLECT(inspector_type) \
{ \
entt::meta_factory<inspector_type>{} \
.type(entt::hashed_string{#inspector_type}) \
.custom<entt::attributes>( \
entt::attributes{entt::attribute{"inspected_type", entt::resolve<inspected_type>()}}) \
.base<inspector>() \
.func<&inspector::create_and_register<inspector_type>>("create_and_register"_hs); \
}
attributes::value_type attribute
Definition reflection.h:19
std::map< std::string, meta_any > attributes
Definition reflection.h:18
#define REFLECT(cls)
Definition reflection.h:133

Macro to register an inspector with its inspected type.

Parameters
inspector_typeThe inspector class to register
inspected_typeThe type this inspector handles

Definition at line 326 of file inspector.h.

◆ REFLECT_INSPECTOR_INLINE

#define REFLECT_INSPECTOR_INLINE ( inspector_type,
inspected_type )
Value:
REFLECT_INLINE(inspector_type) \
{ \
entt::meta_factory<inspector_type>{} \
.type(entt::hashed_string{#inspector_type}) \
.custom<entt::attributes>( \
entt::attributes{entt::attribute{"inspected_type", entt::resolve<inspected_type>()}}) \
.base<inspector>() \
.func<&inspector::create_and_register<inspector_type>>("create_and_register"_hs); \
}
#define REFLECT_INLINE(cls)
Definition reflection.h:128

Macro to register an inspector inline with its inspected type.

Parameters
inspector_typeThe inspector class to registerb
inspected_typeThe type this inspector handles

Definition at line 310 of file inspector.h.