registration_friend.h File Reference
#include "rttr/detail/base/core_prerequisites.h"
Go to the source code of this file.
Namespaces | |
namespace | rttr |
Macros | |
#define | RTTR_REGISTRATION_FRIEND |
When you have a class and the method or property is declared in private scope, then you can still register this item when you insert the macro: RTTR_REGISTRATION_FRIEND inside the class. | |
Macro Definition Documentation
◆ RTTR_REGISTRATION_FRIEND
#define RTTR_REGISTRATION_FRIEND |
When you have a class and the method or property is declared in private scope, then you can still register this item when you insert the macro: RTTR_REGISTRATION_FRIEND inside the class.
See following example code:
#include <rttr/registration_friend> // important!
class foo
{
private:
int value;
};
{
.property("value", &foo:value); // no compile error, because we use 'RTTR_REGISTRATION_FRIEND' inside 'foo'
}
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.
#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
#define RTTR_REGISTRATION
Use this macro to automatically register your reflection information to RTTR before main is called.
Definition registration.h:745
Generated on Fri Jan 26 2024 00:00:00 for rttr - 0.9.7 by doxygen.