MOAB: Mesh Oriented datABase
(version 5.4.1)
|
Double list argument constrained to a range of valid values. More...
#include <CLArgs.hpp>
Public Member Functions | |
DoubleListRangeArg (const double *min=0, const double *max=0, bool inclusive=true) | |
bool | value (const std::vector< double > &val) |
const std::vector< double > & | value () const |
get value | |
std::string | desc_append () const |
Get optional additional info to print with flag description. | |
Private Attributes | |
DoubleRange | mRange |
Double list argument constrained to a range of valid values.
Definition at line 328 of file CLArgs.hpp.
CLArgs::DoubleListRangeArg::DoubleListRangeArg | ( | const double * | min = 0 , |
const double * | max = 0 , |
||
bool | inclusive = true |
||
) | [inline] |
Definition at line 334 of file CLArgs.hpp.
: mRange( min, max, inclusive ) { }
std::string CLArgs::DoubleListRangeArg::desc_append | ( | ) | const [inline, virtual] |
Get optional additional info to print with flag description.
Reimplemented from CLArgs::ArgIBase.
Definition at line 343 of file CLArgs.hpp.
References CLArgs::DoubleRange::desc_append(), and mRange.
{ return mRange.desc_append(); }
bool CLArgs::DoubleListRangeArg::value | ( | const std::vector< double > & | val | ) |
Definition at line 543 of file CLArgs.cpp.
References CLArgs::ArgListTemplate< T >::value().
{ for( std::vector< double >::const_iterator i = val.begin(); i != val.end(); ++i ) if( !mRange.is_valid( *i ) ) return false; return DoubleListArg::value( val ); }
const std::vector< double >& CLArgs::DoubleListRangeArg::value | ( | ) | const [inline] |
get value
Reimplemented from CLArgs::ArgListTemplate< T >.
Definition at line 339 of file CLArgs.hpp.
{ return DoubleListArg::value(); }
Definition at line 331 of file CLArgs.hpp.
Referenced by desc_append().