41 if (format ==
"ascii")
45 else if (format ==
"binary")
52 <<
"bad format specifier '" << format <<
"', using 'ascii'" 64 Switch sw(compression,
true);
70 else if (compression ==
"uncompressed")
74 else if (compression ==
"compressed")
81 <<
"bad compression specifier '" << compression
82 <<
"', using 'uncompressed'" 97 <<
"error in IOstream " <<
name() <<
" for operation " << operation
110 <<
"error in IOstream " <<
name() <<
" for operation " << operation
118 std::ostringstream os;
121 os << versionNumber_;
128 os <<
"IOstream: " <<
"Version " << version_ <<
", format ";
179 if (streamState == ios_base::goodbit)
181 os <<
"ios_base::goodbit set : the last operation on stream succeeded" 184 else if (streamState & ios_base::badbit)
186 os <<
"ios_base::badbit set : characters possibly lost" 189 else if (streamState & ios_base::failbit)
191 os <<
"ios_base::failbit set : some type of formatting error" 194 else if (streamState & ios_base::eofbit)
196 os <<
"ios_base::eofbit set : at end of stream" 221 os << vn.
str().c_str();
227 Foam::Ostream& Foam::operator<<(Ostream& os, const InfoProxy<IOstream>& ip)
bool valid() const
Return true if the Switch has a valid value.
static streamFormat formatEnum(const word &)
Return stream format of given format name.
static compressionType compressionEnum(const word &)
Return compression of given compression name.
A class for handling file names.
errorManipArg< error, int > exit(error &err, const int errNo=1)
bool bad() const
Return true if stream is corrupted.
virtual bool check(const char *operation) const
Check IOstream status for given operation.
Ostream & endl(Ostream &os)
Add newline and flush stream.
A simple wrapper around bool so that it can be read as a word: true/false, on/off, yes/no, y/n, t/f, or none/any.
word format(conversionProperties.lookup("format"))
label lineNumber() const
Return current stream line number.
IOstream & fixed(IOstream &io)
bool good() const
Return true if next operation might succeed.
A class for handling words, derived from string.
virtual const fileName & name() const
Return the name of the stream.
streamFormat
Enumeration for the format of data in the stream.
void fatalCheck(const char *operation) const
Check IOstream status for given operation.
bool eof() const
Return true if end of input seen.
compressionType
Enumeration for the format of data in the stream.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
bool opened() const
Return true if stream has been opened.
volScalarField sf(fieldObject, mesh)
bool fail() const
Return true if next operation will fail.
compressionType compression() const
Return the stream compression.
#define WarningInFunction
Report a warning using Foam::Warning.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
string str() const
Return the versionNumber as a character string.
Ostream & operator<<(Ostream &, const ensightPart &)
virtual void print(Ostream &) const
Print description of IOstream to Ostream.
A class for handling character strings derived from std::string.
bool closed() const
Return true if stream is closed.