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
Write additional information.
TableFileReader(const Function1s::unitConversions &defaultUnits, const dictionary &dict)
Construct from dictionary.
Macros for creating standard TableReader-s.
virtual void write(Ostream &os, const Function1s::unitConversions &units, const List< Tuple2< scalar, Type >> &table) const
Write settings and values.
A 2-tuple for storing two objects of different types.
A list of keyword definitions, which are a keyword followed by any number of values (e....
A class for handling file names.
string & expand(const bool allowEmpty=false)
Expand initial tildes and all occurrences of environment variables.
#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.