A simple wrapper around bool so that it can be read as a word: true/false, on/off, yes/no, y/n, t/f, or none/any.
More...
|
enum class | switchType : unsigned char {
False = 0
, True = 1
, off = 2
, on = 3
,
no = 4
, yes = 5
, n = 6
, y = 7
,
f = 8
, t = 9
, none = 10
, any = 11
,
invalid
} |
| The various text representations for a switch value. More...
|
|
A simple wrapper around bool so that it can be read as a word: true/false, on/off, yes/no, y/n, t/f, or none/any.
- Source files
-
Definition at line 60 of file Switch.H.
◆ switchType
The various text representations for a switch value.
These also correspond to the entries in names.
Enumerator |
---|
False | |
True | |
off | |
on | |
no | |
yes | |
n | |
y | |
f | |
t | |
none | |
any | |
invalid | |
Definition at line 68 of file Switch.H.
◆ Switch() [1/7]
◆ Switch() [2/7]
Construct from enumerated value.
Definition at line 134 of file Switch.H.
◆ Switch() [3/7]
◆ Switch() [4/7]
Construct from integer values (treats integer as bool value)
Definition at line 146 of file Switch.H.
References Foam::False.
◆ Switch() [5/7]
Switch |
( |
const std::string & |
str, |
|
|
const bool |
allowInvalid = false |
|
) |
| |
|
inline |
Construct from std::string, string, word.
Optionally allow bad words, and catch the error elsewhere
Definition at line 153 of file Switch.H.
◆ Switch() [6/7]
Switch |
( |
const char * |
str, |
|
|
const bool |
allowInvalid = false |
|
) |
| |
|
inline |
Construct from character array.
Optionally allow bad words, and catch the error elsewhere
Definition at line 160 of file Switch.H.
◆ Switch() [7/7]
◆ toInt()
◆ lookupOrAddToDict()
◆ valid()
◆ asText()
const char * asText |
( |
| ) |
const |
◆ readIfPresent()
◆ operator bool()
◆ operator=() [1/2]
Assignment to enumerated value.
Definition at line 199 of file Switch.H.
◆ operator=() [2/2]
void operator= |
( |
const bool |
b | ) |
|
|
inline |
◆ operator++
Increment the switchType counter.
Definition at line 96 of file Switch.H.
◆ operator>>
◆ operator<<
◆ nSwitchType
const unsigned char nSwitchType |
|
static |
Initial value:
Number of switchTypes.
Definition at line 86 of file Switch.H.
The documentation for this class was generated from the following files:
- src/OpenFOAM/primitives/bools/Switch/Switch.H
- src/OpenFOAM/primitives/bools/Switch/Switch.C
- src/OpenFOAM/primitives/bools/Switch/SwitchIO.C