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 "
78 headerDict.
get<
float>(
"version")
84 headerClassName_ = headerDict.
get<
word>(
"class");
86 const word headerObject(headerDict.
get<
word>(
"object"));
91 <<
" object renamed from "
92 <<
name() <<
" to " << headerObject
93 <<
" for file " << is.
name() <<
endl;
99 labelByteSize_ =
sizeof(
label);
100 scalarByteSize_ =
sizeof(scalar);
107 if (
val) labelByteSize_ =
val;
110 if (
val) scalarByteSize_ =
val;
119 <<
"First token could not be read or is not the keyword 'FoamFile'"
120 <<
nl <<
nl <<
"Check header is of the form:" <<
nl <<
endl;
137 <<
" stream failure while reading header"
139 <<
" of file " << is.
name()
140 <<
" for essential object" <<
name()
147 <<
"Stream failure while reading header"
149 <<
" 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.
label ListType::const_reference val
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 readHeader(Istream &is)
Read header.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Representation of a major/minor version number.
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,...
bool isWord() const
Token is WORD.
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