refl-cpp
refl::descriptor Namespace Reference

Contains the basic reflection primitives as well as functions operating on those primitives. More...

Classes

class  field_descriptor
 Represents a reflected field. More...
 
class  function_descriptor
 Represents a reflected function. More...
 
class  member_descriptor_base
 The base type for member descriptors. More...
 
class  type_descriptor
 Represents a reflected type. More...
 

Typedefs

template<typename T >
using declared_member_list = typename detail::declared_member_list< T >::type
 A type_list of the declared member descriptors of the target type T. More...
 
template<typename T >
using member_list = typename detail::member_list< T >::type
 A type_list of the declared and inherited member descriptors of the target type T. More...
 
template<typename FunctionDescriptor , typename... Args>
using result_type = typename FunctionDescriptor::template result_type< Args... >
 The return type when invoking the specified descriptor using the provided argument types. More...
 

Functions

template<typename Descriptor >
constexpr auto get_name (Descriptor d) noexcept
 Returns the full name of the descriptor. More...
 
template<typename Descriptor >
constexpr const auto & get_attributes (Descriptor d) noexcept
 Returns a const reference to the descriptor's attribute tuple. More...
 
template<typename Descriptor >
constexpr auto get_attribute_types (Descriptor d) noexcept
 Returns a type_list of the descriptor's attribute types. More...
 
template<typename TypeDescriptor >
constexpr auto get_declared_base_types (TypeDescriptor t) noexcept
 Returns a type_list of the declared base types of the type. More...
 
template<typename TypeDescriptor >
constexpr auto get_base_types (TypeDescriptor t) noexcept
 Returns a type_list of the declared and inherited base types of the type. More...
 
template<typename TypeDescriptor >
constexpr auto get_declared_members (TypeDescriptor t) noexcept
 Returns a type_list of the declared members of the type. More...
 
template<typename TypeDescriptor >
constexpr auto get_members (TypeDescriptor t) noexcept
 Returns a type_list of the declared and inherited members of the type. More...
 
template<typename MemberDescriptor >
constexpr auto get_declarator (MemberDescriptor d) noexcept
 Returns the type_descriptor of declaring type of the member. More...
 
template<typename MemberDescriptor >
constexpr auto get_pointer (MemberDescriptor d) noexcept
 Returns a pointer to the reflected field/function. More...
 
template<typename MemberDescriptor , typename... Args>
constexpr auto invoke (MemberDescriptor d, Args &&... args) noexcept -> decltype(d(std::forward< Args >(args)...))
 Invokes the member with the specified arguments. More...
 
template<typename FieldDescriptor >
constexpr auto is_static (FieldDescriptor d) noexcept
 Checks whether the field is declared as static. More...
 
template<typename FieldDescriptor >
constexpr auto is_const (FieldDescriptor d) noexcept
 Checks whether the value type of the field is const-qualified. More...
 
template<typename FunctionDescriptor >
constexpr auto is_resolved (FunctionDescriptor d) noexcept
 Checks whether the function pointer was automatically resolved. More...
 
template<typename Pointer , typename FunctionDescriptor >
constexpr auto can_resolve (FunctionDescriptor d) noexcept
 Checks whether the function pointer can be resolved as a pointer of the specified type. More...
 
template<typename Pointer , typename FunctionDescriptor >
constexpr auto resolve (FunctionDescriptor d) noexcept
 Resolves the function pointer as a pointer of the specified type. More...
 
template<typename Descriptor >
constexpr bool is_field (Descriptor) noexcept
 Checks whether T is a field descriptor. More...
 
template<typename Descriptor >
constexpr bool is_function (Descriptor) noexcept
 Checks whether T is a function descriptor. More...
 
template<typename Descriptor >
constexpr bool is_type (Descriptor) noexcept
 Checks whether T is a type descriptor. More...
 
template<typename A , typename Descriptor >
constexpr bool has_attribute (Descriptor) noexcept
 Checks whether T has an attribute of type A. More...
 
template<typename A , typename Descriptor >
constexpr const A & get_attribute (Descriptor d) noexcept
 Returns the value of the attribute A on T. More...
 
template<template< typename... > typename A, typename Descriptor >
constexpr const auto & get_attribute (Descriptor d) noexcept
 Returns the value of the attribute A on T. More...
 
template<typename MemberDescriptor >
constexpr bool is_property (MemberDescriptor d) noexcept
 Checks whether T is a member descriptor marked with the property attribute. More...
 
template<typename FunctionDescriptor >
constexpr attr::property get_property (FunctionDescriptor d) noexcept
 Gets the property attribute. More...
 
template<typename MemberDescriptor >
constexpr bool is_readable (MemberDescriptor) noexcept
 Checks if T is a 0-arg const-qualified member function with a property attribute or a field. More...
 
template<typename MemberDescriptor >
constexpr bool is_writable (const MemberDescriptor) noexcept
 Checks if T is a 1-arg non-const-qualified member function with a property attribute or a non-const field. More...
 
template<typename TypeDescriptor >
constexpr auto has_bases (TypeDescriptor t) noexcept
 Checks if a type has a bases attribute. More...
 
template<typename TypeDescriptor >
constexpr auto get_bases (TypeDescriptor t) noexcept
 Returns a list of the type_descriptor<T>s of the base types of the target, as specified by the bases<A, B, ...> attribute. More...
 
template<typename TypeDescriptor >
constexpr auto get_simple_name (TypeDescriptor t)
 Returns the unqualified name of the type, discarding the namespace and typenames (if a template type). More...
 
template<typename MemberDescriptor >
constexpr auto get_debug_name_const (MemberDescriptor d)
 Returns the debug name of T (In the form of 'declaring_type::member_name') as a const_string. More...
 
template<typename MemberDescriptor >
const char * get_debug_name (MemberDescriptor d)
 Returns the debug name of T. More...
 
template<typename Descriptor >
const char * get_display_name (Descriptor d) noexcept
 Returns the display name of T. More...
 

Detailed Description

Contains the basic reflection primitives as well as functions operating on those primitives.

Typedef Documentation

◆ declared_member_list

template<typename T >
using refl::descriptor::declared_member_list = typedef typename detail::declared_member_list<T>::type

A type_list of the declared member descriptors of the target type T.

◆ member_list

template<typename T >
using refl::descriptor::member_list = typedef typename detail::member_list<T>::type

A type_list of the declared and inherited member descriptors of the target type T.

◆ result_type

template<typename FunctionDescriptor , typename... Args>
using refl::descriptor::result_type = typedef typename FunctionDescriptor::template result_type<Args...>

The return type when invoking the specified descriptor using the provided argument types.

Argument coversion will be applied as per C++ rules.

Function Documentation

◆ can_resolve()

template<typename Pointer , typename FunctionDescriptor >
constexpr auto refl::descriptor::can_resolve ( FunctionDescriptor  d)
constexprnoexcept

Checks whether the function pointer can be resolved as a pointer of the specified type.

struct Foo {
void bar();
void bar(int);
};
REFL_AUTO(type(Foo), func(bar))
can_resolve<void(Foo::*)()>(get_t<0, member_list<Foo>>()) -> true
can_resolve<void(Foo::*)(int)>(get_t<0, member_list<Foo>>()) -> true
can_resolve<void(Foo::*)(std::string)>(get_t<0, member_list<Foo>>()) -> false

◆ get_attribute() [1/2]

template<typename A , typename Descriptor >
constexpr const A& refl::descriptor::get_attribute ( Descriptor  d)
constexprnoexcept

Returns the value of the attribute A on T.

REFL_AUTO(type(User), func(get_name, property()), func(set_name, property()))
get_attribute<attr::property>(get_t<0, member_list<User>>{}) -> property{ friendly_name = nullopt }

◆ get_attribute() [2/2]

template<template< typename... > typename A, typename Descriptor >
constexpr const auto& refl::descriptor::get_attribute ( Descriptor  d)
constexprnoexcept

Returns the value of the attribute A on T.

REFL_AUTO(type(Random, debug{ [](auto os, auto){ os << "[Random]"; } }))
get_attribute<attr::debug>(reflect<Random>()) -> instance of debug<LambdaType>

◆ get_attribute_types()

template<typename Descriptor >
constexpr auto refl::descriptor::get_attribute_types ( Descriptor  d)
constexprnoexcept

Returns a type_list of the descriptor's attribute types.

struct Foo {};
REFL_AUTO(type(Foo, bases<>, ns::serializable()))
get_attribute_types(reflect<Foo>()) -> type_list<attr::base_types<>, ns::serializable>

◆ get_attributes()

template<typename Descriptor >
constexpr const auto& refl::descriptor::get_attributes ( Descriptor  d)
constexprnoexcept

Returns a const reference to the descriptor's attribute tuple.

struct Foo {};
REFL_AUTO(type(Foo, bases<>, ns::serializable()))
get_attributes(reflect<Foo>()) -> const std::tuple<attr::base_types<>, ns::serializable>&

◆ get_base_types()

template<typename TypeDescriptor >
constexpr auto refl::descriptor::get_base_types ( TypeDescriptor  t)
constexprnoexcept

Returns a type_list of the declared and inherited base types of the type.

Combine with reflect_types to obtain type_descriptors for those types.

See also
reflect_types
struct Animal {};
REFL_AUTO(type(Animal))
struct Mammal : Animal {};
REFL_AUTO(type(Mammal, bases<Animal>))
struct Dog : Mammal {}:
REFL_AUTO(type(Dog, bases<Mammal>))
get_base_types(reflect<Dog>()) -> type_list<Mammal, Animal>

◆ get_bases()

template<typename TypeDescriptor >
constexpr auto refl::descriptor::get_bases ( TypeDescriptor  t)
constexprnoexcept

Returns a list of the type_descriptor<T>s of the base types of the target, as specified by the bases<A, B, ...> attribute.

Deprecated:
Use get_base_types in combination with reflect_types instead.
See also
refl::attr::bases
refl::descriptor::has_bases
REFL_AUTO(type(Dog, bases<Animal>))
get_bases(reflect<Dog>()) -> type_list<type_descriptor<Animal>>

◆ get_debug_name()

template<typename MemberDescriptor >
const char* refl::descriptor::get_debug_name ( MemberDescriptor  d)

Returns the debug name of T.

(In the form of 'declaring_type::member_name').

REFL_AUTO(type(Point), field(x), field(y))
get_debug_name(get_t<0, member_list<Point>>{}) -> "Point::x"

◆ get_debug_name_const()

template<typename MemberDescriptor >
constexpr auto refl::descriptor::get_debug_name_const ( MemberDescriptor  d)
constexpr

Returns the debug name of T (In the form of 'declaring_type::member_name') as a const_string.

REFL_AUTO(type(Point), field(x), field(y))
get_debug_name_const(get_t<0, member_list<Point>>{}) -> "Point::x"

◆ get_declarator()

template<typename MemberDescriptor >
constexpr auto refl::descriptor::get_declarator ( MemberDescriptor  d)
constexprnoexcept

Returns the type_descriptor of declaring type of the member.

struct Foo {
int bar;
};
REFL_AUTO(type(Foo), field(bar)
get_declarator(get_t<0, member_list<Foo>>()) -> type_descriptor<Foo>{}

◆ get_declared_base_types()

template<typename TypeDescriptor >
constexpr auto refl::descriptor::get_declared_base_types ( TypeDescriptor  t)
constexprnoexcept

Returns a type_list of the declared base types of the type.

Combine with reflect_types to obtain type_descriptors for those types.

See also
reflect_types
struct Animal {};
REFL_AUTO(type(Animal))
struct Mammal : Animal {};
REFL_AUTO(type(Mammal, bases<Animal>))
struct Dog : Mammal {}:
REFL_AUTO(type(Dog, bases<Mammal>))
get_base_types(reflect<Dog>()) -> type_list<Mammal>

◆ get_declared_members()

template<typename TypeDescriptor >
constexpr auto refl::descriptor::get_declared_members ( TypeDescriptor  t)
constexprnoexcept

Returns a type_list of the declared members of the type.

struct Base {
int val;
};
struct Foo : Base {
int bar, baz;
};
REFL_AUTO(type(Foo, bases<Base>), field(bar), field(baz))
get_declared_members(reflect<Foo>()) -> type_list<field_descriptor<Foo, 0> /bar/, field_descriptor<Foo, 1> /baz/>

◆ get_display_name()

template<typename Descriptor >
const char* refl::descriptor::get_display_name ( Descriptor  d)
noexcept

Returns the display name of T.

Uses the friendly_name of the property attribute, or the normalized name if no friendly_name was provided.

struct Foo {
int get_foo() const;
int GetFoo() const;
int get_non_const() /missing const/;
int get_custom() const;
};
REFL_AUTO(
type(Foo),
func(get_foo, property()),
func(GetFoo, property()),
func(get_non_const, property()),
func(get_custom, property("value")),
)
get_display_name(get_t<0, member_list<Foo>>{}) -> "foo"
get_display_name(get_t<1, member_list<Foo>>{}) -> "Foo"
get_display_name(get_t<2, member_list<Foo>>{}) -> "get_non_const"
get_display_name(get_t<3, member_list<Foo>>{}) -> "value"

◆ get_members()

template<typename TypeDescriptor >
constexpr auto refl::descriptor::get_members ( TypeDescriptor  t)
constexprnoexcept

Returns a type_list of the declared and inherited members of the type.

struct Base {
int val;
};
struct Foo : Base {
int bar, baz;
};
REFL_AUTO(type(Foo, bases<Base>), field(bar), field(baz))
get_members(reflect<Foo>()) -> type_list<field_descriptor<Foo, 0> /bar/, field_descriptor<Foo, 1> /baz/, field_descriptor<Base, 0> /val/>

◆ get_name()

template<typename Descriptor >
constexpr auto refl::descriptor::get_name ( Descriptor  d)
constexprnoexcept

Returns the full name of the descriptor.

namespace ns {
struct Foo {
int x;
};
}
REFL_AUTO(type(ns::Foo), field(x))
get_name(reflect<Foo>()) -> "ns::Foo"
get_name(get_t<0, member_list<Foo>>()) -> "x"

◆ get_pointer()

template<typename MemberDescriptor >
constexpr auto refl::descriptor::get_pointer ( MemberDescriptor  d)
constexprnoexcept

Returns a pointer to the reflected field/function.

When the member is a function, the return value might be nullptr if the type of the function pointer cannot be resolved.

See also
is_resolved
can_resolve
resolve
struct Foo {
int bar;
static int baz;
};
REFL_AUTO(type(Foo), field(bar), field(baz))
get_pointer(get_t<0, member_list<Foo>>()) -> (int Foo::*) &Foo::bar
get_pointer(get_t<1, member_list<Foo>>()) -> (int*) &Foo::baz

◆ get_property()

template<typename FunctionDescriptor >
constexpr attr::property refl::descriptor::get_property ( FunctionDescriptor  d)
constexprnoexcept

Gets the property attribute.

See also
refl::attr::property
refl::descriptor::is_property
REFL_AUTO(type(User), func(get_name, property("user_name")), func(set_name, property()))
*get_property(get_t<0, member_list<User>>{}).friendly_name -> "user_name"

◆ get_simple_name()

template<typename TypeDescriptor >
constexpr auto refl::descriptor::get_simple_name ( TypeDescriptor  t)
constexpr

Returns the unqualified name of the type, discarding the namespace and typenames (if a template type).

get_simple_name(reflect<std::vector<float>>()) -> "vector"

◆ has_attribute()

template<typename A , typename Descriptor >
constexpr bool refl::descriptor::has_attribute ( Descriptor  )
constexprnoexcept

Checks whether T has an attribute of type A.

Checks whether T has an attribute of that is a template instance of A.

REFL_AUTO(type(User), func(get_name, property()), func(set_name, property()))
has_attribute<attr::property>(get_t<0, member_list<User>>{}) -> true
REFL_AUTO(type(Random, debug{ [](auto os, auto){ os << "[Random]"; } }))
has_attribute<attr::debug>(reflect<Random>()) -> true

◆ has_bases()

template<typename TypeDescriptor >
constexpr auto refl::descriptor::has_bases ( TypeDescriptor  t)
constexprnoexcept

Checks if a type has a bases attribute.

Deprecated:
Use has_base_types in combination with reflect_types instead.
See also
refl::attr::bases
refl::descriptor::get_bases
REFL_AUTO(type(Dog, bases<Animal>))
has_bases(reflect<Dog>()) -> true

◆ invoke()

template<typename MemberDescriptor , typename... Args>
constexpr auto refl::descriptor::invoke ( MemberDescriptor  d,
Args &&...  args 
) -> decltype(d(std::forward<Args>(args)...))
constexprnoexcept

Invokes the member with the specified arguments.

struct Foo {
int bar = 1;
static int baz = 5;
void foobar(int x) { return x * 2; }
static void foobaz(int x) { return x * 3; }
};
REFL_AUTO(type(Foo), field(bar), field(baz), func(foobar), func(foobaz))
invoke(get_t<0, member_list<Foo>(), Foo()) -> 1 (Foo().bar)
invoke(get_t<1, member_list<Foo>>()) -> 5 (Foo::baz)
invoke(get_t<2, member_list<Foo>(), Foo(), 10) -> 20 (Foo().foobar())
invoke(get_t<3, member_list<Foo>>()) -> 30 (Foo::foobaz())

◆ is_const()

template<typename FieldDescriptor >
constexpr auto refl::descriptor::is_const ( FieldDescriptor  d)
constexprnoexcept

Checks whether the value type of the field is const-qualified.

struct Foo {
int bar;
const int baz;
};
REFL_AUTO(type(Foo), field(bar), field(baz))
is_const(get_t<0, member_list<Foo>>()) -> false
is_const(get_t<1, member_list<Foo>>()) -> true

◆ is_field()

template<typename Descriptor >
constexpr bool refl::descriptor::is_field ( Descriptor  )
constexprnoexcept

Checks whether T is a field descriptor.

See also
refl::descriptor::field_descriptor
REFL_AUTO(type(Foo), func(bar), field(baz))
is_function(get_t<0, member_list<Foo>>()) -> false
is_function(get_t<1, member_list<Foo>>()) -> true

◆ is_function()

template<typename Descriptor >
constexpr bool refl::descriptor::is_function ( Descriptor  )
constexprnoexcept

Checks whether T is a function descriptor.

See also
refl::descriptor::function_descriptor
REFL_AUTO(type(Foo), func(bar), field(baz))
is_function(get_t<0, member_list<Foo>>()) -> true
is_function(get_t<1, member_list<Foo>>()) -> false

◆ is_property()

template<typename MemberDescriptor >
constexpr bool refl::descriptor::is_property ( MemberDescriptor  d)
constexprnoexcept

Checks whether T is a member descriptor marked with the property attribute.

See also
refl::attr::property
refl::descriptor::get_property
REFL_AUTO(type(User), func(get_name, property("user_name")), func(set_name, property()))
is_property(get_t<0, member_list<User>>{}) -> true

◆ is_readable()

template<typename MemberDescriptor >
constexpr bool refl::descriptor::is_readable ( MemberDescriptor  )
constexprnoexcept

Checks if T is a 0-arg const-qualified member function with a property attribute or a field.

REFL_AUTO(type(User), func(get_name, property()), func(set_name, property()))
is_readable(get_t<0, member_list<User>>{}) -> true
is_readable(get_t<1, member_list<User>>{}) -> false

◆ is_resolved()

template<typename FunctionDescriptor >
constexpr auto refl::descriptor::is_resolved ( FunctionDescriptor  d)
constexprnoexcept

Checks whether the function pointer was automatically resolved.

struct Foo {
void bar();
void bar(int);
void baz();
};
REFL_AUTO(type(Foo), func(bar), func(baz))
is_resolved(get_t<0, member_list<Foo>>()) -> false
is_resolved(get_t<1, member_list<Foo>>()) -> true

◆ is_static()

template<typename FieldDescriptor >
constexpr auto refl::descriptor::is_static ( FieldDescriptor  d)
constexprnoexcept

Checks whether the field is declared as static.

struct Foo {
int bar;
static int baz;
};
REFL_AUTO(type(Foo), field(bar), field(baz))
is_static(get_t<0, member_list<Foo>>()) -> false
is_static(get_t<1, member_list<Foo>>()) -> true

◆ is_type()

template<typename Descriptor >
constexpr bool refl::descriptor::is_type ( Descriptor  )
constexprnoexcept

Checks whether T is a type descriptor.

See also
refl::descriptor::type_descriptor
REFL_AUTO(type(Foo))
is_type(reflect<Foo>>()) -> true

◆ is_writable()

template<typename MemberDescriptor >
constexpr bool refl::descriptor::is_writable ( const  MemberDescriptor)
constexprnoexcept

Checks if T is a 1-arg non-const-qualified member function with a property attribute or a non-const field.

struct User { std::string get_name() const; }
REFL_AUTO(type(User), func(get_name, property()), func(set_name, property()))
is_writable(get_t<0, member_list<User>>{}) -> false
is_writable(get_t<1, member_list<User>>{}) -> true

◆ resolve()

template<typename Pointer , typename FunctionDescriptor >
constexpr auto refl::descriptor::resolve ( FunctionDescriptor  d)
constexprnoexcept

Resolves the function pointer as a pointer of the specified type.

struct Foo {
void bar();
void bar(int);
};
REFL_AUTO(type(Foo), func(bar))
resolve<void(Foo::*)()>(get_t<0, member_list<Foo>>()) -> <&Foo::bar()>
resolve<void(Foo::*)(int)>(get_t<0, member_list<Foo>>()) -> <&Foo::bar(int)>
resolve<void(Foo::*)(std::string)>(get_t<0, member_list<Foo>>()) -> nullptr
refl::descriptor::get_debug_name
const char * get_debug_name(MemberDescriptor d)
Returns the debug name of T.
Definition: refl.hpp:3118
refl::descriptor::is_readable
constexpr bool is_readable(MemberDescriptor) noexcept
Checks if T is a 0-arg const-qualified member function with a property attribute or a field.
Definition: refl.hpp:2980
refl::descriptor::invoke
constexpr auto invoke(MemberDescriptor d, Args &&... args) noexcept -> decltype(d(std::forward< Args >(args)...))
Invokes the member with the specified arguments.
Definition: refl.hpp:2696
refl::descriptor::get_attributes
constexpr const auto & get_attributes(Descriptor d) noexcept
Returns a const reference to the descriptor's attribute tuple.
Definition: refl.hpp:2524
refl::descriptor::is_static
constexpr auto is_static(FieldDescriptor d) noexcept
Checks whether the field is declared as static.
Definition: refl.hpp:2715
refl::descriptor::get_attribute
constexpr const A & get_attribute(Descriptor d) noexcept
Returns the value of the attribute A on T.
Definition: refl.hpp:2904
refl::descriptor::get_bases
constexpr auto get_bases(TypeDescriptor t) noexcept
Returns a list of the type_descriptor<T>s of the base types of the target, as specified by the bases<...
Definition: refl.hpp:3064
refl::descriptor::get_declared_members
constexpr auto get_declared_members(TypeDescriptor t) noexcept
Returns a type_list of the declared members of the type.
Definition: refl.hpp:2608
refl::descriptor::is_resolved
constexpr auto is_resolved(FunctionDescriptor d) noexcept
Checks whether the function pointer was automatically resolved.
Definition: refl.hpp:2763
refl::descriptor::get_attribute_types
constexpr auto get_attribute_types(Descriptor d) noexcept
Returns a type_list of the descriptor's attribute types.
Definition: refl.hpp:2541
refl::descriptor::get_pointer
constexpr auto get_pointer(MemberDescriptor d) noexcept
Returns a pointer to the reflected field/function.
Definition: refl.hpp:2672
refl::descriptor::get_debug_name_const
constexpr auto get_debug_name_const(MemberDescriptor d)
Returns the debug name of T (In the form of 'declaring_type::member_name') as a const_string.
Definition: refl.hpp:3104
refl::descriptor::get_members
constexpr auto get_members(TypeDescriptor t) noexcept
Returns a type_list of the declared and inherited members of the type.
Definition: refl.hpp:2629
refl::trait::get_t
typename get< N, TypeList >::type get_t
The N-th type in the provided type_list.
Definition: refl.hpp:746
refl::descriptor::is_type
constexpr bool is_type(Descriptor) noexcept
Checks whether T is a type descriptor.
Definition: refl.hpp:2859
refl::descriptor::get_base_types
constexpr auto get_base_types(TypeDescriptor t) noexcept
Returns a type_list of the declared and inherited base types of the type.
Definition: refl.hpp:2587
refl::descriptor::has_bases
constexpr auto has_bases(TypeDescriptor t) noexcept
Checks if a type has a bases attribute.
Definition: refl.hpp:3044
refl::descriptor::member_list
typename detail::member_list< T >::type member_list
A type_list of the declared and inherited member descriptors of the target type T.
Definition: refl.hpp:2188
refl::descriptor::is_writable
constexpr bool is_writable(const MemberDescriptor) noexcept
Checks if T is a 1-arg non-const-qualified member function with a property attribute or a non-const f...
Definition: refl.hpp:3008
refl::reflect
constexpr type_descriptor< T > reflect() noexcept
Returns the type descriptor for the type T.
Definition: refl.hpp:3257
refl::descriptor::is_function
constexpr bool is_function(Descriptor) noexcept
Checks whether T is a function descriptor.
Definition: refl.hpp:2842
refl::descriptor::is_property
constexpr bool is_property(MemberDescriptor d) noexcept
Checks whether T is a member descriptor marked with the property attribute.
Definition: refl.hpp:2937
refl::descriptor::get_display_name
const char * get_display_name(Descriptor d) noexcept
Returns the display name of T.
Definition: refl.hpp:3226
refl::descriptor::has_attribute
constexpr bool has_attribute(Descriptor) noexcept
Checks whether T has an attribute of type A.
Definition: refl.hpp:2874
refl::runtime::debug
void debug(std::basic_ostream< CharT > &os, const T &value, bool compact=false)
refl::descriptor::get_property
constexpr attr::property get_property(FunctionDescriptor d) noexcept
Gets the property attribute.
Definition: refl.hpp:2955
refl::descriptor::get_name
constexpr auto get_name(Descriptor d) noexcept
Returns the full name of the descriptor.
Definition: refl.hpp:2507
refl::descriptor::get_simple_name
constexpr auto get_simple_name(TypeDescriptor t)
Returns the unqualified name of the type, discarding the namespace and typenames (if a template type)...
Definition: refl.hpp:3082
refl::descriptor::is_const
constexpr auto is_const(FieldDescriptor d) noexcept
Checks whether the value type of the field is const-qualified.
Definition: refl.hpp:2735
refl::descriptor::get_declarator
constexpr auto get_declarator(MemberDescriptor d) noexcept
Returns the type_descriptor of declaring type of the member.
Definition: refl.hpp:2647