MOAB: Mesh Oriented datABase
(version 5.4.1)
|
Double argument constrained to a range of valid values. More...
#include <CLArgs.hpp>
Public Member Functions | |
DoubleRangeArg (const double *min=0, const double *max=0, bool inclusive=true) | |
DoubleRangeArg (double default_val, const double *min=0, const double *max=0, bool inclusive=true) | |
bool | value (const double &val) |
const double & | value () const |
get value | |
std::string | desc_append () const |
Get optional additional info to print with flag description. | |
Private Attributes | |
DoubleRange | mRange |
Double argument constrained to a range of valid values.
Definition at line 302 of file CLArgs.hpp.
CLArgs::DoubleRangeArg::DoubleRangeArg | ( | const double * | min = 0 , |
const double * | max = 0 , |
||
bool | inclusive = true |
||
) | [inline] |
Definition at line 308 of file CLArgs.hpp.
: mRange( min, max, inclusive ) { }
CLArgs::DoubleRangeArg::DoubleRangeArg | ( | double | default_val, |
const double * | min = 0 , |
||
const double * | max = 0 , |
||
bool | inclusive = true |
||
) | [inline] |
Definition at line 312 of file CLArgs.hpp.
std::string CLArgs::DoubleRangeArg::desc_append | ( | ) | const [inline, virtual] |
Get optional additional info to print with flag description.
Reimplemented from CLArgs::ArgIBase.
Definition at line 321 of file CLArgs.hpp.
References CLArgs::DoubleRange::desc_append(), and mRange.
{ return mRange.desc_append(); }
bool CLArgs::DoubleRangeArg::value | ( | const double & | val | ) |
Definition at line 537 of file CLArgs.cpp.
References CLArgs::ArgTemplate< T >::value().
Referenced by main().
{ if( !mRange.is_valid( val ) ) return false; return DoubleArg::value( val ); }
const double& CLArgs::DoubleRangeArg::value | ( | ) | const [inline] |
get value
Reimplemented from CLArgs::ArgTemplate< T >.
Definition at line 317 of file CLArgs.hpp.
{ return DoubleArg::value(); }
DoubleRange CLArgs::DoubleRangeArg::mRange [private] |
Definition at line 305 of file CLArgs.hpp.
Referenced by desc_append().