Generic input stream. More...
#include <OpenFOAM/ISstream.H>
Generic input stream.
Definition at line 53 of file ISstream.H.
Public Member Functions | |
ISstream (istream &is, const string &name, streamFormat format=ASCII, versionNumber version=currentVersion, compressionType compression=UNCOMPRESSED) | |
Construct as wrapper around istream.
| |
virtual | ~ISstream () |
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 ios_base::fmtflags | flags () const |
Return flags of output stream.
| |
ISstream & | get (char &) |
Raw, low-level get character function.
| |
ISstream & | getLine (string &) |
Raw, low-level getline into a string function.
| |
ISstream & | putback (const char &) |
Raw, low-level putback character function.
| |
virtual Istream & | read (token &) |
Return next token from stream.
| |
virtual Istream & | read (char &) |
Read a character.
| |
virtual Istream & | read (word &) |
Read a word.
| |
virtual Istream & | read (string &) |
Read a string (including enclosing double-quotes).
| |
virtual Istream & | read (label &) |
Read a label.
| |
virtual Istream & | read (floatScalar &) |
Read a floatScalar.
| |
virtual Istream & | read (doubleScalar &) |
Read a doubleScalar.
| |
virtual Istream & | read (char *, std::streamsize) |
Read binary block.
| |
virtual Istream & | rewind () |
Rewind and return the stream so that it may be read again.
| |
virtual ios_base::fmtflags | flags (const ios_base::fmtflags flags) |
Set flags of output stream.
| |
virtual void | print (Ostream &) const |
Print description of IOstream to Ostream.
| |
Protected Member Functions | |
istream & | stream () |
Return the stream reference.
| |
const istream & | stream () const |
Return the const stream reference.
|
ISstream | ( | istream & | is, |
const string & | name, | ||
streamFormat | format = ASCII ,
|
||
versionNumber | version = currentVersion ,
|
||
compressionType | compression = UNCOMPRESSED
|
||
) | [inline]
|
Construct as wrapper around istream.
Definition at line 31 of file ISstreamI.H.
virtual ~ISstream | ( | ) | [inline, virtual]
|
Definition at line 108 of file ISstream.H.
istream& stream | ( | ) | [inline, protected]
|
Return the stream reference.
Definition at line 79 of file ISstream.H.
Referenced by IStringStream::str(), and IStringStream::~IStringStream().
const istream& stream | ( | ) | const [inline, protected]
|
Return the const stream reference.
Definition at line 85 of file ISstream.H.
virtual const fileName& name | ( | ) | const [inline, virtual]
|
Return the name of the stream.
Useful for Fstream to return the filename
Reimplemented from IOstream.
Reimplemented in IFstream.
Definition at line 118 of file ISstream.H.
Referenced by IStringStream::print(), and ISstream::print().
virtual fileName& name | ( | ) | [inline, virtual]
|
Return non-const access to the name of the stream.
Useful to alter the stream name
Reimplemented from IOstream.
Reimplemented in IFstream.
Definition at line 125 of file ISstream.H.
std::ios_base::fmtflags flags | ( | ) | const [virtual]
|
Foam::ISstream & get | ( | char & | c ) | [inline]
|
Raw, low-level get character function.
Definition at line 57 of file ISstreamI.H.
References IOstream::lineNumber_, and IOstream::setState().
Referenced by Foam::readHexLabel().
Foam::ISstream & getLine | ( | string & | s ) | [inline]
|
Raw, low-level getline into a string function.
Definition at line 71 of file ISstreamI.H.
Referenced by AC3DsurfaceFormatCore::cueTo(), surfaceFormatsCore::getLineNoComment(), csvTableReader< Type >::operator()(), NASsurfaceFormat< Face >::read(), AC3DsurfaceFormat< Face >::read(), Foam::readCmd(), AC3DsurfaceFormatCore::readCmd(), STARCDsurfaceFormatCore::readHeader(), and Foam::readUpto().
Foam::ISstream & putback | ( | const char & | c ) | [inline]
|
Raw, low-level putback character function.
Definition at line 81 of file ISstreamI.H.
Foam::Istream & read | ( | token & | t ) | [virtual]
|
Return next token from stream.
Implements Istream.
Definition at line 102 of file ISstream.C.
References token::ADD, token::ASSIGN, token::BEGIN_BLOCK, token::BEGIN_LIST, token::BEGIN_SQR, token::BEGIN_STRING, token::COLON, token::COMMA, token::DIVIDE, token::END_BLOCK, token::END_LIST, token::END_SQR, token::END_STATEMENT, Istream::getBack(), token::compound::isCompound(), token::labelToken(), token::lineNumber(), token::MULTIPLY, token::compound::New(), token::setBad(), and token::SUBTRACT.
Foam::Istream & read | ( | char & | c ) | [virtual]
|
Foam::Istream & read | ( | word & | str ) | [virtual]
|
Read a word.
Implements Istream.
Definition at line 282 of file ISstream.C.
References token::BEGIN_LIST, token::END_LIST, Foam::exit(), Foam::FatalIOError, FatalIOErrorIn, and word::valid().
Foam::Istream & read | ( | string & | str ) | [virtual]
|
Read a string (including enclosing double-quotes).
Backslashes are retained, except when escaping double-quotes and an embedded newline character.
Implements Istream.
Definition at line 358 of file ISstream.C.
References token::BEGIN_STRING, token::END_STRING, Foam::exit(), Foam::FatalIOError, FatalIOErrorIn, and token::NL.
Foam::Istream & read | ( | label & | val ) | [virtual]
|
Foam::Istream & read | ( | floatScalar & | val ) | [virtual]
|
Foam::Istream & read | ( | doubleScalar & | val ) | [virtual]
|
Foam::Istream & read | ( | char * | buf, |
std::streamsize | count | ||
) | [virtual]
|
Read binary block.
Implements Istream.
Definition at line 493 of file ISstream.C.
References Foam::exit(), Foam::FatalIOError, FatalIOErrorIn, and format().
Foam::Istream & rewind | ( | ) | [virtual]
|
Rewind and return the stream so that it may be read again.
Implements Istream.
Definition at line 512 of file ISstream.C.
std::ios_base::fmtflags flags | ( | const ios_base::fmtflags | flags ) | [virtual]
|
Set flags of output stream.
Definition at line 529 of file ISstream.C.
void print | ( | Ostream & | os ) | const [virtual]
|
Print description of IOstream to Ostream.
Reimplemented from IOstream.
Reimplemented in IFstream, and IStringStream.
Definition at line 34 of file SstreamsPrint.C.
References ISstream::name().
Referenced by IFstream::print().