Classes | |
class | argument |
The argument class is used for forwarding arguments to properties or methods. More... | |
struct | array_mapper |
The array_mapper class is a class template to access different array types via one common interface. More... | |
class | constructor |
The constructor class provides several meta information about a constructor and can be invoked. More... | |
class | destructor |
The destructor class provides a destructor for registered types. More... | |
class | enumeration |
The enumeration class provides several meta information about an enum. More... | |
class | instance |
The instance class is used for forwarding the instance of an object to invoke a property or method. More... | |
class | method |
The method class provides several meta information about a method and can be invoked. More... | |
class | parameter_info |
The parameter_info class provides several meta information about a parameter. More... | |
struct | policy |
The policy class contains all policies that can be used during the registration of reflection information. More... | |
class | property |
The property class provides several meta information about a property and gives read/write access to its value. More... | |
class | registration |
The registration class is the entry point for the manual registration of reflection information to the type system. More... | |
class | type |
The type class holds the type information for any arbitrary object. More... | |
class | variant |
The variant class allows to store data of any type and convert between these types transparently. More... | |
class | variant_array_view |
The variant_array_view describes a class that refers to an array inside a variant. More... | |
struct | wrapper_mapper |
The wrapper_mapper class is a class template to access different wrapper types via one common interface. More... | |
Enumerations | |
enum | access_levels { access_levels::public_access, access_levels::protected_access, access_levels::private_access } |
The access_levels enum represents the three access modifiers, which can be used in classes to encapsulate members access. More... | |
Functions | |
template<typename... TArgs> | |
detail::default_args< TArgs... > | default_arguments (TArgs &&...args) |
The default_arguments function should be used add default arguments, for constructors or a methods during the registration process of reflection information. More... | |
detail::metadata | metadata (variant key, variant value) |
The metadata function can be used to add additional meta data information during the registration process of reflection information. More... | |
template<typename... TArgs> | |
detail::parameter_names< detail::decay_t< TArgs >... > | parameter_names (TArgs &&...args) |
The parameter_names function should be used add human-readable names of the parameters, for constructors or a methods during the registration process of reflection information. More... | |
template<typename Target_Type , typename Source_Type > | |
Target_Type | rttr_cast (Source_Type object) |
Casts the given object of type Source_Type to an object of type Target_Type . More... | |
template<typename ClassType , typename ReturnType , typename... Args> | |
auto | select_const (ReturnType(ClassType::*func)(Args...) const) -> decltype(func) |
This is a helper function to register overloaded const member functions. More... | |
template<typename ClassType , typename ReturnType , typename... Args> | |
auto | select_non_const (ReturnType(ClassType::*func)(Args...)) -> decltype(func) |
This is a helper function to register overloaded const member functions. More... | |
template<typename Signature > | |
Signature * | select_overload (Signature *func) |
This is a helper function to register overloaded functions. More... | |
template<typename Signature , typename ClassType > | |
auto | select_overload (Signature(ClassType::*func)) -> decltype(func) |
This is a helper function to register overloaded member functions. More... | |
template<typename Enum_Type > | |
detail::enum_data< Enum_Type > | value (const char *name, Enum_Type value) |
The value function should be used to add a mapping from enum name to value during the registration process of reflection information. More... | |
Enumeration Type Documentation
|
strong |
The access_levels enum represents the three access modifiers, which can be used in classes to encapsulate members access.
In contrast to the three static type values in the registration class, represents this enum the return value to retrieve the access level at runtime.
Function Documentation
detail::default_args<TArgs...> rttr::default_arguments | ( | TArgs &&... | args | ) |
The default_arguments function should be used add default arguments, for constructors or a methods during the registration process of reflection information.
Use it in the ()
operator of the returned bind object.
The given arguments must match the signature from the starting position to the right most argument.
See following example code:
The metadata function can be used to add additional meta data information during the registration process of reflection information.
Use it in the ()
operator of the returned bind object.
detail::parameter_names<detail::decay_t<TArgs>...> rttr::parameter_names | ( | TArgs &&... | args | ) |
The parameter_names function should be used add human-readable names of the parameters, for constructors or a methods during the registration process of reflection information.
Use it in the ()
operator of the returned bind object.
The names must be provided as string literals (i.e. const char*) arguments.
See following example code:
- See also
- parameter_info
Target_Type rttr::rttr_cast | ( | Source_Type | object | ) |
Casts the given object
of type Source_Type
to an object of type Target_Type
.
When the given the given object
is an instance of type Target_Type
, then this function will cast the pointer to the TargetType
; otherwise it will return a nullptr
. If object
is already a nullptr
then it will also return a nullptr
.
- Remarks
- Both class types must contain the macro RTTR_ENABLE in the class declaration.
Source_Type
andTarget_Type
must be both pointer types.
- Returns
- A pointer of type
Target_Type
auto rttr::select_const | ( | ReturnType(ClassType::*)(Args...) const | func | ) | -> decltype(func) |
This is a helper function to register overloaded const member functions.
Use it like following:
- Remarks
- The method cannot be used with MSVC x86 compiler, because of the different calling convention for global- and member-functions. As workaround you have to explicitly cast to the member function pointer:
auto rttr::select_non_const | ( | ReturnType(ClassType::*)(Args...) | func | ) | -> decltype(func) |
This is a helper function to register overloaded const member functions.
Use it like following:
- Remarks
- The method cannot be used with MSVC x86 compiler, because of the different calling convention for global- and member-functions. As workaround you have to explicitly cast to the member function pointer:
Signature* rttr::select_overload | ( | Signature * | func | ) |
This is a helper function to register overloaded functions.
Use it like following:
- Remarks
- The method cannot be used with MSVC x86 compiler, because of the different calling convention for global- and member-functions. As workaround you have to explicitly cast to the function pointer:
auto rttr::select_overload | ( | Signature ClassType::* | func | ) | -> decltype(func) |
This is a helper function to register overloaded member functions.
Use it like following:
- Remarks
- The method cannot be used with MSVC x86 compiler, because of the different calling convention for global- and member-functions. As workaround you have to explicitly cast to the member function pointer:
detail::enum_data<Enum_Type> rttr::value | ( | const char * | name, |
Enum_Type | value | ||
) |
The value function should be used to add a mapping from enum name
to value
during the registration process of reflection information.
Use it in the ()
operator of the returned bind object.
- See also
- registration::enumeration