Generic input stream using a standard (STL) stream. More...
Public Member Functions | |
ISstream (std::istream &is, const string &streamName, IOstreamOption streamOpt=IOstreamOption()) | |
ISstream (std::istream &is, const string &streamName, IOstreamOption::streamFormat fmt, IOstreamOption::versionNumber ver=IOstreamOption::currentVersion, IOstreamOption::compressionType cmp=IOstreamOption::UNCOMPRESSED) | |
virtual | ~ISstream ()=default |
virtual const fileName & | name () const |
virtual fileName & | name () |
virtual ios_base::fmtflags | flags () const |
bool | seekCommentEnd_Cstyle () |
bool | continueReadUntilRightBrace (std::string &str, const bool stripComments=true) |
ISstream & | get (char &c) |
int | peek () |
ISstream & | getLine (std::string &str, char delim='\n') |
std::streamsize | getLine (std::nullptr_t, char delim='\n') |
ISstream & | putback (const char c) |
virtual Istream & | read (token &t) |
virtual Istream & | read (char &c) |
virtual Istream & | read (word &str) |
virtual Istream & | read (string &str) |
virtual Istream & | read (label &val) |
virtual Istream & | read (floatScalar &val) |
virtual Istream & | read (doubleScalar &val) |
virtual Istream & | read (char *buf, std::streamsize count) |
virtual Istream & | readRaw (char *data, std::streamsize count) |
virtual bool | beginRawRead () |
virtual bool | endRawRead () |
virtual void | rewind () |
virtual ios_base::fmtflags | flags (const ios_base::fmtflags flags) |
virtual std::istream & | stdStream () |
virtual const std::istream & | stdStream () const |
virtual void | print (Ostream &os) const |
![]() | |
Istream (const Istream &)=default | |
virtual | ~Istream ()=default |
Istream (IOstreamOption streamOpt=IOstreamOption()) | |
Istream (IOstreamOption::streamFormat fmt, IOstreamOption::versionNumber ver=IOstreamOption::currentVersion, IOstreamOption::compressionType cmp=IOstreamOption::UNCOMPRESSED) | |
const token & | peekBack () const noexcept |
bool | peekBack (token &tok) |
void | putBack (const token &tok) |
bool | getBack (token &tok) |
bool | readBegin (const char *funcName) |
bool | readEnd (const char *funcName) |
char | readBeginList (const char *funcName) |
char | readEndList (const char *funcName) |
Istream & | operator() () const |
![]() | |
IOstream (const IOstream &)=default | |
virtual | ~IOstream ()=default |
IOstream (IOstreamOption streamOpt=IOstreamOption()) | |
IOstream (IOstreamOption::streamFormat fmt, IOstreamOption::versionNumber ver, IOstreamOption::compressionType cmp=IOstreamOption::UNCOMPRESSED) | |
fileName | relativeName () const |
virtual bool | check (const char *operation) const |
bool | fatalCheck (const char *operation) const |
bool | opened () const noexcept |
bool | closed () const noexcept |
bool | good () const noexcept |
bool | eof () const noexcept |
bool | fail () const noexcept |
bool | bad () const noexcept |
operator bool () const noexcept | |
bool | operator! () const noexcept |
unsigned | labelByteSize () const noexcept |
unsigned | scalarByteSize () const noexcept |
void | setLabelByteSize (unsigned nbytes) noexcept |
void | setScalarByteSize (unsigned nbytes) noexcept |
template<class T = label> | |
std::enable_if< std::is_integral< T >::value, bool >::type | checkLabelSize () const noexcept |
template<class T = scalar> | |
std::enable_if< std::is_floating_point< T >::value, bool >::type | checkScalarSize () const noexcept |
label | lineNumber () const noexcept |
label & | lineNumber () noexcept |
label | lineNumber (const label num) noexcept |
void | setEof () noexcept |
void | setFail () noexcept |
void | setBad () |
ios_base::fmtflags | setf (const ios_base::fmtflags f) |
ios_base::fmtflags | setf (const ios_base::fmtflags f, const ios_base::fmtflags mask) |
void | unsetf (const ios_base::fmtflags f) |
void | print (Ostream &os, const int streamState) const |
InfoProxy< IOstream > | info () const |
![]() | |
constexpr | IOstreamOption (streamFormat fmt=streamFormat::ASCII, compressionType comp=compressionType::UNCOMPRESSED) noexcept |
constexpr | IOstreamOption (streamFormat fmt, compressionType comp, versionNumber ver) noexcept |
constexpr | IOstreamOption (streamFormat fmt, versionNumber ver, compressionType comp=compressionType::UNCOMPRESSED) noexcept |
IOstreamOption (const IOstreamOption &opt, streamFormat fmt) noexcept | |
streamFormat | format () const noexcept |
streamFormat | format (const streamFormat fmt) noexcept |
streamFormat | format (const word &formatName) |
compressionType | compression () const noexcept |
compressionType | compression (const compressionType comp) noexcept |
compressionType | compression (const word &compName) |
versionNumber | version () const noexcept |
versionNumber | version (const versionNumber ver) noexcept |
versionNumber | version (const token &tok) |
Additional Inherited Members | |
![]() | |
enum | streamAccess : char { CLOSED = 0, OPENED } |
![]() | |
enum | streamFormat : char { ASCII = 0, BINARY } |
enum | compressionType : char { UNCOMPRESSED = 0, COMPRESSED } |
![]() | |
static unsigned int | defaultPrecision () noexcept |
static unsigned int | defaultPrecision (unsigned int prec) noexcept |
![]() | |
static streamFormat | formatEnum (const word &formatName, const streamFormat deflt=streamFormat::ASCII) |
static streamFormat | formatEnum (const word &key, const dictionary &dict, const streamFormat deflt=streamFormat::ASCII) |
static compressionType | compressionEnum (const word &compName, const compressionType deflt=compressionType::UNCOMPRESSED) |
static compressionType | compressionEnum (const word &key, const dictionary &dict, const compressionType deflt=compressionType::UNCOMPRESSED) |
![]() | |
static unsigned int | precision_ |
![]() | |
static const Enum< streamFormat > | formatNames |
static const versionNumber | currentVersion |
![]() | |
bool | hasPutback () const noexcept |
![]() | |
void | setOpened () noexcept |
void | setClosed () noexcept |
void | setState (std::ios_base::iostate state) noexcept |
void | setGood () noexcept |
![]() | |
std::ios_base::iostate | ioState_ |
streamAccess | openClosed_ |
unsigned char | sizeofLabel_ |
unsigned char | sizeofScalar_ |
label | lineNumber_ |
![]() | |
static fileName | staticName_ |
Generic input stream using a standard (STL) stream.
Definition at line 51 of file ISstream.H.
|
inline |
Definition at line 25 of file ISstreamI.H.
|
inline |
Definition at line 87 of file ISstream.H.
|
virtualdefault |
|
inlinevirtual |
Reimplemented from IOstream.
Definition at line 109 of file ISstream.H.
Referenced by dynamicCode::copyAndFilter(), IStringStream::print(), ISstream::print(), decomposedBlockData::readBlock(), FIREMeshReader::readCells(), FIREMeshReader::readFaces(), decomposedBlockData::readHeader(), and FIRECore::readPoints().
|
inlinevirtual |
Reimplemented from IOstream.
Definition at line 115 of file ISstream.H.
|
virtual |
bool seekCommentEnd_Cstyle | ( | ) |
Definition at line 72 of file ISstream.C.
References Foam::constant::universal::c, and ISstream::get().
Referenced by Foam::readUntilBalancedDelimiter(), and Foam::readVariable().
Definition at line 506 of file ISstream.C.
References token::BEGIN_BLOCK, token::END_BLOCK, and Foam::readUntilBalancedDelimiter().
|
inline |
Definition at line 49 of file ISstreamI.H.
References Foam::constant::universal::c, IOstream::good(), IOstream::lineNumber_, and IOstream::setState().
Referenced by Foam::ReadHex(), Foam::readToNewline(), Foam::readUntilBalancedDelimiter(), Foam::readVariable(), Foam::readVerbatim(), and ISstream::seekCommentEnd_Cstyle().
|
inline |
Definition at line 63 of file ISstreamI.H.
Referenced by ABAQUSCore::readHelper::readElements(), ABAQUSCore::readHelper::readPoints(), ABAQUSCore::readHelper::readSurfaceElements(), and Foam::readVariable().
|
inline |
Definition at line 69 of file ISstreamI.H.
Referenced by dynamicCode::copyAndFilter(), AC3DsurfaceFormatCore::cueTo(), FIRECore::getFireString(), edgeMeshFormatsCore::getLineNoComment(), surfaceFormatsCore::getLineNoComment(), csvTableReader< Type >::operator()(), ensightReadFile::read(), NASedgeFormat::read(), AC3DsurfaceFormat< Face >::read(), NASsurfaceFormat< Face >::read(), ABAQUSCore::readHelper::read(), AC3DsurfaceFormatCore::readCmd(), externalCoupledMixedFvPatchField< scalar >::readData(), externalCoupledTemperatureMixedFvPatchScalarField::readData(), ABAQUSCore::readHelper::readElements(), STARCDsurfaceFormatCore::readInpCellTable(), ensightSurfaceReader::readLine(), lumpedPointState::readPlain(), ABAQUSCore::readHelper::readPoints(), ABAQUSCore::readHelper::readSurfaceElements(), Foam::readUntilBalancedDelimiter(), Foam::readVariable(), and Foam::skipComments().
|
inline |
Definition at line 83 of file ISstreamI.H.
References Foam::BitOps::count(), and Foam::max().
|
inline |
Definition at line 99 of file ISstreamI.H.
References Foam::constant::universal::c.
Referenced by Foam::readUntilBalancedDelimiter(), Foam::readVariable(), and Foam::readVerbatim().
|
virtual |
Implements Istream.
Reimplemented in dummyISstream.
Definition at line 523 of file ISstream.C.
References token::ASSIGN, IOstream::bad(), token::BEGIN_BLOCK, token::BEGIN_LIST, token::BEGIN_SQR, Foam::constant::universal::c, Foam::charToWord(), token::COLON, token::COMMA, token::DIVIDE, token::DOLLAR, token::DQUOTE, token::END_BLOCK, token::END_LIST, token::END_SQR, token::END_STATEMENT, Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, Foam::PtrListOps::get(), Istream::getBack(), token::HASH, IOWarningInFunction, token::compound::isCompound(), token::lineNumber(), token::MINUS, token::MULTIPLY, token::compound::New(), Foam::nl, token::PLUS, Foam::read(), Foam::readVariable(), Foam::readVerbatim(), token::setBad(), token::setType(), and word::valid().
Referenced by Foam::getToken(), Foam::parseStream(), STARCDsurfaceFormat< Face >::read(), STARCDedgeFormat::read(), STARCDMeshReader::readBoundary(), STARCDMeshReader::readCells(), STARCDMeshReader::readPoints(), and STARCDCore::readPoints().
|
virtual |
Implements Istream.
Reimplemented in dummyISstream.
Definition at line 801 of file ISstream.C.
References Foam::constant::universal::c.
|
virtual |
Implements Istream.
Reimplemented in dummyISstream.
Definition at line 808 of file ISstream.C.
References token::BEGIN_LIST, Foam::constant::universal::c, token::END_LIST, Foam::endl(), errLen, Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, Foam::PtrListOps::get(), IOWarningInFunction, Foam::nl, and word::valid().
|
virtual |
Implements Istream.
Reimplemented in ensightReadFile, and dummyISstream.
Definition at line 888 of file ISstream.C.
References Foam::constant::universal::c, token::DQUOTE, errLen, Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, Foam::PtrListOps::get(), and token::NL.
|
virtual |
Implements Istream.
Reimplemented in ensightReadFile, and dummyISstream.
Definition at line 989 of file ISstream.C.
|
virtual |
|
virtual |
|
virtual |
Implements Istream.
Reimplemented in ensightReadFile, and dummyISstream.
Definition at line 1013 of file ISstream.C.
References Foam::BitOps::count().
|
virtual |
Implements Istream.
Reimplemented in dummyISstream.
Definition at line 1023 of file ISstream.C.
References Foam::BitOps::count(), and Istream::read().
|
virtual |
Implements Istream.
Reimplemented in dummyISstream.
Definition at line 1032 of file ISstream.C.
References Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, and format().
|
virtual |
|
virtual |
Implements Istream.
Reimplemented in UIListStream, IListStream, dummyISstream, and IFstream.
Definition at line 1057 of file ISstream.C.
Referenced by IStringStream::reset(), IFstream::rewind(), and simpleObjectRegistry::setValues().
|
virtual |
Implements IOstream.
Reimplemented in dummyISstream.
Definition at line 1077 of file ISstream.C.
References f().
|
inlinevirtual |
Reimplemented in IFstream.
Definition at line 212 of file ISstream.H.
Referenced by FIRECore::getFireLabel(), FIRECore::getFirePoint(), FIRECore::getFireString(), and Foam::skipComments().
|
inlinevirtual |
Reimplemented in IFstream.
Definition at line 218 of file ISstream.H.
|
virtual |
Reimplemented from IOstream.
Reimplemented in UIListStream, IListStream, IStringStream, and IFstream.
Definition at line 30 of file SstreamsPrint.C.
References ISstream::name(), os(), and IOstream::print().
Referenced by IFstream::print(), and IStringStream::print().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.