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

#include <CLArgs.hpp>

Public Member Functions

 IntRange (const int *min, const int *max)
bool is_valid (int val) const
std::string desc_append () const

Private Attributes

int mMin
int mMax

Detailed Description

Definition at line 239 of file CLArgs.hpp.


Constructor & Destructor Documentation

CLArgs::IntRange::IntRange ( const int *  min,
const int *  max 
)

Definition at line 469 of file CLArgs.cpp.

    : mMin( min ? *min : std::numeric_limits< int >::min() ), mMax( max ? *max : std::numeric_limits< int >::max() )
{
}

Member Function Documentation

std::string CLArgs::IntRange::desc_append ( ) const

Definition at line 479 of file CLArgs.cpp.

Referenced by CLArgs::IntRangeArg::desc_append(), and CLArgs::IntListRangeArg::desc_append().

{
    std::ostringstream ss;
    ss << "[" << mMin << "," << mMax << "]";
    return ss.str();
}
bool CLArgs::IntRange::is_valid ( int  val) const

Definition at line 474 of file CLArgs.cpp.

{
    return val >= mMin && val <= mMax;
}

Member Data Documentation

int CLArgs::IntRange::mMax [private]

Definition at line 242 of file CLArgs.hpp.

int CLArgs::IntRange::mMin [private]

Definition at line 242 of file CLArgs.hpp.

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