Scalar bounds to be used as a unary predicate. More...

Public Types | |
| typedef scalar | value_type |
| Type of values the range contains. More... | |
Public Member Functions | |
| constexpr | scalarRange () noexcept |
| Construct an empty (inverse, NONE) range - never matches. More... | |
| constexpr | scalarRange (const scalar val) noexcept |
| Construct an exact value matcher. More... | |
| scalarRange (const scalar minVal, const scalar maxVal) noexcept | |
| Construct a range from min-value to max-value. More... | |
| scalarRange (const MinMax< label > &range) noexcept | |
| Copy construct from a min/max range. More... | |
| scalarRange (const MinMax< scalar > &range) noexcept | |
| Copy construct from a min/max range. More... | |
| bool | empty () const noexcept |
| True if range is empty (eg, inverted, NONE) More... | |
| bool | good () const noexcept |
| True if range is non-empty. More... | |
| bool | single () const noexcept |
| True if the range bounds represent a single value. More... | |
| scalar | min () const noexcept |
| The min value of the range. More... | |
| scalar | max () const noexcept |
| The max value of the range. More... | |
| void | reset () noexcept |
| Reset to an empty (inverse, NONE) range. More... | |
| void | clear () noexcept |
| Same as reset() - reset to an empty (inverse, NONE) range. More... | |
| scalar | value () const |
| A representative (average) value for the range. More... | |
| bool | contains (const scalar val) const |
| True if the value is matched by the condition. More... | |
| bool | match (const scalar value) const |
| True if the value is matched by the condition. More... | |
| bool | operator() (const scalar value) const |
| For use as a predicate, same as contains(), match() More... | |
| constexpr bool | operator== (const scalarRange &rhs) const noexcept |
| constexpr bool | operator!= (const scalarRange &rhs) const noexcept |
| void | print (Ostream &os) const |
| Print information about the range. More... | |
| bool | valid () const noexcept |
| Same as good() or !empty() More... | |
Static Public Member Functions | |
| static bool | parse (const std::string &str, scalarRange &range) |
| Construct by parsing string content. More... | |
| static scalarRange | parse (const std::string &str) |
| Construct by parsing string content. More... | |
| static constexpr scalarRange | ge (const scalar minVal) noexcept |
| A greater-equals bound. More... | |
| static constexpr scalarRange | gt (const scalar minVal) noexcept |
| A greater-than bound. More... | |
| static constexpr scalarRange | ge0 () noexcept |
| A greater-equals zero bound. More... | |
| static constexpr scalarRange | gt0 () noexcept |
| A greater-than zero bound. More... | |
| static constexpr scalarRange | le (const scalar maxVal) noexcept |
| A less-equals bound. More... | |
| static constexpr scalarRange | lt (const scalar maxVal) noexcept |
| A less-than bound. More... | |
| static constexpr scalarRange | zero_one () noexcept |
| A greater-equals 0, less-equals 1 bound. More... | |
Static Public Attributes | |
| static const scalarRange | always |
| A range that always matches. More... | |
Friends | |
| Ostream & | operator<< (Ostream &os, const scalarRange &range) |
| Print information about the range. More... | |
Scalar bounds to be used as a unary predicate.
The bound can be specified as an "MIN:MAX" range, as a "MIN:" or ":MAX" bound or simply as a single "VALUE".
When defined via the parse() method, the special string "none" can be used to define an empty (inverse) range.
Definition at line 64 of file scalarRange.H.
| typedef scalar value_type |
Type of values the range contains.
Definition at line 117 of file scalarRange.H.
|
inlinenoexcept |
Construct an empty (inverse, NONE) range - never matches.
Definition at line 36 of file scalarRangeI.H.
|
inlineexplicitnoexcept |
Construct an exact value matcher.
Definition at line 42 of file scalarRangeI.H.
|
inlinenoexcept |
Construct a range from min-value to max-value.
Check validity of the range and sets to NONE or EQ if required.
Definition at line 49 of file scalarRangeI.H.
References Foam::equal(), and reset().

|
explicitnoexcept |
Copy construct from a min/max range.
Automatically decides if this is a GE_LE or NONE range
|
explicitnoexcept |
Copy construct from a min/max range.
Automatically decides if this is a GE_LE or NONE range
|
static |
Construct by parsing string content.
A colon (:) is used as a range marker or when specifying greater-than or less-than bounds.
|
static |
|
inlinestaticnoexcept |
A greater-equals bound.
Definition at line 68 of file scalarRangeI.H.
|
inlinestaticnoexcept |
A greater-than bound.
Definition at line 75 of file scalarRangeI.H.
|
inlinestaticnoexcept |
A greater-equals zero bound.
Definition at line 82 of file scalarRangeI.H.
|
inlinestaticnoexcept |
A greater-than zero bound.
Definition at line 89 of file scalarRangeI.H.
|
inlinestaticnoexcept |
A less-equals bound.
Definition at line 96 of file scalarRangeI.H.
|
inlinestaticnoexcept |
A less-than bound.
Definition at line 102 of file scalarRangeI.H.
|
inlinestaticnoexcept |
A greater-equals 0, less-equals 1 bound.
Definition at line 109 of file scalarRangeI.H.
|
inlinenoexcept |
True if range is empty (eg, inverted, NONE)
Definition at line 125 of file scalarRangeI.H.
|
inlinenoexcept |
True if range is non-empty.
Definition at line 131 of file scalarRangeI.H.
Referenced by scalarRange::valid().

|
inlinenoexcept |
True if the range bounds represent a single value.
Definition at line 137 of file scalarRangeI.H.
|
inlinenoexcept |
The min value of the range.
Definition at line 243 of file scalarRange.H.
|
inlinenoexcept |
The max value of the range.
Definition at line 248 of file scalarRange.H.
|
inlinenoexcept |
Reset to an empty (inverse, NONE) range.
Definition at line 117 of file scalarRangeI.H.
Referenced by scalarRange::clear().

|
inlinenoexcept |
Same as reset() - reset to an empty (inverse, NONE) range.
Definition at line 258 of file scalarRange.H.
References scalarRange::reset().

|
inline |
A representative (average) value for the range.
For GE, LE bounds it is the min/max value, respectively.
Definition at line 143 of file scalarRangeI.H.
Referenced by scalarRange::match(), and scalarRange::operator()().

|
inline |
True if the value is matched by the condition.
Definition at line 166 of file scalarRangeI.H.
References Foam::equal().
Referenced by scalarRange::match(), and scalarRange::operator()().


|
inline |
True if the value is matched by the condition.
Definition at line 276 of file scalarRange.H.
References scalarRange::contains(), and scalarRange::value().

|
inline |
For use as a predicate, same as contains(), match()
Definition at line 284 of file scalarRange.H.
References scalarRange::contains(), and scalarRange::value().

|
inlinenoexcept |
Definition at line 185 of file scalarRangeI.H.
References Foam::rhs().

|
inlinenoexcept |
Definition at line 192 of file scalarRangeI.H.
References Foam::rhs().

| void print | ( | Ostream & | os | ) | const |
Print information about the range.
|
inlinenoexcept |
Same as good() or !empty()
Definition at line 308 of file scalarRange.H.
References scalarRange::good().

|
friend |
Print information about the range.
|
static |
A range that always matches.
Definition at line 125 of file scalarRange.H.