1 #if !defined(EDITABLEPARAMETER_H_INCLUDED_)
2 #define EDITABLEPARAMETER_H_INCLUDED_
6 #endif // _MSC_VER > 1000
8 #include "ConstrainedParameter.h"
16 const string & description,
25 const string & description,
30 const string & description,
38 const string & description,
46 const string & description,
58 double getIncrement()
const;
59 void setIncrement(
double increment);
61 double value,
double defaultValue,
double min,
double max,
double increment,
int type,
int key);
62 EditableParameter* set(
const string & name,
const string & description,
bool*value,
bool defaultValue,
int key=0);
63 EditableParameter* set(
const string & name,
const string & description,
int *value,
int defaultValue,
int min,
int max,
int increment,
int key=0);
64 EditableParameter* set(
const string & name,
const string & description,
float*value,
float defaultValue,
float min,
float max,
float increment,
int key=0);
65 EditableParameter* set(
const string & name,
const string & description,
double*value,
double defaultValue,
double min,
double max,
double increment,
int key=0);
80 _key = parameter._key;
81 _type = parameter._type;
82 _value = parameter._value;
83 _minimum = parameter._minimum;
84 _maximum = parameter._maximum;
85 _default = parameter._default;
86 _increment = parameter._increment;
90 inline double EditableParameter::getIncrement()
const
95 inline void EditableParameter::setIncrement(
double increment)
97 _increment = increment;
100 inline void EditableParameter::reset()
105 inline EditableParameter* EditableParameter::set(
const string & name,
const string & description,
double value,
106 double defaultValue,
double min,
double max,
double increment,
int type,
int key)
108 ConstrainedParameter::set(name,description,value,defaultValue,min,max,type,key);
109 _increment = increment;
113 inline EditableParameter* EditableParameter::set(
const string & name,
const string & description,
114 bool*value,
bool defaultValue,
int key)
116 ConstrainedParameter::set(name,description,value,defaultValue,key);
118 *value = defaultValue;
122 inline EditableParameter* EditableParameter::set(
const string & name,
const string & description,
123 int *value,
int defaultValue,
int min,
int max,
int increment,
int key)
125 ConstrainedParameter::set(name,description,value,defaultValue,min,max,key);
126 _increment = increment;
127 *value = defaultValue;
131 inline EditableParameter* EditableParameter::set(
const string & name,
const string & description,
132 float*value,
float defaultValue,
float min,
float max,
float increment,
int key)
134 ConstrainedParameter::set(name,description,value,defaultValue,min,max,key);
135 _increment = increment;
136 *value = defaultValue;
140 inline EditableParameter * EditableParameter::set(
const string & name,
const string & description,
141 double*value,
double defaultValue,
double min,
double max,
double increment,
int key)
143 ConstrainedParameter::set(name,description,value,defaultValue,min,max,key);
144 _increment = increment;
145 *value = defaultValue;
149 #endif // !defined(EDITABLEPARAMETER_H_INCLUDED_)