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 eof() const
Return true if end of input seen.
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)
string str() const
Return the versionNumber as a character string.
virtual void print(Ostream &) const
Print description of IOstream to Ostream.
virtual bool check(const char *operation) const
Check IOstream status for given operation.
bool good() const
Return true if next operation might succeed.
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.
word format(conversionProperties.lookup("format"))
IOstream & fixed(IOstream &io)
bool valid() const
Return true if the Switch has a valid value.
A class for handling words, derived from string.
streamFormat
Enumeration for the format of data in the stream.
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...
virtual const fileName & name() const
Return the name of the stream.
bool fail() const
Return true if next operation will fail.
volScalarField sf(fieldObject, mesh)
bool closed() const
Return true if stream is closed.
bool bad() const
Return true if stream is corrupted.
#define WarningInFunction
Report a warning using Foam::Warning.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
label lineNumber() const
Return current stream line number.
Ostream & operator<<(Ostream &, const ensightPart &)
compressionType compression() const
Return the stream compression.
A class for handling character strings derived from std::string.
void fatalCheck(const char *operation) const
Check IOstream status for given operation.
bool opened() const
Return true if stream has been opened.