47 #ifndef _MIRA_PROPERTYREFLECTOR_H_ 48 #define _MIRA_PROPERTYREFLECTOR_H_ 61 template <
typename Derived>
102 template<
typename T,
typename U>
109 template<
typename T,
typename U>
111 const char* comment,
const U& defaultValue,
117 template<
typename T,
typename U>
119 const char* comment,
const U& defaultValue,
130 this->
This()->pushObjectTrackingStore();
133 this->
This()->popObjectTrackingStore();
144 this->
This()->pushObjectTrackingStore();
147 this->
This()->popObjectTrackingStore();
158 this->
This()->pushObjectTrackingStore();
161 this->
This()->popObjectTrackingStore();
169 this->
This()->pushObjectTrackingStore();
172 this->
This()->popObjectTrackingStore();
175 template<
typename T,
typename U>
180 this->
This()->pushObjectTrackingStore();
183 this->
This()->popObjectTrackingStore();
189 template<
typename T,
typename U>
194 this->
This()->pushObjectTrackingStore();
197 this->
This()->popObjectTrackingStore();
200 template<
typename T,
typename U>
202 const char* comment,
const U& defaultValue,
206 this->
This()->pushObjectTrackingStore();
209 this->
This()->popObjectTrackingStore();
219 this->
This()->pushObjectTrackingStore();
223 this->
This()->popObjectTrackingStore();
237 this->
This()->pushObjectTrackingStore();
241 this->
This()->popObjectTrackingStore();
253 this->
This()->pushObjectTrackingStore();
256 this->
This()->popObjectTrackingStore();
262 this->
This()->pushObjectTrackingStore();
265 this->
This()->popObjectTrackingStore();
275 this->
This()->pushObjectTrackingStore();
278 this->
This()->popObjectTrackingStore();
285 this->
This()->pushObjectTrackingStore();
288 this->
This()->popObjectTrackingStore();
303 static_assert(
sizeof(T)==0,
"This method should never be called, since" 304 " the PropertyReflector and derived classes uses their own" 305 " invokePropertyMember mechanism to invoke the" 306 " reflector and bypasses the invokeMember() /" 307 " invokeMemberOverwrite() methods");
325 this->
This()->invokePropertyMemberOverwrite(member, meta, std::move(hint),
This object can use object tracking internally, but the object tracking system's state remains unchan...
Definition: ReflectControlFlags.h:82
void invokeMemberOverwrite(T &member, const ReflectMemberMeta &meta)
This method should never be called, since the PropertyReflector and derived classes uses their own in...
Definition: PropertyReflector.h:301
void member(const char *name, Getter< T > getter, Setter< T > setter, const char *comment, const U &defaultValue, ReflectCtrlFlags flags=REFLECT_CTRLFLAG_NONE)
Definition: PropertyReflector.h:118
void property(const char *name, T &member, const char *comment, const U &defaultValue, PropertyHint &&hint=PropertyHint(), ReflectCtrlFlags flags=REFLECT_CTRLFLAG_NONE)
Definition: PropertyReflector.h:176
specialize cv::DataType for our ImgPixel and inherit from cv::DataType<Vec>
Definition: IOService.h:67
void member(const char *name, const std::string &id, T &member, const char *comment, ReflectCtrlFlags flags=REFLECT_CTRLFLAG_NONE)
Definition: PropertyReflector.h:82
Setter< T > setter(void(*f)(const T &))
Creates a Setter for global or static class methods taking the argument by const reference.
Definition: GetterSetter.h:443
void delegate(Getter< T > getter, Setter< T > setter, ReflectCtrlFlags flags=REFLECT_CTRLFLAG_NONE)
Definition: PropertyReflector.h:282
Holds a boost::function object to a special setter function that must meet the signature "void method...
Definition: GetterSetter.h:395
void member(const char *name, T &member, const char *comment, ReflectCtrlFlags flags=REFLECT_CTRLFLAG_NONE)
Definition: PropertyReflector.h:75
Contains internal accessor class that abstracts from the underlying getter and setter classes or dire...
A property hint gives optional instructions to the property editor, i.e.
Definition: PropertyHint.h:82
Derived * This()
"Curiously recurring template pattern" (CRTP).
Definition: AbstractReflector.h:246
void delegate(const T &member, Setter< T > setter, ReflectCtrlFlags flags=REFLECT_CTRLFLAG_NONE)
Definition: PropertyReflector.h:272
boost::mpl::bool_< true > isReadOnly
Specifies, if the Reflector is read-only (true) or write-only (false).
Definition: ReflectorInterface.h:121
void member(const char *name, T &member, const char *comment, const U &defaultValue, ReflectCtrlFlags flags=REFLECT_CTRLFLAG_NONE)
Definition: PropertyReflector.h:103
void roproperty(const char *name, Getter< T > getter, const char *comment, PropertyHint &&hint=PropertyHint(), ReflectCtrlFlags flags=REFLECT_CTRLFLAG_NONE)
Definition: PropertyReflector.h:249
No flags.
Definition: ReflectControlFlags.h:65
void invokePropertyMember(T &member, const ReflectMemberMeta &meta, PropertyHint &&hint, bool isReadOnly, bool isVolatile)
Invokes the serializer.
Definition: PropertyReflector.h:321
void roproperty(const char *name, const T &member, const char *comment, PropertyHint &&hint=PropertyHint(), ReflectCtrlFlags flags=REFLECT_CTRLFLAG_NONE)
Definition: PropertyReflector.h:213
void property(const char *name, const T &member, Setter< T > setter, const char *comment, PropertyHint &&hint=PropertyHint(), ReflectCtrlFlags flags=REFLECT_CTRLFLAG_NONE)
Definition: PropertyReflector.h:154
Getter< T > getter(T(*f)())
Creates a Getter for global or static class methods returning the result by value.
Definition: GetterSetter.h:136
The RecursiveMemberReflectorBase is a base class for all Reflectors that are used to visit the reflec...
Definition: RecursiveMemberReflector.h:233
void member(const char *name, const T &member, Setter< T > setter, const char *comment, const U &defaultValue, ReflectCtrlFlags flags=REFLECT_CTRLFLAG_NONE)
Definition: PropertyReflector.h:110
This object is volatile: its memory location may become invalid to access.
Definition: ReflectControlFlags.h:90
void delegate(T &member, ReflectCtrlFlags flags=REFLECT_CTRLFLAG_NONE)
Definition: PropertyReflector.h:260
void property(const char *name, const std::string &id, T &member, const char *comment, PropertyHint &&hint=PropertyHint(), ReflectCtrlFlags flags=REFLECT_CTRLFLAG_NONE)
Definition: PropertyReflector.h:140
Holds a boost::function object to a special getter function that must meet the signature "T method()"...
Definition: GetterSetter.h:87
Base class for all Reflectors that take care of properties.
Definition: PropertyReflector.h:62
void invokeMemberOverwrite(T &member, const ReflectMemberMeta &meta)
The actual invokeMember implementation that is called from invokeMember().
Definition: RecursiveMemberReflector.h:665
ReflectCtrlFlags
Control Flags that can modify the behavior of certain reflectors.
Definition: ReflectControlFlags.h:63
void roproperty(const char *name, const std::string &id, const T &member, const char *comment, PropertyHint &&hint=PropertyHint(), ReflectCtrlFlags flags=REFLECT_CTRLFLAG_NONE)
Definition: PropertyReflector.h:231
"Null-Setter" tag-class where the AccessorSetterPart does nothing.
Definition: Accessor.h:198
void member(const char *name, const T &member, Setter< T > setter, const char *comment, ReflectCtrlFlags flags=REFLECT_CTRLFLAG_NONE)
Definition: PropertyReflector.h:89
Accessor< Getter, Setter > makeAccessor(const Getter &getter, const Setter &setter)
Helper method that creates an accessor from a different combination of either direct access to a vari...
Definition: Accessor.h:300
void property(const char *name, T &member, const char *comment, PropertyHint &&hint=PropertyHint(), ReflectCtrlFlags flags=REFLECT_CTRLFLAG_NONE)
Definition: PropertyReflector.h:126
void property(const char *name, Getter< T > getter, Setter< T > setter, const char *comment, const U &defaultValue, PropertyHint &&hint=PropertyHint(), ReflectCtrlFlags flags=REFLECT_CTRLFLAG_NONE)
Definition: PropertyReflector.h:201
void property(const char *name, const T &member, Setter< T > setter, const char *comment, const U &defaultValue, PropertyHint &&hint=PropertyHint(), ReflectCtrlFlags flags=REFLECT_CTRLFLAG_NONE)
Definition: PropertyReflector.h:190
void property(const char *name, Getter< T > getter, Setter< T > setter, const char *comment, PropertyHint &&hint=PropertyHint(), ReflectCtrlFlags flags=REFLECT_CTRLFLAG_NONE)
Definition: PropertyReflector.h:165
PropertyReflector()
Definition: PropertyReflector.h:68
When this flag is used in calls to Reflector::member(), that member is also reflected as read-only pr...
Definition: ReflectControlFlags.h:103
void invokePropertyMemberOverwrite(T &member, const ReflectMemberMeta &meta, PropertyHint &&hint, bool isReadOnly, bool isVolatile)
Is called by invokePropertyMember.
Definition: PropertyReflector.h:337
void member(const char *name, Getter< T > getter, Setter< T > setter, const char *comment, ReflectCtrlFlags flags=REFLECT_CTRLFLAG_NONE)
Definition: PropertyReflector.h:96