36 const word& entryName,
51 ITstream& is = eptr->stream();
52 if (is.peek().isWord())
57 dict.checkITstream(is, entryName);
59 else if (
dict.readIfPresent(
"file", fName_))
64 fileName expandedFile(fName_);
65 expandedFile.expand();
67 autoPtr<ISstream> isPtr(fileHandler().NewIFstream(expandedFile));
68 if (isPtr && isPtr->good())
70 *isPtr >> this->table_;
74 FatalIOErrorInFunction(dict)
75 <<
"Cannot open file: " << expandedFile << nl
76 << exit(FatalIOError);
85 dict.readEntry(
"values", this->table_);
116 os.writeEntry(
"values", this->table_);
120 os.writeEntry(
"file", fName_);
void initialise()
Check the table for size and consistency.
TableBase(const word &name, const dictionary &dict, const objectRegistry *obrPtr=nullptr)
Construct from dictionary - note table is not populated.
virtual void writeEntries(Ostream &os) const
Write keywords only in dictionary format.
List< Tuple2< scalar, Type > > table_
Table data.
Table(const word &entryName, const dictionary &dict, const objectRegistry *obrPtr=nullptr)
Construct from entry name, dictionary and optional registry.
virtual void writeData(Ostream &os) const
Write coefficients in dictionary format.
virtual void writeData(Ostream &os) const
Write in dictionary format.
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 a number of values (eg,...
A keyword and a list of tokens is an 'entry'.
virtual bool isStream() const noexcept
True if this entry is a stream.
Registry of regIOobjects.
A class for handling words, derived from Foam::string.
OBJstream os(runTime.globalPath()/outputName)