35 const Function1s::unitConversions& defaultUnits,
36 const dictionary&
dict
39 if (
dict.found(
"units"))
41 autoPtr<Function1s::unitConversions> unitsPtr
43 new Function1s::unitConversions(defaultUnits)
45 unitsPtr->readIfPresent(
"units",
dict);
50 return autoPtr<Function1s::unitConversions>(
nullptr);
73 <<
"Cannot open file " << fName_ <<
nl
84 <<
"Table read from " << fName_ <<
" is empty" <<
nl
107 fName_(
dict.lookup(
"file")),
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.
virtual void write(Ostream &os, const Function1s::unitConversions &units, const List< Tuple2< scalar, Type >> &table, const word &valuesKeyword=word::null) const
Write additional information.
TableFileReader(const Function1s::unitConversions &defaultUnits, const dictionary &dict)
Construct from dictionary.
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.
const fileOperation & fileHandler()
Get current file handler.
errorManipArg< error, int > exit(error &err, const int errNo=1)
bool read(const char *, int32_t &)
const HashTable< unitConversion > & units()
Get the table of unit conversions.
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
HashTable< unitConversion > * unitsPtr_(nullptr)
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.