registration.h File Reference
#include "rttr/detail/base/core_prerequisites.h"
#include "rttr/policy.h"
#include "rttr/access_levels.h"
#include "rttr/detail/registration/bind_types.h"
#include "rttr/detail/registration/registration_executer.h"
#include "rttr/detail/default_arguments/default_arguments.h"
#include "rttr/detail/parameter_info/parameter_names.h"
#include "rttr/variant.h"
#include "rttr/detail/visitor/visitor_registration.h"
#include "rttr/detail/registration/registration_impl.h"
Go to the source code of this file.
Classes | |
class | rttr::registration::bind< T > |
The bind class is used to chain registration calls. More... | |
class | rttr::registration::class_< Class_Type, Visitor_List > |
The class_ is used to register classes to RTTR. More... | |
class | rttr::registration |
The registration class is the entry point for the manual registration of reflection information to the type system. More... | |
Namespaces | |
namespace | rttr |
Macros | |
#define | RTTR_PLUGIN_REGISTRATION |
Use this macro to automatically register your reflection information inside a plugin to RTTR. | |
#define | RTTR_REGISTRATION |
Use this macro to automatically register your reflection information to RTTR before main is called. | |
#define | RTTR_REGISTRATION_FRIEND |
Place this macro inside a class, when you need to reflect properties, methods or constructors which are declared in protected or private scope of the class. | |
Functions | |
template<typename... TArgs> | |
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. | |
detail::metadata | rttr::metadata (variant key, variant value) |
The metadata function can be used to add additional meta data information during the registration process of reflection information. | |
template<typename... TArgs> | |
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. | |
template<typename ClassType , typename ReturnType , typename... Args> | |
auto | rttr::select_const (ReturnType(ClassType::*func)(Args...) const noexcept) -> decltype(func) |
Overload with noexcept function type. | |
template<typename ClassType , typename ReturnType , typename... Args> | |
auto | rttr::select_const (ReturnType(ClassType::*func)(Args...) const) -> decltype(func) |
This is a helper function to register overloaded const member functions. | |
template<typename ClassType , typename ReturnType , typename... Args> | |
auto | rttr::select_non_const (ReturnType(ClassType::*func)(Args...) noexcept) -> decltype(func) |
Overload with noexcept function type. | |
template<typename ClassType , typename ReturnType , typename... Args> | |
auto | rttr::select_non_const (ReturnType(ClassType::*func)(Args...)) -> decltype(func) |
This is a helper function to register overloaded const member functions. | |
template<typename Signature > | |
Signature * | rttr::select_overload (Signature *func) |
This is a helper function to register overloaded functions. | |
template<typename Signature , typename ClassType > | |
auto | rttr::select_overload (Signature(ClassType::*func)) -> decltype(func) |
This is a helper function to register overloaded member functions. | |
template<typename Enum_Type > | |
detail::enum_data< Enum_Type > | rttr::value (string_view, 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. | |
Macro Definition Documentation
◆ RTTR_PLUGIN_REGISTRATION
#define RTTR_PLUGIN_REGISTRATION |
Use this macro to automatically register your reflection information inside a plugin to RTTR.
Use it in following way:
int some_method() { return 42; }
{
rttr::registration::method("some_method", &some_method);
}
static bind< detail::meth, detail::invalid_type, F, detail::public_access, Visitor_List > method(string_view name, F f)
Register a method to this class.
#define RTTR_PLUGIN_REGISTRATION
Use this macro to automatically register your reflection information inside a plugin to RTTR.
Definition registration.h:769
Just place the macro in global scope in a cpp file.
- Remarks
- It is not possible to place the macro multiple times in one cpp file. When you compile your plugin with the
gcc
toolchain, make sure you use the compiler option:-fno-gnu-unique
. otherwise the unregistration will not work properly.
- See also
- library
◆ RTTR_REGISTRATION
#define RTTR_REGISTRATION |
Use this macro to automatically register your reflection information to RTTR before main
is called.
Use it in following way:
{
rttr::registration::method("foo", &foo);
}
#define RTTR_REGISTRATION
Use this macro to automatically register your reflection information to RTTR before main is called.
Definition registration.h:745
Just place the macro in global scope in a cpp file.
- Remarks
- It is not possible to place the macro multiple times in one cpp file.
◆ RTTR_REGISTRATION_FRIEND
#define RTTR_REGISTRATION_FRIEND |
Place this macro inside a class, when you need to reflect properties, methods or constructors which are declared in protected
or private
scope of the class.
class Foo
{
private:
int m_value;
};
#define RTTR_REGISTRATION_FRIEND
Place this macro inside a class, when you need to reflect properties, methods or constructors which a...
Definition registration.h:793
{
.property("value", &Foo::m_value);
}
The class_ is used to register classes to RTTR.
Definition registration.h:130
bind< detail::prop, Class_Type, A, acc_level, Visitor_List > property(string_view name, A acc, acc_level level=acc_level())
Register a property to this class.
Generated on Fri Jan 26 2024 00:00:00 for rttr - 0.9.7 by doxygen.