31 template<
class Coordinate,
class Value>
35 const Function1s::unitSets& defaultUnits,
36 const dictionary&
dict
39 if (
dict.found(
"units"))
41 Function1s::unitSets units(defaultUnits);
42 units.read(
dict.lookup(
"units"));
44 autoPtr<Function1s::unitSets>
46 new Function1s::unitSets(units)
51 return autoPtr<Function1s::unitSets>(
nullptr);
56 template<
class Coordinate,
class Value>
74 <<
"Cannot open file " << fName_ <<
nl
85 <<
"Table read from " << fName_ <<
" is empty" <<
nl
100 template<
class Coordinate,
class Value>
113 template<
class Coordinate,
class Value>
124 ? new Function1s::unitSets(tfr.
unitsPtr_())
132 template<
class Coordinate,
class Value>
139 template<
class Coordinate,
class Value>
154 template<
class Coordinate,
class Value>
bool good() const
Return true if next operation might succeed.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Base class to read table data for tables.
virtual ~TableFileReader()
Destructor.
TableFileReader(const Function1s::unitSets &defaultUnits, const dictionary &dict)
Construct from dictionary.
virtual void write(Ostream &os, const Function1s::unitSets &units, const List< Tuple2< Coordinate, Value >> &table, const word &valuesKeyword=word::null) const
Write additional information.
Base class to read table data for tables.
A 2-tuple for storing two objects of different types.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
A class for handling file names.
string & expand(const bool allowEmpty=false)
Expand initial tildes and all occurrences of environment variables.
A class for handling words, derived from string.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
bool valid(const PtrList< ModelType > &l)
const HashTable< dimensionSet > table
Table of dimensions.
const unitSet & lookup(const word &unitName)
Lookup and return the named unit from the table.
const fileOperation & fileHandler()
Get current file handler.
errorManipArg< error, int > exit(error &err, const int errNo=1)
bool read(const char *, int32_t &)
HashTable< unitSet > * unitsPtr_(nullptr)
void writeEntry(Ostream &os, const word &key, const DimensionedFieldFunction< DimensionedFieldType > &f)
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
Struct containing two unitSets for use in converting both the argument and the value of a Function1.