parametersettable.cpp
27 void setProperties( farsa::ConfigurationParameters& typeDescr, QString group, farsa::ParameterSettable::Properties props ) {
99 void ParameterSettable::createParamDescription( QString paramPath, QString traitName, QString traitValue ) {
103 ParameterSettable::Descriptor ParameterSettable::addTypeDescription( QString type, QString shortHelp, QString longHelp ) {
107 ParameterSettable::Descriptor::Descriptor( QString type, QString shortHelp, QString longHelp ) {
117 ParameterSettable::StringDescriptor ParameterSettable::Descriptor::describeString( QString parameter ) {
121 ParameterSettable::IntDescriptor ParameterSettable::Descriptor::describeInt( QString parameter ) {
125 ParameterSettable::RealDescriptor ParameterSettable::Descriptor::describeReal( QString parameter ) {
129 ParameterSettable::BoolDescriptor ParameterSettable::Descriptor::describeBool( QString parameter ) {
133 ParameterSettable::EnumDescriptor ParameterSettable::Descriptor::describeEnum( QString parameter ) {
137 ParameterSettable::ObjectDescriptor ParameterSettable::Descriptor::describeObject( QString parameter ) {
141 ParameterSettable::SubgroupDescriptor ParameterSettable::Descriptor::describeSubgroup( QString subgroup ) {
152 ParameterSettable::StringDescriptor& ParameterSettable::StringDescriptor::def( QString defaultValue ) {
157 ParameterSettable::StringDescriptor& ParameterSettable::StringDescriptor::props( Properties properties ) {
162 ParameterSettable::StringDescriptor& ParameterSettable::StringDescriptor::help( QString shortHelp, QString longHelp ) {
179 Factory::getTypeDescriptions().createParameter( paramPath, "default", QString::number(defaultValue) );
183 ParameterSettable::IntDescriptor& ParameterSettable::IntDescriptor::props( Properties properties ) {
188 ParameterSettable::IntDescriptor& ParameterSettable::IntDescriptor::limits( int lower_bound, int upper_bound ) {
199 ParameterSettable::IntDescriptor& ParameterSettable::IntDescriptor::help( QString shortHelp, QString longHelp ) {
215 ParameterSettable::RealDescriptor& ParameterSettable::RealDescriptor::def( double defaultValue ) {
216 Factory::getTypeDescriptions().createParameter( paramPath, "default", QString::number(defaultValue) );
220 ParameterSettable::RealDescriptor& ParameterSettable::RealDescriptor::props( Properties properties ) {
225 ParameterSettable::RealDescriptor& ParameterSettable::RealDescriptor::limits( double lower_bound, double upper_bound ) {
236 ParameterSettable::RealDescriptor& ParameterSettable::RealDescriptor::help( QString shortHelp, QString longHelp ) {
252 ParameterSettable::BoolDescriptor& ParameterSettable::BoolDescriptor::def( bool defaultValue ) {
253 Factory::getTypeDescriptions().createParameter( paramPath, "default", (defaultValue ? "true" : "false") );
257 ParameterSettable::BoolDescriptor& ParameterSettable::BoolDescriptor::props( Properties properties ) {
262 ParameterSettable::BoolDescriptor& ParameterSettable::BoolDescriptor::help( QString shortHelp, QString longHelp ) {
278 ParameterSettable::EnumDescriptor& ParameterSettable::EnumDescriptor::def( QString defaultValue ) {
283 ParameterSettable::EnumDescriptor& ParameterSettable::EnumDescriptor::props( Properties properties ) {
288 ParameterSettable::EnumDescriptor& ParameterSettable::EnumDescriptor::values( QStringList allValues ) {
293 ParameterSettable::EnumDescriptor& ParameterSettable::EnumDescriptor::help( QString shortHelp, QString longHelp ) {
309 ParameterSettable::ObjectDescriptor& ParameterSettable::ObjectDescriptor::props( Properties properties ) {
314 ParameterSettable::ObjectDescriptor& ParameterSettable::ObjectDescriptor::type( QString className ) {
319 ParameterSettable::ObjectDescriptor& ParameterSettable::ObjectDescriptor::help( QString shortHelp, QString longHelp ) {
333 ParameterSettable::SubgroupDescriptor& ParameterSettable::SubgroupDescriptor::props( Properties properties ) {
338 ParameterSettable::SubgroupDescriptor& ParameterSettable::SubgroupDescriptor::type( QString className ) {
344 ParameterSettable::SubgroupDescriptor& ParameterSettable::SubgroupDescriptor::help( QString shortHelp, QString longHelp ) {
353 ParameterSettable::StringDescriptor ParameterSettable::SubgroupDescriptor::describeString( QString parameter ) {
357 ParameterSettable::IntDescriptor ParameterSettable::SubgroupDescriptor::describeInt( QString parameter ) {
361 ParameterSettable::RealDescriptor ParameterSettable::SubgroupDescriptor::describeReal( QString parameter ) {
365 ParameterSettable::BoolDescriptor ParameterSettable::SubgroupDescriptor::describeBool( QString parameter ) {
369 ParameterSettable::EnumDescriptor ParameterSettable::SubgroupDescriptor::describeEnum( QString parameter ) {
373 ParameterSettable::ObjectDescriptor ParameterSettable::SubgroupDescriptor::describeObject( QString parameter ) {
377 ParameterSettable::SubgroupDescriptor ParameterSettable::SubgroupDescriptor::describeSubgroup( QString subgroup ) {
SubgroupDescriptor describeSubgroup(QString subgroup)
Add/Modify the description of a subgroup This method add (if there was no previous description of the...
Definition: parametersettable.cpp:141
EnumDescriptor & props(Properties properties)
set the Properties of this parameter (see Property documentation)
Definition: parametersettable.cpp:283
static QString fullSubgroupDescriptionPath(QString type, QString sub)
helper function for creating the full path to a subgroup description
Definition: parametersettable.cpp:90
BoolDescriptor(QString paramPath)
Add (if not exists) the description of a Boolean parameter.
Definition: parametersettable.cpp:245
EnumDescriptor & help(QString shortHelp, QString longHelp=QString(""))
Add a short help comment and a complete help comment.
Definition: parametersettable.cpp:293
static ConfigurationParameters & getTypeDescriptions()
Returns the only instance of the typeDescriptions object.
Definition: factory.cpp:34
IntDescriptor & limits(int lower_bound, int upper_bound)
set the lower and the upper bounds for the parameter's value If you don't want to limit the lower_bou...
Definition: parametersettable.cpp:188
Utility Class for customize the description of Enum-like parameter.
Definition: parametersettable.h:418
ObjectDescriptor & props(Properties properties)
set the Properties of this parameter (see Property documentation)
Definition: parametersettable.cpp:309
Utility Class for customize the description of an object parameter.
Definition: parametersettable.h:461
SubgroupDescriptor(QString paramPath)
Add (if not exists) the description of a subgroup parameter.
Definition: parametersettable.cpp:328
Utility Class for customize the description of String parameter.
Definition: parametersettable.h:223
EnumDescriptor describeEnum(QString parameter)
Add/Modify the description of a parameter which can take value from a fixed set of values This method...
Definition: parametersettable.cpp:369
IntDescriptor & props(Properties properties)
set the Properties of this parameter (see Property documentation)
Definition: parametersettable.cpp:183
StringDescriptor(QString paramPath)
Add (if not exists) the description of a String parameter.
Definition: parametersettable.cpp:145
virtual void onObjectDestruction(ParameterSettable *object)=0
called when the object is going to be destroyed
IntDescriptor(QString paramPath)
Add (if not exists) the description of a Int parameter.
Definition: parametersettable.cpp:171
ObjectDescriptor & help(QString shortHelp, QString longHelp=QString(""))
Add a short help comment and a complete help comment.
Definition: parametersettable.cpp:319
RealDescriptor describeReal(QString parameter)
Add/Modify the description of a real value parameter to this subgroup This method add (if there was n...
Definition: parametersettable.cpp:361
EnumDescriptor & def(QString defaultValue)
set the default value when the parameter is not present into the configuration
Definition: parametersettable.cpp:278
ObjectDescriptor & type(QString className)
set the class of the object (it includes also all subclasses)
Definition: parametersettable.cpp:314
Utility Class for customize the description of Real valued parameter.
Definition: parametersettable.h:312
static const double Infinity
Shortcut variable for indicate an infinity double number.
Definition: parametersettable.h:76
IntDescriptor describeInt(QString parameter)
Add/Modify the description of a int parameter This method add (if there was no previous description o...
Definition: parametersettable.cpp:121
virtual void onParameterChanges(ParameterSettable *object, QString paramName)=0
called when a runtime parameter changes its value
BoolDescriptor describeBool(QString parameter)
Add/Modify the description of a boolean parameter This method add (if there was no previous descripti...
Definition: parametersettable.cpp:129
void removeObserver(RuntimeParameterObserver *obs)
remove the RuntimeParameterObserver to this object
Definition: parametersettable.cpp:70
Definition: configurationhelper.cpp:24
The class containing configuration parameters.
Definition: configurationparameters.h:259
SubgroupDescriptor & props(Properties properties)
set the Properties of this parameter (see Property documentation)
Definition: parametersettable.cpp:333
BoolDescriptor & help(QString shortHelp, QString longHelp=QString(""))
Add a short help comment and a complete help comment.
Definition: parametersettable.cpp:262
static QString fullParameterDescriptionPath(QString type, QString param)
helper function for creating the full path to a parameter description
Definition: parametersettable.cpp:80
EnumDescriptor & values(QStringList allValues)
set all the possible values acceptable for this parameter
Definition: parametersettable.cpp:288
the interface for any observer who needs to be notified when a runtime parameter changes ...
Definition: runtimeparametersetters.h:33
means that the parameter accepts a list of values
Definition: parametersettable.h:64
RealDescriptor & props(Properties properties)
set the Properties of this parameter (see Property documentation)
Definition: parametersettable.cpp:220
EnumDescriptor(QString paramPath)
Add (if not exists) the description of a Enum-like parameter.
Definition: parametersettable.cpp:271
StringDescriptor describeString(QString parameter)
Add/Modify the description of a string parameter This method add (if there was no previous descriptio...
Definition: parametersettable.cpp:117
RealDescriptor & help(QString shortHelp, QString longHelp=QString(""))
Add a short help comment and a complete help comment.
Definition: parametersettable.cpp:236
Utility Class for customize the description of a subgroup.
Definition: parametersettable.h:487
SubgroupDescriptor & type(QString className)
the name of the class of the object corresponding to the subgroup (it includes also all subclasses) ...
Definition: parametersettable.cpp:338
BoolDescriptor & def(bool defaultValue)
set the default value when the parameter is not present into the configuration
Definition: parametersettable.cpp:252
Utility Class for describe the parameters of a ParameterSettable.
Definition: parametersettable.h:583
Descriptor(QString type, QString shortHelp, QString longHelp)
Add an entry for the type into the descriptions of all available types.
Definition: parametersettable.cpp:107
EnumDescriptor describeEnum(QString parameter)
Add/Modify the description of a parameter which can take value from a fixed set of values This method...
Definition: parametersettable.cpp:133
BoolDescriptor describeBool(QString parameter)
Add/Modify the description of a boolean parameter to this subgroup This method add (if there was no p...
Definition: parametersettable.cpp:365
StringDescriptor describeString(QString parameter)
Add/Modify the description of a string parameter to this subgroup This method add (if there was no pr...
Definition: parametersettable.cpp:353
StringDescriptor & def(QString defaultValue)
set the default value when the parameter is not present into the configuration
Definition: parametersettable.cpp:152
void createGroup(QString groupPath)
Create a group in the path specified.
Definition: configurationparameters.cpp:147
StringDescriptor & help(QString shortHelp, QString longHelp=QString(""))
Add a short help comment and a complete help comment.
Definition: parametersettable.cpp:162
Utility Class for customize the description of Integer parameter.
Definition: parametersettable.h:264
IntDescriptor & def(int defaultValue)
set the default value when the parameter is not present into the configuration
Definition: parametersettable.cpp:178
ObjectDescriptor describeObject(QString parameter)
Add/Modify the description of a object parameter This method add (if there was no previous descriptio...
Definition: parametersettable.cpp:137
BoolDescriptor & props(Properties properties)
set the Properties of this parameter (see Property documentation)
Definition: parametersettable.cpp:257
RealDescriptor & def(double defaultValue)
set the default value when the parameter is not present into the configuration
Definition: parametersettable.cpp:215
SubgroupDescriptor describeSubgroup(QString subgroup)
Add/Modify the description of a subgroup to this subgroup This method add (if there was no previous d...
Definition: parametersettable.cpp:377
void notifyChangesToParam(QString paramName)
notify observers about a changing to a runtime parameter
Definition: parametersettable.cpp:74
SubgroupDescriptor & help(QString shortHelp, QString longHelp=QString(""))
Add a short help comment and a complete help comment.
Definition: parametersettable.cpp:344
static const int MinInteger
Shortcut variable for indicate the minimum int value allowed.
Definition: parametersettable.h:80
ObjectDescriptor describeObject(QString parameter)
Add/Modify the description of a object parameter to this subgroup This method add (if there was no pr...
Definition: parametersettable.cpp:373
IntDescriptor & help(QString shortHelp, QString longHelp=QString(""))
Add a short help comment and a complete help comment.
Definition: parametersettable.cpp:199
static Descriptor addTypeDescription(QString type, QString shortHelp, QString longHelp=QString(""))
Add an entry for the type into the descriptions of all available types.
Definition: parametersettable.cpp:103
void addObserver(RuntimeParameterObserver *obs)
add a RuntimeParameterObserver to this object
Definition: parametersettable.cpp:64
RealDescriptor describeReal(QString parameter)
Add/Modify the description of a real value parameter This method add (if there was no previous descri...
Definition: parametersettable.cpp:125
static const int MaxInteger
Shortcut variable for indicate the maximum int value allowed.
Definition: parametersettable.h:78
ObjectDescriptor(QString paramPath)
Add (if not exists) the description of a object parameter.
Definition: parametersettable.cpp:302
means that more than one of this parameter can exists; there are numbered using the ':' syntax; i...
Definition: parametersettable.h:71
RealDescriptor(QString paramPath)
Add (if not exists) the description of a Real valued parameter.
Definition: parametersettable.cpp:208
Utility Class for customize the description of Boolean parameter.
Definition: parametersettable.h:377
StringDescriptor & props(Properties properties)
set the Properties of this parameter (see Property documentation)
Definition: parametersettable.cpp:157
void createParameter(QString groupPath, QString parameter)
Create a parameter in the group path specified.
Definition: configurationparameters.cpp:192
RealDescriptor & limits(double lower_bound, double upper_bound)
set the lower and the upper bounds for the parameter's value If you don't want to limit the lower_bou...
Definition: parametersettable.cpp:225
IntDescriptor describeInt(QString parameter)
Add/Modify the description of a int parameter to this subgroup This method add (if there was no previ...
Definition: parametersettable.cpp:357
if the parameter is mandatory
Definition: parametersettable.h:66