refl-cpp
refl Namespace Reference

The top-level refl-cpp namespace It contains a few core refl-cpp namespaces and directly exposes core classes and functions. More...

Namespaces

 attr
 Contains the definitions of the built-in attributes.
 
 descriptor
 Contains the basic reflection primitives as well as functions operating on those primitives.
 
 member
 Contains tag types denoting the different types of reflectable members.
 
 runtime
 Contains utilities that can have runtime-overhead (like proxy, debug, invoke)
 
 trait
 Provides type-level operations for refl-cpp related use-cases.
 
 util
 Contains utility types and functions for working with those types.
 

Functions

template<typename T >
constexpr bool is_reflectable () noexcept
 Returns true if the type T is reflectable. More...
 
template<typename T >
constexpr bool is_reflectable (const T &) noexcept
 Returns true if the non-qualified type T is reflectable. More...
 
template<typename T >
constexpr type_descriptor< T > reflect () noexcept
 Returns the type descriptor for the type T. More...
 
template<typename T >
constexpr type_descriptor< T > reflect (const T &) noexcept
 Returns the type descriptor for the non-qualified type T. More...
 

Detailed Description

The top-level refl-cpp namespace It contains a few core refl-cpp namespaces and directly exposes core classes and functions.

  • util - utility functions (for_each, map_to_tuple, etc.)
  • trait - type-traits and other operations on types (is_function_v, map_t, etc.)
  • runtime - utility functions and classes that always have a runtime overhead (proxy<T>, debug_str, etc.)
  • member - contains the empty classes member and function (used for tagging)
  • descriptor - contains the non-specialized member types (type|field_descriptor<T, N>, and operations on them (get_property, get_display_name, etc.))

using util::type_list;
using descriptor::type_descriptor;
using descriptor::field_descriptor;
using descriptor::function_descriptor;
using util::const_string;
using util::make_const_string;

Function Documentation

◆ is_reflectable() [1/2]

template<typename T >
constexpr bool refl::is_reflectable ( )
noexcept

Returns true if the type T is reflectable.

◆ is_reflectable() [2/2]

template<typename T >
constexpr bool refl::is_reflectable ( const T &  )
noexcept

Returns true if the non-qualified type T is reflectable.

◆ reflect() [1/2]

template<typename T >
constexpr type_descriptor<T> refl::reflect ( )
noexcept

Returns the type descriptor for the type T.

◆ reflect() [2/2]

template<typename T >
constexpr type_descriptor<T> refl::reflect ( const T &  )
noexcept

Returns the type descriptor for the non-qualified type T.