Public Member Functions | |
iIstream () | |
iIstream (writeFormat wf) | |
iIstream (const iIstream &)=default | |
virtual | ~iIstream ()=default |
void | putBack (const token &tok) |
bool | getBack (token &tok) |
bool | peekBack (token &tok) |
void | resetPutBack () |
virtual iIstream & | read (token &)=0 |
virtual iIstream & | read (char &)=0 |
virtual iIstream & | read (word &)=0 |
virtual iIstream & | readString (word &)=0 |
virtual iIstream & | read (int64 &)=0 |
virtual iIstream & | read (int32 &)=0 |
virtual iIstream & | read (int16 &)=0 |
virtual iIstream & | read (int8 &)=0 |
virtual iIstream & | read (label &)=0 |
virtual iIstream & | read (uint32 &)=0 |
virtual iIstream & | read (uint16 &)=0 |
virtual iIstream & | read (float &)=0 |
virtual iIstream & | read (double &)=0 |
virtual iIstream & | read (char *buffer, std::streamsize count)=0 |
virtual void | rewind ()=0 |
virtual bool | findToken (const word &w) |
virtual bool | findTokenResume (const word &w) |
search for all tokesn after the current file position and find the first word token tbat matchs w More... | |
virtual bool | findTokenSilent (const word &w, int32 limitLine=100) |
virtual bool | findTokenResumeSilent (const word &w, int32 limitLine=100) |
search for all tokesn after the current file position and find the first word token tbat matchs w More... | |
virtual bool | findTokenAndNext (const word &w, word &nextW, bool checkEndStatement=true) |
virtual bool | findTokenAndNextSilent (const word &w, word &nextW, int32 limitLine=100) |
template<typename T > | |
bool | findKeywordAndVal (const word &keyword, T &val, bool checkEndStatement=true) |
template<typename T > | |
T | lookupData (const word &keyword) |
template<typename T > | |
T | lookupDataOrSet (const word &keyword, const T &setVal) |
template<typename T > | |
bool | nextData (const word &keyword, T &data) |
bool | readBegin (const char *funcName) |
bool | readEnd (const char *funcName) |
bool | readBeginSquare (const char *funcName) |
bool | readEndSquare (const char *funcName) |
char | readBeginList (const char *funcName) |
char | readEndList (const char *funcName) |
char | readEndStatement (const char *funcName) |
iIstream & | operator() () const |
![]() | |
IOstream () | |
Default. More... | |
IOstream (writeFormat wF) | |
Construct and set write format. More... | |
IOstream (const IOstream &)=default | |
Copy. More... | |
virtual | ~IOstream ()=default |
Destructor. More... | |
virtual const word & | name () const |
Return the name of the stream. More... | |
virtual word & | name () |
Return non-const access to the name of the stream. More... | |
virtual bool | check (const char *operation) const |
Check IOstream status for given operation. More... | |
bool | fatalCheck (const char *operation) const |
Check IOstream status for given operation. More... | |
bool | opened () const |
Return true if stream has been opened. More... | |
bool | closed () const |
Return true if stream is closed. More... | |
bool | isBinary () const |
Return true if stream format is binray. More... | |
bool | good () const |
Return true if next operation might succeed. More... | |
bool | eof () const |
Return true if end of input seen. More... | |
bool | fail () const |
Return true if next operation will fail. More... | |
bool | bad () const |
Return true if stream is corrupted. More... | |
operator bool () const | |
Return true if the stream has not failed. More... | |
bool | operator! () const |
Return true if the stream has failed. More... | |
int32 | lineNumber () const |
Const access to the current stream line number. More... | |
int32 & | lineNumber () |
Non-const access to the current stream line number. More... | |
int32 | lineNumber (const int32 num) |
Set the stream line number return the previous value. More... | |
virtual ios_base::fmtflags | flags () const =0 |
Return flags of stream. More... | |
void | setEof () |
Set stream to have reached eof. More... | |
void | setFail () |
Set stream to have failed. More... | |
void | setBad () |
Set stream to be bad. More... | |
virtual ios_base::fmtflags | flags (const ios_base::fmtflags f)=0 |
Set flags of stream. More... | |
ios_base::fmtflags | setf (const ios_base::fmtflags f) |
Set flags of stream. More... | |
ios_base::fmtflags | setf (const ios_base::fmtflags f, const ios_base::fmtflags mask) |
Set flags of given field of stream. More... | |
void | unsetf (const ios_base::fmtflags f) |
Unset flags of stream. More... | |
Private Attributes | |
bool | putBack_ |
token | putBackToken_ |
Additional Inherited Members | |
![]() | |
enum | streamAccess : char { CLOSED = 0, OPENED } |
enum | writeFormat : char { ASCII = 0, BINARY } |
![]() | |
static unsigned int | defaultPrecision () |
Return the default precision. More... | |
static unsigned int | defaultPrecision (unsigned int prec) |
Reset the default precision return the previous value. More... | |
![]() | |
static unsigned int | precision_ = 6 |
Default precision, only works for ASCII. More... | |
![]() | |
void | setOpened () |
Set stream opened. More... | |
void | setClosed () |
Set stream closed. More... | |
void | setState (ios_base::iostate state) |
Set stream state. More... | |
void | setWriteFormat (writeFormat wF) |
void | setGood () |
Set stream to be good. More... | |
![]() | |
streamAccess | openClosed_ |
Is stream open or closed. More... | |
writeFormat | writeFormat_ = ASCII |
write format More... | |
ios_base::iostate | ioState_ |
state More... | |
int32 | lineNumber_ |
The file line. More... | |
![]() | |
static word | staticName_ |
Name for any generic stream - normally treat as readonly. More... | |
Definition at line 33 of file iIstream.hpp.
|
inline |
Definition at line 51 of file iIstream.hpp.
|
inline |
Definition at line 56 of file iIstream.hpp.
|
virtualdefault |
void putBack | ( | const token & | tok | ) |
Definition at line 5 of file iIstream.cpp.
References IOstream::bad(), fatalErrorInFunction, fatalExit, ioErrorInFile, IOstream::lineNumber(), IOstream::name(), iIstream::putBack_, and iIstream::putBackToken_.
Referenced by iEntry< Key, T * >::createEntry(), stlFile::read(), dictionary::readDictionary(), List< word >::readList(), stlFile::readSolid(), and Vector< word, vecAllocator< word > >::readVector().
bool getBack | ( | token & | tok | ) |
Definition at line 27 of file iIstream.cpp.
References fatalErrorInFunction.
Referenced by iTstream::read(), and Istream::read().
bool peekBack | ( | token & | tok | ) |
Definition at line 46 of file iIstream.cpp.
References token::reset().
|
inline |
Definition at line 85 of file iIstream.hpp.
References iIstream::putBack_, iIstream::putBackToken_, and token::reset().
Referenced by iTstream::reset(), and iTstream::rewind().
Implemented in Istream, and iTstream.
Referenced by iEntry< Key, T * >::createEntry(), pFlow::operator>>(), dataEntry::readDataEntry(), iEntry< Key, T * >::readKeyword(), Vector< word, vecAllocator< word > >::readVector(), and token::token().
|
pure virtual |
|
virtual |
Definition at line 60 of file iIstream.cpp.
Referenced by iIstream::findKeywordAndVal(), and Field< VectorDual, int8 >::readField().
|
virtual |
search for all tokesn after the current file position and find the first word token tbat matchs w
Definition at line 66 of file iIstream.cpp.
References pFlow::endl(), token::error(), fatalErrorInFunction, token::isEndBlock(), token::isEndStatement(), token::isWord(), and token::wordToken().
Referenced by Field< VectorDual, int8 >::readField().
Definition at line 96 of file iIstream.cpp.
search for all tokesn after the current file position and find the first word token tbat matchs w
Definition at line 102 of file iIstream.cpp.
References token::error(), token::isEndBlock(), token::isEndStatement(), token::isWord(), and token::wordToken().
Definition at line 130 of file iIstream.cpp.
References pFlow::endl(), token::error(), ioErrorInFile, token::isEndStatement(), token::isWord(), and token::wordToken().
Definition at line 176 of file iIstream.cpp.
References token::error(), token::isEndStatement(), token::isWord(), and token::wordToken().
Referenced by readControlDict::read(), and IOfileHeader::readHeader().
bool findKeywordAndVal | ( | const word & | keyword, |
T & | val, | ||
bool | checkEndStatement = true |
||
) |
Definition at line 24 of file iIstreamI.hpp.
References iIstream::findToken(), token::good(), and token::isEndStatement().
Referenced by readControlDict::read().
T lookupData | ( | const word & | keyword | ) |
Definition at line 52 of file iIstreamI.hpp.
References fatalExit, and ioErrorInFile.
T lookupDataOrSet | ( | const word & | keyword, |
const T & | setVal | ||
) |
Definition at line 68 of file iIstreamI.hpp.
Referenced by readControlDict::read(), and pointStructure::readPointStructure().
bool nextData | ( | const word & | keyword, |
T & | data | ||
) |
Definition at line 81 of file iIstreamI.hpp.
References pFlow::endl(), token::error(), token::good(), ioErrorInFile, token::isEndStatement(), token::isWord(), and token::wordToken().
Referenced by iBox< intType >::read(), box::read(), sphere::read(), and cylinder::read().
bool readBegin | ( | const char * | funcName | ) |
Definition at line 211 of file iIstream.cpp.
References token::BEGIN_LIST, pFlow::endl(), fatalExit, and ioErrorInFile.
Referenced by pFlow::operator>>().
bool readEnd | ( | const char * | funcName | ) |
Definition at line 231 of file iIstream.cpp.
References token::END_LIST, pFlow::endl(), fatalExit, and ioErrorInFile.
Referenced by pFlow::operator>>().
bool readBeginSquare | ( | const char * | funcName | ) |
Definition at line 250 of file iIstream.cpp.
References token::BEGIN_SQR, pFlow::endl(), fatalExit, and ioErrorInFile.
bool readEndSquare | ( | const char * | funcName | ) |
Definition at line 269 of file iIstream.cpp.
References token::END_SQR, pFlow::endl(), fatalExit, and ioErrorInFile.
char readBeginList | ( | const char * | funcName | ) |
Definition at line 288 of file iIstream.cpp.
References token::BEGIN_BLOCK, token::BEGIN_LIST, pFlow::endl(), fatalExit, ioErrorInFile, and token::pToken().
char readEndList | ( | const char * | funcName | ) |
Definition at line 309 of file iIstream.cpp.
References token::END_BLOCK, token::END_LIST, pFlow::endl(), fatalExit, ioErrorInFile, and token::pToken().
char readEndStatement | ( | const char * | funcName | ) |
Definition at line 332 of file iIstream.cpp.
References CONSUME_PARAM, pFlow::endl(), fatalExit, ioErrorInFile, token::isEndStatement(), and token::pToken().
Referenced by timeInterval::read(), line::read(), rotatingAxis::read(), Field< VectorDual, int8 >::readNonUniform(), and Field< VectorDual, int8 >::readUniform().
pFlow::iIstream & operator() | ( | ) | const |
Definition at line 350 of file iIstream.cpp.
References fatalExit.
|
private |
Definition at line 41 of file iIstream.hpp.
Referenced by iIstream::putBack(), and iIstream::resetPutBack().
|
private |
Definition at line 44 of file iIstream.hpp.
Referenced by iIstream::putBack(), and iIstream::resetPutBack().