FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

scalarRange Class Reference

A scalar range specifier. More...

#include <OpenFOAM/scalarRange.H>


Detailed Description

A scalar range specifier.

The range selector can be specified as an "LOWER:UPPER" range, as a "LOWER:" bound, as an ":UPPER" bound or simply as an "EXACT" value. The read constructor uses a colon (:) as a range marker and a comma (,) to delimit the next possible range selector.

Source files

Definition at line 63 of file scalarRange.H.

List of all members.

Public Member Functions

 scalarRange ()
 Construct Null.
 scalarRange (const scalar &lower, const scalar &upper)
 Construct a Range.
 scalarRange (Istream &)
 Construct from Istream.
bool  isDefined () const
 Is the range non-empty?
bool  isExact () const
 Is the range 'EXACT'?
scalar  value () const
 The value constituting an 'EXACT' match.
scalar  lower () const
 The lower limit.
scalar  upper () const
 The upper limit.
bool  selected (const scalar &) const
 Return true if the value is within the range.
bool  operator== (const scalarRange &) const
bool  operator!= (const scalarRange &) const

Static Public Attributes

static int  debug

Friends

Istream &  operator>> (Istream &, scalarRange &)
Ostream &  operator<< (Ostream &, const scalarRange &)

Constructor & Destructor Documentation

scalarRange (  )

Construct Null.

Definition at line 36 of file scalarRange.C.

scalarRange ( const scalar &   lower,
const scalar &   upper  
)

Construct a Range.

Definition at line 44 of file scalarRange.C.

scalarRange ( Istream &   is  )

Construct from Istream.

Since commas can be used as list delimiters, leading and trailing commas are ignored.

Definition at line 59 of file scalarRange.C.

References scalarRange::debug, Foam::endl(), and Foam::Info.


Member Function Documentation

bool isDefined (  ) const

Is the range non-empty?

Definition at line 76 of file scalarRange.C.

Referenced by scalarRanges::scalarRanges().

bool isExact (  ) const

Is the range 'EXACT'?

Definition at line 82 of file scalarRange.C.

Foam::scalar value (  ) const

The value constituting an 'EXACT' match.

or the values for 'UPPER' or 'LOWER' limits

Definition at line 88 of file scalarRange.C.

Foam::scalar lower (  ) const

The lower limit.

Definition at line 94 of file scalarRange.C.

Foam::scalar upper (  ) const

The upper limit.

Definition at line 106 of file scalarRange.C.

bool selected ( const scalar &   value  ) const

Return true if the value is within the range.

Definition at line 125 of file scalarRange.C.

bool operator== ( const scalarRange &   range  ) const

Definition at line 150 of file scalarRange.C.

bool operator!= ( const scalarRange &   range  ) const

Definition at line 166 of file scalarRange.C.

References Foam::operator==().


Friends And Related Function Documentation

Istream& operator>> ( Istream &   ,
scalarRange &    
) [friend]
Ostream& operator<< ( Ostream &   ,
const scalarRange &    
) [friend]

Member Data Documentation

int debug [static]

Definition at line 85 of file scalarRange.H.

Referenced by Foam::operator>>(), and scalarRange::scalarRange().


The documentation for this class was generated from the following files: