33 return typeHeaderOk<IOobject>(
false);
47 if (rOpt_ == MUST_READ || rOpt_ == MUST_READ_IF_MODIFIED)
50 <<
" stream not open for reading essential object from file "
58 <<
" stream not open for reading from file "
81 headerClassName_ =
word(headerDict.
lookup(
"class"));
83 const word headerObject(headerDict.
lookup(
"object"));
84 if (IOobject::debug && headerObject !=
name())
87 <<
" object renamed from "
88 <<
name() <<
" to " << headerObject
89 <<
" for file " << is.
name() <<
endl;
100 <<
"First token could not be read "
101 "or is not the keyword 'FoamFile'"
102 <<
nl <<
nl <<
"Check header is of the form:" <<
nl <<
endl;
117 if (rOpt_ == MUST_READ || rOpt_ == MUST_READ_IF_MODIFIED)
120 <<
" stream failure while reading header"
122 <<
" of file " << is.
name()
123 <<
" for essential object" <<
name()
130 <<
"Stream failure while reading header"
132 <<
" of file " << is.
name() <<
endl;
bool headerOk()
Read header of local object without type-checking.
bool readHeader(Istream &)
Read header.
label lineNumber() const
Return current stream line number.
static const versionNumber currentVersion
Current version number.
streamFormat format() const
Return current stream format.
virtual const fileName & name() const
Return the name of the stream.
versionNumber version() const
Return the stream version.
bool good() const
Return true if next operation might succeed.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
A list of keyword definitions, which are a keyword followed by any number of values (e....
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T, if not found return the given default.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
bool readIfPresent(const word &, T &, bool recursive=false, bool patternMatch=true) const
Find an entry if present, and assign to T.
A token holds items read from Istream.
const word & wordToken() const
A class for handling words, derived from string.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
#define IOWarningInFunction(ios)
Report an IO warning using Foam::Warning.
#define SeriousIOErrorInFunction(ios)
Report an IO error message using Foam::SeriousError.
#define InfoInFunction
Report an information message using Foam::Info.
void writeHeader(std::ostream &, const bool isBinary, const std::string &title)
Write header.
errorManipArg< error, int > exit(error &err, const int errNo=1)
Ostream & endl(Ostream &os)
Add newline and flush stream.
word name(const bool)
Return a word representation of a bool.