8 template<
typename T>
class SettingChecker;
21 virtual void setValueString2(
const std::string& valueString,
bool check) = 0;
24 template <
typename POLICY>
29 typedef typename POLICY::Type
Type;
35 template <
typename T1>
41 template <
typename T1,
typename T2>
45 T1 extra1, T2 extra2);
82 virtual void tabCompletion(std::vector<std::string>& tokens)
const;
86 void setValue2(
Type newValue,
bool check);
87 virtual void setValueString2(
const std::string& valueString,
bool check);
91 const Type defaultValue;
105 template<
typename POLICY>
113 , value(initialValue), defaultValue(initialValue)
114 , restoreValue(initialValue)
119 template<
typename POLICY>
120 template<
typename T1>
128 , value(initialValue), defaultValue(initialValue)
129 , restoreValue(initialValue)
134 template<
typename POLICY>
135 template<
typename T1,
typename T2>
141 , POLICY(extra1, extra2)
143 , value(initialValue), defaultValue(initialValue)
144 , restoreValue(initialValue)
149 template<
typename POLICY>
155 template<
typename POLICY>
158 return POLICY::checkGetValue(value);
161 template<
typename POLICY>
164 changeValueString(POLICY::toString(newValue));
167 template<
typename POLICY>
171 POLICY::checkSetValue(newValue);
174 checker->check(*
this, newValue);
176 if (newValue != value) {
183 template<
typename POLICY>
186 return POLICY::checkGetValue(defaultValue);
189 template<
typename POLICY>
192 restoreValue = value;
195 template<
typename POLICY>
199 if (checker && checkNow) {
200 setValue2(getValue(),
true);
204 template<
typename POLICY>
207 return POLICY::getTypeString();
210 template<
typename POLICY>
213 return POLICY::toString(getValue());
216 template<
typename POLICY>
219 return POLICY::toString(getDefaultValue());
222 template<
typename POLICY>
225 return POLICY::toString(POLICY::checkGetValue(restoreValue));
228 template<
typename POLICY>
231 setValueString2(valueString,
true);
234 template<
typename POLICY>
240 template<
typename POLICY>
243 changeValue(restoreValue);
246 template<
typename POLICY>
249 return getValue() == getDefaultValue();
252 template<
typename POLICY>
255 POLICY::tabCompletion(tokens);
258 template<
typename POLICY>
261 POLICY::additionalInfo(result);