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

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

#include <CLArgs.hpp>

+ Inheritance diagram for CLArgs::DoubleRangeArg:
+ Collaboration diagram for CLArgs::DoubleRangeArg:

Public Member Functions

 DoubleRangeArg (const double *min=0, const double *max=0, bool inclusive=true)
 DoubleRangeArg (double default_val, const double *min=0, const double *max=0, bool inclusive=true)
bool value (const double &val)
const 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 argument constrained to a range of valid values.

Definition at line 302 of file CLArgs.hpp.


Constructor & Destructor Documentation

CLArgs::DoubleRangeArg::DoubleRangeArg ( const double *  min = 0,
const double *  max = 0,
bool  inclusive = true 
) [inline]

Definition at line 308 of file CLArgs.hpp.

            : mRange( min, max, inclusive )
        {
        }
CLArgs::DoubleRangeArg::DoubleRangeArg ( double  default_val,
const double *  min = 0,
const double *  max = 0,
bool  inclusive = true 
) [inline]

Definition at line 312 of file CLArgs.hpp.

            : DoubleArg( default_val ), mRange( min, max, inclusive )
        {
        }

Member Function Documentation

std::string CLArgs::DoubleRangeArg::desc_append ( ) const [inline, virtual]

Get optional additional info to print with flag description.

Reimplemented from CLArgs::ArgIBase.

Definition at line 321 of file CLArgs.hpp.

References CLArgs::DoubleRange::desc_append(), and mRange.

        {
            return mRange.desc_append();
        }
bool CLArgs::DoubleRangeArg::value ( const double &  val)

Definition at line 537 of file CLArgs.cpp.

References CLArgs::ArgTemplate< T >::value().

Referenced by main().

{
    if( !mRange.is_valid( val ) ) return false;
    return DoubleArg::value( val );
}
const double& CLArgs::DoubleRangeArg::value ( ) const [inline]

get value

Reimplemented from CLArgs::ArgTemplate< T >.

Definition at line 317 of file CLArgs.hpp.

        {
            return DoubleArg::value();
        }

Member Data Documentation

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