MOAB: Mesh Oriented datABase
(version 5.4.1)
|
Integer argument constrained to a range of valid values. More...
#include <CLArgs.hpp>
Public Member Functions | |
IntRangeArg (const int *min=0, const int *max=0) | |
IntRangeArg (int default_val, const int *min, const int *max) | |
bool | value (const int &val) |
const int & | value () const |
get value | |
std::string | desc_append () const |
Get optional additional info to print with flag description. | |
Private Attributes | |
IntRange | mRange |
Integer argument constrained to a range of valid values.
Definition at line 251 of file CLArgs.hpp.
CLArgs::IntRangeArg::IntRangeArg | ( | const int * | min = 0 , |
const int * | max = 0 |
||
) | [inline] |
Definition at line 257 of file CLArgs.hpp.
: mRange( min, max ) {}
CLArgs::IntRangeArg::IntRangeArg | ( | int | default_val, |
const int * | min, | ||
const int * | max | ||
) | [inline] |
Definition at line 258 of file CLArgs.hpp.
std::string CLArgs::IntRangeArg::desc_append | ( | ) | const [inline, virtual] |
Get optional additional info to print with flag description.
Reimplemented from CLArgs::ArgIBase.
Definition at line 264 of file CLArgs.hpp.
References CLArgs::IntRange::desc_append(), and mRange.
{ return mRange.desc_append(); }
bool CLArgs::IntRangeArg::value | ( | const int & | val | ) |
Definition at line 486 of file CLArgs.cpp.
References CLArgs::ArgTemplate< T >::value().
Referenced by main().
{ if( !mRange.is_valid( val ) ) return false; return IntArg::value( val ); }
const int& CLArgs::IntRangeArg::value | ( | ) | const [inline] |
get value
Reimplemented from CLArgs::ArgTemplate< T >.
Definition at line 260 of file CLArgs.hpp.
{ return IntArg::value(); }
IntRange CLArgs::IntRangeArg::mRange [private] |
Definition at line 254 of file CLArgs.hpp.
Referenced by desc_append().