32 std::initializer_list<unitConversion> l
68 const entry* entryPtr =
dict.lookupEntryPtr(keyword,
false,
true);
75 x.readIfPresent(keyword,
dict, is);
76 value.readIfPresent(keyword,
dict, is);
86 <<
"Optional entry '" << keyword <<
"' is not present,"
89 <<
"' will be used." <<
endl;
101 const word& typeName,
106 if (!
units.x.standard() || !
units.value.standard())
109 <<
"Unit conversions are not supported by "
131 is.readEnd(
"unitConversions");
133 is.check(
"Istream& operator>>(Istream&, unitConversions&)");
149 os.check(
"Ostream& operator<<(Ostream&, const unitConversions&)");
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Istream & readEnd(const char *funcName)
Istream & readBegin(const char *funcName)
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A list of keyword definitions, which are a keyword followed by any number of values (e....
static bool writeOptionalEntries
If true write optional keywords and values.
A keyword and a list of tokens is an 'entry'.
virtual ITstream & stream() const =0
Return token stream if this entry is a primitive entry.
void reset(const unitConversion &)
Reset the unit conversion.
A class for handling words, derived from string.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
#define IOInfoInFunction(ios)
Report an IO information message using Foam::Info.
Ostream & endl(Ostream &os)
Add newline and flush stream.
errorManip< error > abort(error &err)
const dimensionSet dimless
const HashTable< unitConversion > & units()
Get the table of unit conversions.
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
void assertNoConvertUnits(const word &typeName, const Function1s::unitConversions &units, const dictionary &dict)
Generate an error in an context where unit conversions are not supported.
bool readIfPresent(const word &keyword, const dictionary &)
Update if found in the dictionary.
autoPtr< unitConversions > clone() const
Construct a clone.
unitConversion value
Unit conversion for result values.
unitConversions(std::initializer_list< unitConversion >)
Construct from initialiser list.
unitConversion x
Unit conversion for x-axis values.