|
|
| 219 |
virtual bool DoParseValue (const std::string &value); |
219 |
virtual bool DoParseValue (const std::string &value); |
| 220 |
virtual std::string DoGetType (void) const; |
220 |
virtual std::string DoGetType (void) const; |
| 221 |
virtual std::string DoGetDefaultValue (void) const; |
221 |
virtual std::string DoGetDefaultValue (void) const; |
|
|
222 |
T RealMin (void) const; |
| 222 |
T m_defaultValue; |
223 |
T m_defaultValue; |
| 223 |
T m_minValue; |
224 |
T m_minValue; |
| 224 |
T m_maxValue; |
225 |
T m_maxValue; |
|
Lines 377-383
NumericDefaultValue<T>::NumericDefaultVa
|
Link Here
|
|---|
|
| 377 |
T defaultValue) |
378 |
T defaultValue) |
| 378 |
: DefaultValueBase (name, help), |
379 |
: DefaultValueBase (name, help), |
| 379 |
m_defaultValue (defaultValue), |
380 |
m_defaultValue (defaultValue), |
| 380 |
m_minValue (std::numeric_limits<T>::min ()), |
381 |
m_minValue (RealMin ()), |
| 381 |
m_maxValue (std::numeric_limits<T>::max ()), |
382 |
m_maxValue (std::numeric_limits<T>::max ()), |
| 382 |
m_value (defaultValue) |
383 |
m_value (defaultValue) |
| 383 |
{ |
384 |
{ |
|
Lines 469-474
NumericDefaultValue<T>::DoGetDefaultValu
|
Link Here
|
|---|
|
| 469 |
return oss.str (); |
470 |
return oss.str (); |
| 470 |
} |
471 |
} |
| 471 |
|
472 |
|
|
|
473 |
template <typename T> |
| 474 |
T |
| 475 |
NumericDefaultValue<T>::RealMin (void) const |
| 476 |
{ |
| 477 |
if (std::numeric_limits<T>::is_integer) |
| 478 |
{ |
| 479 |
return std::numeric_limits<T>::min (); |
| 480 |
} |
| 481 |
else |
| 482 |
{ |
| 483 |
return -std::numeric_limits<T>::max (); |
| 484 |
} |
| 485 |
} |
| 486 |
|
| 487 |
|
| 472 |
/************************************************************** |
488 |
/************************************************************** |
| 473 |
**************************************************************/ |
489 |
**************************************************************/ |
| 474 |
|
490 |
|