47 #ifndef _MIRA_DEFAULTINITIALIZER_H_ 48 #define _MIRA_DEFAULTINITIALIZER_H_ 62 #define MIRA_INITIALIZE_THIS mira::DefaultInitializer::initialize(*this) 101 template <
typename T>
110 template<
typename T,
typename U>
112 const U& defaultValue,
114 initializeMember(
member,defaultValue);
117 template<
typename T,
typename U>
119 const char* comment,
const U& defaultValue,
121 initializeMember(
setter,defaultValue);
124 template<
typename T,
typename U>
126 const char* comment,
const U& defaultValue,
128 initializeMember(
setter,defaultValue);
131 template<
typename T,
typename U>
135 initializeMember(
member,defaultValue);
138 template<
typename T,
typename U>
140 const char* comment,
const U& defaultValue,
143 initializeMember(
setter,defaultValue);
146 template<
typename T,
typename U>
148 const char* comment,
const U& defaultValue,
151 initializeMember(
setter,defaultValue);
191 template<
typename T,
typename U>
192 void initializeMember(T&
member,
const U& defaultValue) {
204 void initializeMember(T&
member,
const serialization::IgnoreMissing&) {}
void property(const char *name, const std::string &id, T &member, const char *comment, PropertyHint &&hint=PropertyHint(), ReflectCtrlFlags flags=REFLECT_CTRLFLAG_NONE)
Definition: DefaultInitializer.h:176
void property(const char *name, const T &member, Setter< T > setter, const char *comment, PropertyHint &&hint=PropertyHint(), ReflectCtrlFlags flags=REFLECT_CTRLFLAG_NONE)
Definition: DefaultInitializer.h:180
specialize cv::DataType for our ImgPixel and inherit from cv::DataType<Vec>
Definition: IOService.h:67
Abstract base class for most Reflectors.
void member(const char *name, T &member, const char *comment, ReflectCtrlFlags flags=REFLECT_CTRLFLAG_NONE)
Definition: DefaultInitializer.h:160
void member(const char *name, Getter< T > getter, Setter< T > setter, const char *comment, ReflectCtrlFlags flags=REFLECT_CTRLFLAG_NONE)
Definition: DefaultInitializer.h:169
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
Holds a boost::function object to a special setter function that must meet the signature "void method...
Definition: GetterSetter.h:395
Marker for indicating parameters that should be ignored if they are missing in the config file...
void member(const char *name, const T &member, Setter< T > setter, const char *comment, ReflectCtrlFlags flags=REFLECT_CTRLFLAG_NONE)
Definition: DefaultInitializer.h:166
A property hint gives optional instructions to the property editor, i.e.
Definition: PropertyHint.h:82
void member(const char *name, Getter< T > getter, Setter< T > setter, const char *comment, const U &defaultValue, ReflectCtrlFlags flags=REFLECT_CTRLFLAG_NONE)
Definition: DefaultInitializer.h:125
Abstract base class for most Reflectors.
Definition: AbstractReflector.h:160
Reflector that visits the reflect method of objects in order to initialize them using the specified d...
Definition: DefaultInitializer.h:93
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: DefaultInitializer.h:147
No flags.
Definition: ReflectControlFlags.h:65
Getter< T > getter(T(*f)())
Creates a Getter for global or static class methods returning the result by value.
Definition: GetterSetter.h:136
static void initialize(T &object)
Invokes the reflector and initializes the members of 'object' with the specified default values...
Definition: DefaultInitializer.h:102
void member(const char *name, const T &member, Setter< T > setter, const char *comment, const U &defaultValue, ReflectCtrlFlags flags=REFLECT_CTRLFLAG_NONE)
Definition: DefaultInitializer.h:118
void property(const char *name, T &member, const char *comment, PropertyHint &&hint=PropertyHint(), ReflectCtrlFlags flags=REFLECT_CTRLFLAG_NONE)
Definition: DefaultInitializer.h:172
Holds a boost::function object to a special getter function that must meet the signature "T method()"...
Definition: GetterSetter.h:87
void property(const char *name, Getter< T > getter, Setter< T > setter, const char *comment, PropertyHint &&hint=PropertyHint(), ReflectCtrlFlags flags=REFLECT_CTRLFLAG_NONE)
Definition: DefaultInitializer.h:184
void member(const char *name, const std::string &id, T &member, const char *comment, ReflectCtrlFlags flags=REFLECT_CTRLFLAG_NONE)
Definition: DefaultInitializer.h:163
void property(const char *name, T &member, const char *comment, const U &defaultValue, PropertyHint &&hint=PropertyHint(), ReflectCtrlFlags flags=REFLECT_CTRLFLAG_NONE)
Definition: DefaultInitializer.h:132
ReflectCtrlFlags
Control Flags that can modify the behavior of certain reflectors.
Definition: ReflectControlFlags.h:63
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: DefaultInitializer.h:139
void member(const char *name, T &member, const char *comment, const U &defaultValue, ReflectCtrlFlags flags=REFLECT_CTRLFLAG_NONE)
Definition: DefaultInitializer.h:111
void invoke(T &object)
Invokes this reflector on the specified object.
Definition: AbstractReflector.h:259