MOAB: Mesh Oriented datABase  (version 5.3.1)
CLArgs::IntListRangeArg Class Reference

Integer list argument constrained to a range of valid values. More...

#include <CLArgs.hpp>

+ Inheritance diagram for CLArgs::IntListRangeArg:
+ Collaboration diagram for CLArgs::IntListRangeArg:

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

Detailed Description

Integer list argument constrained to a range of valid values.

Definition at line 271 of file CLArgs.hpp.


Constructor & Destructor Documentation

CLArgs::IntListRangeArg::IntListRangeArg ( const int *  min = 0,
const int *  max = 0 
) [inline]

Definition at line 277 of file CLArgs.hpp.

: mRange( min, max ) {}

Member Function Documentation

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 486 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();
        }

Member Data Documentation

Definition at line 274 of file CLArgs.hpp.

Referenced by desc_append().

List of all members.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines