Go to the documentation of this file.
145 Switch(
const std::string& str,
const bool allowInvalid=
false)
152 Switch(
const char* str,
const bool allowInvalid=
false)
166 const Switch& defaultValue =
false
176 const char*
asText()
const;
185 operator bool()
const
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
static switchType asEnum(const std::string &, const bool allowInvalid)
Return a switchType representation of a word.
A class for handling words, derived from string.
Switch()
Construct null as false.
friend Ostream & operator<<(Ostream &, const Switch &)
bool valid() const
Return true if the Switch has a valid value.
A class for handling character strings derived from std::string.
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Switch(const switchType sw)
Construct from enumerated value.
friend Istream & operator>>(Istream &, Switch &)
Ostream & operator<<(Ostream &, const edgeMesh &)
const Switch & operator=(const switchType sw)
Assignment from enumerated value.
A list of keyword definitions, which are a keyword followed by any number of values (e....
static const char * names[INVALID+1]
The set of names corresponding to the switchType enumeration.
const char * asText() const
Return a text representation of the Switch.
bool readIfPresent(const word &, const dictionary &)
Update the value of the Switch if it is found in the dictionary.
switchType
The various text representations for a switch value.
Switch(const bool b)
Construct from bool.
const Switch & operator=(const bool b)
Assignment from bool.
unsigned char switch_
The logic and enumerated text representation stored as a single byte.
Istream & operator>>(Istream &, edgeMesh &)
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Switch(const int i)
Construct from integer values (treats integer as bool value)
static Switch lookupOrAddToDict(const word &, dictionary &, const Switch &defaultValue=false)
Construct from dictionary, supplying default value so that if the.