Go to the documentation of this file.
48 <<
" stream not open for reading essential object from file "
56 <<
" stream not open for reading from file "
77 headerClassName_ = headerDict.
get<
word>(
"class");
79 const word headerObject(headerDict.
get<
word>(
"object"));
84 <<
" object renamed from "
85 <<
name() <<
" to " << headerObject
86 <<
" for file " << is.
name() <<
endl;
92 labelByteSize_ =
sizeof(label);
93 scalarByteSize_ =
sizeof(scalar);
100 if (val) labelByteSize_ = val;
103 if (val) scalarByteSize_ = val;
112 <<
"First token could not be read or is not the keyword 'FoamFile'"
113 <<
nl <<
nl <<
"Check header is of the form:" <<
nl <<
endl;
130 <<
" stream failure while reading header"
132 <<
" of file " << is.
name()
133 <<
" for essential object" <<
name()
140 <<
"Stream failure while reading header"
142 <<
" of file " << is.
name() <<
endl;
int debug
Static debugging option.
#define SeriousIOErrorInFunction(ios)
Report an IO error message using Foam::SeriousError.
#define InfoInFunction
Report an information message using Foam::Info.
const word & name() const
Return name.
A class for handling words, derived from Foam::string.
streamFormat format() const noexcept
Get the current stream format.
Ostream & endl(Ostream &os)
Add newline and flush stream.
A token holds an item read from Istream.
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
bool isWord() const noexcept
Token is WORD or DIRECTIVE word.
bool readHeader(Istream &is)
Read header.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
messageStream Info
Information stream (uses stdout - output is on the master only)
void setLabelByteSize(unsigned nbytes)
Set the label byte-size associated with the stream.
virtual const fileName & name() const
Return the name of the stream.
versionNumber version() const noexcept
Get the stream version.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
void setScalarByteSize(unsigned nbytes)
Set the scalar byte-size associated with the stream.
const word & wordToken() const
Return const reference to the word contents.
errorManipArg< error, int > exit(error &err, const int errNo=1)
unsigned labelByteSize(const std::string &str)
Extract label size (in bytes) from "label=" tag in string.
label lineNumber() const
Const access to the current stream line number.
unsigned scalarByteSize(const std::string &str)
Extract scalar size (in bytes) from "scalar=" tag in string.
bool writeHeader(Ostream &os) const
Write header.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
#define IOWarningInFunction(ios)
Report an IO warning using Foam::Warning.
bool good() const
Return true if next operation might succeed.
bool readIfPresent(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX) const