![]() |
|
Public Types | |
enum | streamAccess { OPENED, CLOSED } |
Enumeration for whether the stream open or closed. More... | |
enum | streamFormat { ASCII, BINARY } |
Enumeration for the format of data in the stream. More... | |
enum | compressionType { UNCOMPRESSED, COMPRESSED } |
Enumeration for the format of data in the stream. More... | |
Public Member Functions | |
IOstream (streamFormat format, versionNumber version, compressionType compression=UNCOMPRESSED) | |
Construct setting format and version. | |
virtual | ~IOstream () |
virtual const fileName & | name () const |
Return the name of the stream. | |
virtual fileName & | name () |
Return non-const access to the name of the stream. | |
virtual bool | check (const char *operation) const |
Check IOstream status for given operation. | |
void | fatalCheck (const char *operation) const |
Check IOstream status for given operation. | |
bool | opened () const |
Return true if stream has been opened. | |
bool | closed () const |
Return true if stream is closed. | |
bool | good () const |
Return true if next operation might succeed. | |
bool | eof () const |
Return true if end of input seen. | |
bool | fail () const |
Return true if next operation will fail. | |
bool | bad () const |
Return true if stream is corrupted. | |
operator void * () const | |
Return non-zero if the stream has not failed. | |
bool | operator! () const |
Return true if the stream has failed. | |
streamFormat | format () const |
Return current stream format. | |
versionNumber | version () const |
Return current stream version. | |
compressionType | compression () const |
Return current compression. | |
label | lineNumber () const |
Return current stream line number. | |
virtual ios::fmtflags | flags () const =0 |
Return flags of stream. | |
label & | lineNumber () |
Return current stream line number. | |
void | set (const streamFormat fmt) |
Set the stream format. | |
void | setFormat (const word &fmt) |
Set the stream format from word. | |
void | set (const versionNumber version) |
Reset stream version. | |
void | setVersion (const versionNumber version) |
Reset stream version. | |
void | setCompression (const compressionType compression) |
Reset stream compression. | |
void | setEof () |
Set stream to have reached eof. | |
void | setFail () |
Set stream to have failed. | |
void | setBad () |
Set stream to be bad. | |
virtual ios::fmtflags | flags (const ios::fmtflags f)=0 |
Set flags of stream. | |
ios::fmtflags | setf (const ios::fmtflags f) |
Set flags of stream. | |
ios::fmtflags | setf (const ios::fmtflags f, const ios::fmtflags mask) |
Set flags of given field of stream. | |
void | unsetf (const ios::fmtflags uf) |
Unset flags of stream. | |
virtual void | print (Ostream &) const |
Print description of IOstream to Ostream. | |
void | print (Ostream &, const int streamState) const |
Check given stream state bits. | |
InfoProxy< IOstream > | info () const |
Return info proxy. | |
Static Public Member Functions | |
streamFormat | format (const word &) |
Return stream format of given format name. | |
compressionType | compression (const word &) |
Return compression of given compression name. | |
unsigned int | defaultPrecision () |
Return the default precision. | |
unsigned int | defaultPrecision (unsigned int p) |
Reset the default precision (and return old precision). | |
Static Public Attributes | |
const versionNumber | originalVersion |
Original version number. | |
const versionNumber | currentVersion |
Current version number. | |
unsigned int | precision_ |
Default precision. | |
Protected Member Functions | |
void | setOpened () |
Set stream opened. | |
void | setClosed () |
Set stream closed. | |
void | setState (ios::iostate state) |
Set stream state. | |
void | setGood () |
Set stream to be good. | |
Protected Attributes | |
label | lineNumber_ |
Friends | |
Ostream & | operator<< (Ostream &os, const streamFormat &sf) |
Ostream operator. |
|
Enumeration for the format of data in the stream.
Definition at line 206 of file IOstream.H. |
|
Enumeration for whether the stream open or closed.
Definition at line 92 of file IOstream.H. |
|
Enumeration for the format of data in the stream.
Definition at line 99 of file IOstream.H. |
|
Construct setting format and version.
Definition at line 282 of file IOstream.H. |
|
Definition at line 301 of file IOstream.H. |
|
Return true if stream is corrupted.
Definition at line 373 of file IOstream.H. |
|
Check IOstream status for given operation. print IOstream state if error has occured Referenced by pyramid::pyramid(). |
|
Return true if stream is closed.
Definition at line 349 of file IOstream.H. |
|
Return current compression.
Definition at line 414 of file IOstream.H. References Foam::label. |
|
Return compression of given compression name.
|
|
Reset the default precision (and return old precision).
Definition at line 444 of file IOstream.H. |
|
Return the default precision.
Definition at line 438 of file IOstream.H. |
|
Return true if end of input seen.
Definition at line 361 of file IOstream.H. Referenced by gaussGrad::gaussGrad(), and laplacianScheme::laplacianScheme(). |
|
Return true if next operation will fail.
Definition at line 367 of file IOstream.H. |
|
Check IOstream status for given operation. print IOstream state if error has occured and exit |
|
Set flags of stream.
|
|
Return flags of stream.
Implemented in IPstream, OPstream, ISstream, OSstream, and ITstream. |
|
Return current stream format.
Definition at line 399 of file IOstream.H. |
|
Return stream format of given format name.
|
|
Return true if next operation might succeed.
Definition at line 355 of file IOstream.H. |
|
Return info proxy. Used to print IOstream information to a stream Reimplemented in primitiveEntry. Definition at line 540 of file IOstream.H. |
|
Return current stream line number.
Definition at line 432 of file IOstream.H. |
|
Return current stream line number.
Definition at line 420 of file IOstream.H. |
|
Return non-const access to the name of the stream. Useful to alter the stream name Reimplemented in primitiveEntry, IFstream, OFstream, ISstream, OSstream, and ITstream. Definition at line 322 of file IOstream.H. |
|
Return the name of the stream. Useful for Fstream to return the filename Reimplemented in primitiveEntry, IFstream, OFstream, ISstream, OSstream, and ITstream. Definition at line 313 of file IOstream.H. |
|
Return true if stream has been opened.
Definition at line 343 of file IOstream.H. |
|
Return non-zero if the stream has not failed.
Definition at line 379 of file IOstream.H. |
|
Return true if the stream has failed.
Definition at line 387 of file IOstream.H. |
|
Check given stream state bits.
|
|
Print description of IOstream to Ostream.
Reimplemented in IFstream, OFstream, IPstream, OPstream, ISstream, OSstream, prefixOSstream, IStringStream, OStringStream, and ITstream. |
|
Reset stream version.
Definition at line 464 of file IOstream.H. |
|
Set the stream format.
Definition at line 452 of file IOstream.H. |
|
Set stream to be bad.
Definition at line 494 of file IOstream.H. References Foam::setf(). Referenced by ISstream::putback(). |
Here is the call graph for this function:
|
Set stream closed.
Definition at line 258 of file IOstream.H. |
|
Reset stream compression.
Definition at line 476 of file IOstream.H. |
|
Set stream to have reached eof.
Definition at line 482 of file IOstream.H. |
|
Set flags of given field of stream.
Definition at line 510 of file IOstream.H. |
|
Set flags of stream.
Definition at line 503 of file IOstream.H. Referenced by Foam::dec(), Foam::hex(), and Foam::operator<<(). |
|
Set stream to have failed.
Definition at line 488 of file IOstream.H. |
|
Set the stream format from word.
Definition at line 458 of file IOstream.H. |
|
Set stream to be good.
Definition at line 270 of file IOstream.H. |
|
Set stream opened.
Definition at line 252 of file IOstream.H. |
|
Set stream state.
Definition at line 264 of file IOstream.H. |
|
Reset stream version.
Definition at line 470 of file IOstream.H. |
|
Unset flags of stream.
Definition at line 519 of file IOstream.H. |
|
Return current stream version.
Definition at line 405 of file IOstream.H. References Foam::label. Referenced by face::prevLabel(). |
|
Ostream operator.
|
|
Current version number.
Definition at line 219 of file IOstream.H. |
|
Definition at line 244 of file IOstream.H. |
|
Original version number.
Definition at line 216 of file IOstream.H. |
|
Default precision.
Definition at line 222 of file IOstream.H. |