The registration class is the entry point for the manual registration of reflection information to the type system. More...
#include <registration.h>
Classes | |
class | bind |
The bind class is used to chain registration calls. More... | |
class | class_ |
The class_ is used to register classes to RTTR. More... | |
Static Public Member Functions | |
template<typename Enum_Type > | |
static bind< detail::enum_, detail::invalid_type, Enum_Type > | enumeration (string_view name) |
Register a global enumeration of type Enum_Type . More... | |
template<typename F > | |
static bind< detail::meth, detail::invalid_type, F, detail::public_access > | method (string_view name, F f) |
Register a method to this class. More... | |
template<typename A > | |
static bind< detail::prop, detail::invalid_type, A, detail::public_access > | property (string_view name, A acc) |
Register a global property with read write access. More... | |
template<typename A1 , typename A2 > | |
static bind< detail::prop, detail::invalid_type, A1, A2, detail::public_access > | property (string_view name, A1 getter, A2 setter) |
Register a property to this class. More... | |
template<typename A > | |
static bind< detail::prop_readonly, detail::invalid_type, A, detail::public_access > | property_readonly (string_view name, A acc) |
Register a global read only property. More... | |
Static Public Attributes | |
static const detail::private_access | private_access |
This variable can be used to specify during registration of a class member the access level: private . More... | |
static const detail::protected_access | protected_access |
This variable can be used to specify during registration of a class member the access level: protected . More... | |
static const detail::public_access | public_access |
This variable can be used to specify during registration of a class member the access level: public . More... | |
Detailed Description
The registration class is the entry point for the manual registration of reflection information to the type system.
It is possible to register constructors, properties, methods and enumerations.
See following example for a typical usage:
Put the RTTR_ENABLE() macro inside the class declaration, when you will inherit from this class, otherwise you can omit the macro.
Then in a cpp file, register the constructors, properties and methods of the class Mesh
.
- Remarks
- See the usage of
()
operator to add additional meta data, policies or enum values.
Member Function Documentation
|
static |
Register a global enumeration of type Enum_Type
.
- Parameters
-
name The name of the enumeration.
- Remarks
- The name of the enumeration has to be unique, otherwise it will not be registered.
- See also
- enumeration, type::get_enumeration()
- Returns
- A bind object, in order to chain more calls.
|
static |
Register a method to this class.
- Parameters
-
name The name of the method. function The function accessor to this method; this can be a member function, a function or a std::function.
- Remarks
- The method name does not have to be unique.
- See also
- method, type::get_global_method(), type::invoke()
- Returns
- A bind object, in order to chain more calls.
|
static |
Register a global property with read write access.
- Parameters
-
name The name of the property. acc The accessor to the property; a pointer to a variable.
- Remarks
- The name of the property has to be unique, otherwise it will not be registered.
- Returns
- A bind object, in order to chain more calls.
|
static |
Register a property to this class.
- Parameters
-
name The name of the property. getter The getter accessor to the property; this can be a pointer to a function or a std::function. setter The setter accessor to the property; this can be a pointer to a function or a std::function.
- Remarks
- The name of the property has to be unique, otherwise it will not be registered.
- Returns
- A bind object, in order to chain more calls.
|
static |
Register a global read only property.
- Parameters
-
name The name of the property. acc The accessor to the property; this can be a pointer to a variable, a pointer to a function or a std::function.
- Remarks
- The name of the property has to be unique, otherwise it will not be registered.
- Returns
- A bind object, in order to chain more calls.
Member Data Documentation
|
static |
This variable can be used to specify during registration of a class member the access level: private
.
See following example code:
- See also
- access_levels
|
static |
This variable can be used to specify during registration of a class member the access level: protected
.
See following example code:
- See also
- access_levels
|
static |
This variable can be used to specify during registration of a class member the access level: public
.
See following example code:
- See also
- access_levels
The documentation for this class was generated from the following file: