OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

scalarRange Class Reference

A scalar range specifier. More...

Collaboration diagram for scalarRange:

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 &)

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 58 of file scalarRange.H.


Constructor & Destructor Documentation

scalarRange (  ) 

Construct Null.

Definition at line 28 of file scalarRange.C.

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

Construct a Range.

Definition at line 36 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 51 of file scalarRange.C.


Member Function Documentation

bool isDefined (  )  const

Is the range non-empty?

Definition at line 68 of file scalarRange.C.

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

Here is the call graph for this function:

bool isExact (  )  const

Is the range 'EXACT'?

Definition at line 74 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 80 of file scalarRange.C.

Foam::scalar lower (  )  const

The lower limit.

Definition at line 86 of file scalarRange.C.

Foam::scalar upper (  )  const

The upper limit.

Definition at line 98 of file scalarRange.C.

bool selected ( const scalar &  value  )  const

Return true if the value is within the range.

Definition at line 117 of file scalarRange.C.

bool operator== ( const scalarRange &  range  )  const

Definition at line 142 of file scalarRange.C.

bool operator!= ( const scalarRange &  range  )  const

Definition at line 158 of file scalarRange.C.


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 80 of file scalarRange.H.


The documentation for this class was generated from the following files:
Copyright © 2000-2009 OpenCFD Ltd