MOAB: Mesh Oriented datABase  (version 5.4.1)
CLArgs::DoubleListRangeArg Class Reference

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

#include <CLArgs.hpp>

+ Inheritance diagram for CLArgs::DoubleListRangeArg:
+ Collaboration diagram for CLArgs::DoubleListRangeArg:

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

Detailed Description

Double list argument constrained to a range of valid values.

Definition at line 328 of file CLArgs.hpp.


Constructor & Destructor Documentation

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 )
        {
        }

Member Function Documentation

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

Member Data Documentation

Definition at line 331 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