register_reflection.h File Reference
#include "rttr/base/core_prerequisites.h"
#include "rttr/metadata.h"
#include "rttr/policy.h"
#include <string>
#include <vector>
#include "rttr/impl/register_reflection_impl.h"
Go to the source code of this file.
Classes | |
class | rttr::class_< ClassType > |
This class is used to register the constructors, properties, methods and enumeration for a certain class ClassType . More... | |
Namespaces | |
rttr | |
The namespace for all rttr components. | |
Macros | |
#define | RTTR_REGISTER |
Use this macro to automatically register your reflection information to RTTR before main is called. More... | |
#define | RTTR_REGISTER_FRIEND |
Place this macro inside a class, when you need to reflect properties or methods which are declared in private scope of the class. More... | |
Functions | |
template<typename T > | |
void | rttr::constructor_ (std::vector< rttr::metadata > data=std::vector< rttr::metadata >()) |
Register a constructor for a type T. More... | |
template<typename EnumType > | |
void | rttr::enumeration_ (std::vector< std::pair< std::string, EnumType > > enum_data, std::vector< rttr::metadata > data=std::vector< rttr::metadata >()) |
Register an enumeration of type EnumType . More... | |
template<typename F > | |
void | rttr::method_ (const std::string &name, F function) |
Register a free function. More... | |
template<typename F > | |
void | rttr::method_ (const std::string &name, F function, std::vector< rttr::metadata > data) |
Register a free function. More... | |
template<typename F , typename Policy > | |
void | rttr::method_ (const std::string &name, F function, const Policy &policy) |
Register a free function. More... | |
template<typename F , typename Policy > | |
void | rttr::method_ (const std::string &name, F function, std::vector< rttr::metadata > data, const Policy &policy) |
Register a free function. More... | |
template<typename A > | |
void | rttr::property_ (const std::string &name, A acc) |
Register a property with read and write access. More... | |
template<typename A > | |
void | rttr::property_ (const std::string &name, A acc, std::vector< rttr::metadata > data) |
Register a property with read and write access. More... | |
template<typename A , typename Policy > | |
void | rttr::property_ (const std::string &name, A acc, const Policy &policy,) |
Register a property with read and write access. More... | |
template<typename A , typename Policy > | |
void | rttr::property_ (const std::string &name, A acc, std::vector< rttr::metadata > data, const Policy &policy) |
Register a property with read and write access. More... | |
template<typename A1 , typename A2 > | |
void | rttr::property_ (const std::string &name, A1 getter, A2 setter,) |
Register a property with read and write access. More... | |
template<typename A1 , typename A2 > | |
void | rttr::property_ (const std::string &name, A1 getter, A2 setter, std::vector< rttr::metadata > data) |
Register a property with read and write access. More... | |
template<typename A1 , typename A2 , typename Policy > | |
void | rttr::property_ (const std::string &name, A1 getter, A2 setter, const Policy &policy) |
Register a property with read and write access. More... | |
template<typename A1 , typename A2 , typename Policy > | |
void | rttr::property_ (const std::string &name, A1 getter, A2 setter,) |
Register a property with read and write access. More... | |
template<typename A > | |
void | rttr::property_readonly_ (const std::string &name, A acc) |
Register a property with read only access. More... | |
template<typename A > | |
void | rttr::property_readonly_ (const std::string &name, A acc, std::vector< rttr::metadata > data) |
Register a property with read only access. More... | |
template<typename A , typename Policy > | |
void | rttr::property_readonly_ (const std::string &name, A acc, const Policy &policy) |
Register a property with read only access. More... | |
template<typename A , typename Policy > | |
void | rttr::property_readonly_ (const std::string &name, A acc, std::vector< rttr::metadata > data, const Policy &policy) |
Register a property with read only access. More... | |
Macro Definition Documentation
#define RTTR_REGISTER |
Use this macro to automatically register your reflection information to RTTR before main
is called.
Use it in following way:
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.
#define RTTR_REGISTER_FRIEND |
Place this macro inside a class, when you need to reflect properties or methods which are declared in private scope of the class.