MOAB: Mesh Oriented datABase
(version 5.4.1)
|
Integer list argument constrained to a range of valid values. More...
#include <CLArgs.hpp>
Public Member Functions | |
IntListRangeArg (const int *min=0, const int *max=0) | |
bool | value (const std::vector< int > &val) |
const std::vector< int > & | value () const |
get value | |
std::string | desc_append () const |
Get optional additional info to print with flag description. | |
Private Attributes | |
IntRange | mRange |
Integer list argument constrained to a range of valid values.
Definition at line 271 of file CLArgs.hpp.
CLArgs::IntListRangeArg::IntListRangeArg | ( | const int * | min = 0 , |
const int * | max = 0 |
||
) | [inline] |
Definition at line 277 of file CLArgs.hpp.
: mRange( min, max ) {}
std::string CLArgs::IntListRangeArg::desc_append | ( | ) | const [inline, virtual] |
Get optional additional info to print with flag description.
Reimplemented from CLArgs::ArgIBase.
Definition at line 283 of file CLArgs.hpp.
References CLArgs::IntRange::desc_append(), and mRange.
{ return mRange.desc_append(); }
bool CLArgs::IntListRangeArg::value | ( | const std::vector< int > & | val | ) |
Definition at line 492 of file CLArgs.cpp.
References CLArgs::ArgListTemplate< T >::value().
{ for( std::vector< int >::const_iterator i = val.begin(); i != val.end(); ++i ) if( !mRange.is_valid( *i ) ) return false; return IntListArg::value( val ); }
const std::vector< int >& CLArgs::IntListRangeArg::value | ( | ) | const [inline] |
get value
Reimplemented from CLArgs::ArgListTemplate< T >.
Definition at line 279 of file CLArgs.hpp.
{ return IntListArg::value(); }
IntRange CLArgs::IntListRangeArg::mRange [private] |
Definition at line 274 of file CLArgs.hpp.
Referenced by desc_append().