refl-cpp
refl::descriptor::member_descriptor_base< T, N > Class Template Reference

The base type for member descriptors. More...

#include <refl.hpp>

Public Types

typedef T declaring_type
 An alias for the declaring type of the reflected member. More...
 
typedef member::member_type member_type
 An alias specifying the member type of member. More...
 
typedef trait::as_type_list_t< std::remove_cv_t< decltype(member::attributes)> > attribute_types
 An alias specifying the types of the attributes of the member. More...
 

Static Public Attributes

static constexpr type_descriptor< T > declarator { }
 The type_descriptor of the declaring type. More...
 
static constexpr auto name { member::name }
 The name of the reflected member. More...
 
static constexpr auto attributes { member::attributes }
 The attributes of the reflected member. More...
 

Protected Types

typedef refl::detail::member_info< T, N > member
 

Detailed Description

template<typename T, size_t N>
class refl::descriptor::member_descriptor_base< T, N >

The base type for member descriptors.

Member Typedef Documentation

◆ attribute_types

template<typename T , size_t N>
typedef trait::as_type_list_t<std::remove_cv_t<decltype(member::attributes)> > refl::descriptor::member_descriptor_base< T, N >::attribute_types

An alias specifying the types of the attributes of the member.

(Removes CV-qualifiers.)

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

◆ declaring_type

template<typename T , size_t N>
typedef T refl::descriptor::member_descriptor_base< T, N >::declaring_type

An alias for the declaring type of the reflected member.

struct Foo { const int* x; };
REFL_AUTO(type(Foo), field(x))
get_t<0, member_list<Foo>>::declaring_type -> Foo

◆ member

template<typename T , size_t N>
typedef refl::detail::member_info<T, N> refl::descriptor::member_descriptor_base< T, N >::member
protected

◆ member_type

template<typename T , size_t N>
typedef member::member_type refl::descriptor::member_descriptor_base< T, N >::member_type

An alias specifying the member type of member.

Member Data Documentation

◆ attributes

template<typename T , size_t N>
constexpr auto refl::descriptor::member_descriptor_base< T, N >::attributes { member::attributes }
staticconstexpr

The attributes of the reflected member.

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

◆ declarator

template<typename T , size_t N>
constexpr type_descriptor<T> refl::descriptor::member_descriptor_base< T, N >::declarator { }
staticconstexpr

The type_descriptor of the declaring type.

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

◆ name

template<typename T , size_t N>
constexpr auto refl::descriptor::member_descriptor_base< T, N >::name { member::name }
staticconstexpr

The name of the reflected member.

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"

The documentation for this class was generated from the following file:
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:2672
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:2689
refl::descriptor::member_descriptor_base::declaring_type
T declaring_type
An alias for the declaring type of the reflected member.
Definition: refl.hpp:2360
refl::trait::get_t
typename get< N, TypeList >::type get_t
The N-th type in the provided type_list.
Definition: refl.hpp:800
refl::reflect
constexpr type_descriptor< T > reflect() noexcept
Returns the type descriptor for the type T.
Definition: refl.hpp:3682
refl::descriptor::get_name
constexpr auto get_name(Descriptor d) noexcept
Returns the full name of the descriptor.
Definition: refl.hpp:2655
refl::descriptor::get_declarator
constexpr auto get_declarator(MemberDescriptor d) noexcept
Returns the type_descriptor of declaring type of the member.
Definition: refl.hpp:2795