iTstream Class Reference
+ Inheritance diagram for iTstream:
+ Collaboration diagram for iTstream:

Public Member Functions

 iTstream (const word &streamName)
 
 iTstream (const word &streamName, const tokenList &tList)
 
 iTstream (const word &streamName, tokenList &&tList)
 
 iTstream (const iTstream &)=default
 
 iTstream (iTstream &&)=default
 
iTstreamoperator= (const iTstream &)=default
 
iTstreamoperator= (iTstream &&)=default
 
void operator= (const tokenList &tList)
 
void operator= (tokenList &&tList)
 
virtual ~iTstream ()=default
 
virtual const wordname () const
 Return the name of the stream. More...
 
virtual wordname ()
 Return non-const access to the name of the stream. More...
 
virtual iIstreamread (token &t) override
 
virtual iIstreamread (char &c) override
 
virtual iIstreamread (word &str) override
 
virtual iIstreamreadString (word &str) override
 
virtual iIstreamread (int64 &) override
 
virtual iIstreamread (int32 &) override
 
virtual iIstreamread (int16 &) override
 
virtual iIstreamread (int8 &) override
 
virtual iIstreamread (label &) override
 
virtual iIstreamread (uint32 &) override
 
virtual iIstreamread (uint16 &) override
 
virtual iIstreamread (float &) override
 
virtual iIstreamread (double &) override
 
iIstreamread (char *buffer, std::streamsize count) override
 
virtual void rewind ()
 
virtual void reset ()
 
const tokenListtokens () const
 
size_t size () const
 
size_t numTokens () const
 
void appendTokens (const tokenList &tList)
 
void appendToken (const token &t)
 
ios_base::fmtflags flags () const
 Return flags of stream. More...
 
ios_base::fmtflags flags (const ios_base::fmtflags)
 Set flags of stream. More...
 
- Public Member Functions inherited from iIstream
 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 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 >
lookupData (const word &keyword)
 
template<typename 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)
 
iIstreamoperator() () const
 
- Public Member Functions inherited from IOstream
 IOstream ()
 Default. More...
 
 IOstream (writeFormat wF)
 Construct and set write format. More...
 
 IOstream (const IOstream &)=default
 Copy. More...
 
virtual ~IOstream ()=default
 Destructor. 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...
 
int32lineNumber ()
 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...
 
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...
 
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...
 

Protected Member Functions

bool isLastToken ()
 
void setFirstToken ()
 
void validate ()
 
- Protected Member Functions inherited from IOstream
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...
 

Protected Attributes

word name_
 
tokenList tokenList_
 
tokenList::iterator currentToken_
 
- Protected Attributes inherited from IOstream
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...
 

Additional Inherited Members

- Public Types inherited from IOstream
enum  streamAccess : char { CLOSED = 0, OPENED }
 
enum  writeFormat : char { ASCII = 0, BINARY }
 
- Static Public Member Functions inherited from IOstream
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 Public Attributes inherited from IOstream
static unsigned int precision_ = 6
 Default precision, only works for ASCII. More...
 
- Static Protected Attributes inherited from IOstream
static word staticName_
 Name for any generic stream - normally treat as readonly. More...
 

Detailed Description

Definition at line 21 of file iTstream.hpp.

Constructor & Destructor Documentation

◆ iTstream() [1/5]

iTstream ( const word streamName)

Definition at line 32 of file iTstream.cpp.

◆ iTstream() [2/5]

iTstream ( const word streamName,
const tokenList tList 
)

Definition at line 47 of file iTstream.cpp.

◆ iTstream() [3/5]

iTstream ( const word streamName,
tokenList &&  tList 
)

Definition at line 65 of file iTstream.cpp.

◆ iTstream() [4/5]

iTstream ( const iTstream )
default

◆ iTstream() [5/5]

iTstream ( iTstream &&  )
default

◆ ~iTstream()

virtual ~iTstream ( )
virtualdefault

Member Function Documentation

◆ isLastToken()

bool isLastToken ( )
protected

Definition at line 6 of file iTstream.cpp.

References iTstream::currentToken_, and iTstream::tokenList_.

◆ setFirstToken()

void setFirstToken ( )
protected

Definition at line 11 of file iTstream.cpp.

◆ validate()

void validate ( )
protected

Definition at line 16 of file iTstream.cpp.

References pFlow::validTokenForStream().

+ Here is the call graph for this function:

◆ operator=() [1/4]

iTstream& operator= ( const iTstream )
default

◆ operator=() [2/4]

iTstream& operator= ( iTstream &&  )
default

◆ operator=() [3/4]

void operator= ( const tokenList tList)

Definition at line 84 of file iTstream.cpp.

◆ operator=() [4/4]

void operator= ( tokenList &&  tList)

Definition at line 92 of file iTstream.cpp.

◆ name() [1/2]

pFlow::word & name ( ) const
virtual

Return the name of the stream.

Reimplemented from IOstream.

Definition at line 99 of file iTstream.cpp.

◆ name() [2/2]

virtual word& name ( )
virtual

Return non-const access to the name of the stream.

Reimplemented from IOstream.

◆ read() [1/13]

pFlow::iIstream & read ( token t)
overridevirtual

Implements iIstream.

Definition at line 111 of file iTstream.cpp.

References fatalErrorInFunction, fatalExit, iIstream::getBack(), token::lineNumber(), and token::reset().

Referenced by twoPartEntry::twoPartEntry().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ read() [2/13]

pFlow::iIstream & read ( char &  c)
overridevirtual

Implements iIstream.

Definition at line 168 of file iTstream.cpp.

References CONSUME_PARAM, fatalExit, and notImplementedFunction.

◆ read() [3/13]

pFlow::iIstream & read ( word str)
overridevirtual

Implements iIstream.

Definition at line 180 of file iTstream.cpp.

References CONSUME_PARAM, fatalExit, and notImplementedFunction.

◆ readString()

pFlow::iIstream & readString ( word str)
overridevirtual

Implements iIstream.

Definition at line 192 of file iTstream.cpp.

References CONSUME_PARAM, fatalExit, and notImplementedFunction.

◆ read() [4/13]

pFlow::iIstream & read ( int64 val)
overridevirtual

Implements iIstream.

Definition at line 204 of file iTstream.cpp.

References CONSUME_PARAM, fatalExit, and notImplementedFunction.

◆ read() [5/13]

pFlow::iIstream & read ( int32 val)
overridevirtual

Implements iIstream.

Definition at line 215 of file iTstream.cpp.

References CONSUME_PARAM, fatalExit, and notImplementedFunction.

◆ read() [6/13]

pFlow::iIstream & read ( int16 val)
overridevirtual

Implements iIstream.

Definition at line 226 of file iTstream.cpp.

References CONSUME_PARAM, fatalExit, and notImplementedFunction.

◆ read() [7/13]

pFlow::iIstream & read ( int8 val)
overridevirtual

Implements iIstream.

Definition at line 237 of file iTstream.cpp.

References CONSUME_PARAM, fatalExit, and notImplementedFunction.

◆ read() [8/13]

pFlow::iIstream & read ( label val)
overridevirtual

Implements iIstream.

Definition at line 248 of file iTstream.cpp.

References CONSUME_PARAM, fatalExit, and notImplementedFunction.

◆ read() [9/13]

pFlow::iIstream & read ( uint32 val)
overridevirtual

Implements iIstream.

Definition at line 259 of file iTstream.cpp.

References CONSUME_PARAM, fatalExit, and notImplementedFunction.

◆ read() [10/13]

pFlow::iIstream & read ( uint16 val)
overridevirtual

Implements iIstream.

Definition at line 270 of file iTstream.cpp.

References CONSUME_PARAM, fatalExit, and notImplementedFunction.

◆ read() [11/13]

pFlow::iIstream & read ( float &  val)
overridevirtual

Implements iIstream.

Definition at line 282 of file iTstream.cpp.

References CONSUME_PARAM, fatalExit, and notImplementedFunction.

◆ read() [12/13]

pFlow::iIstream & read ( double &  val)
overridevirtual

Implements iIstream.

Definition at line 294 of file iTstream.cpp.

References CONSUME_PARAM, fatalExit, and notImplementedFunction.

◆ read() [13/13]

pFlow::iIstream & read ( char *  buffer,
std::streamsize  count 
)
overridevirtual

Implements iIstream.

Definition at line 306 of file iTstream.cpp.

References notImplementedFunction.

◆ rewind()

void rewind ( )
virtual

Implements iIstream.

Definition at line 315 of file iTstream.cpp.

References iIstream::resetPutBack().

Referenced by twoPartEntry::secondPartVal(), and dataEntry::stream().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ reset()

void reset ( )
virtual

Definition at line 323 of file iTstream.cpp.

References iIstream::resetPutBack().

+ Here is the call graph for this function:

◆ tokens()

const pFlow::tokenList & tokens ( ) const

Definition at line 331 of file iTstream.cpp.

Referenced by dataEntry::dataEntry().

+ Here is the caller graph for this function:

◆ size()

size_t size ( ) const

Definition at line 336 of file iTstream.cpp.

Referenced by pFlow::isTwoPartEntry().

+ Here is the caller graph for this function:

◆ numTokens()

size_t numTokens ( ) const

Definition at line 341 of file iTstream.cpp.

◆ appendTokens()

void appendTokens ( const tokenList tList)

Definition at line 347 of file iTstream.cpp.

References pFlow::validTokenForStream().

+ Here is the call graph for this function:

◆ appendToken()

void appendToken ( const token t)

Definition at line 360 of file iTstream.cpp.

References pFlow::validTokenForStream().

+ Here is the call graph for this function:

◆ flags() [1/2]

ios_base::fmtflags flags ( ) const
inlinevirtual

Return flags of stream.

Implements IOstream.

Definition at line 151 of file iTstream.hpp.

◆ flags() [2/2]

ios_base::fmtflags flags ( const ios_base::fmtflags  f)
inlinevirtual

Set flags of stream.

Implements IOstream.

Definition at line 157 of file iTstream.hpp.

Member Data Documentation

◆ name_

word name_
protected

Definition at line 28 of file iTstream.hpp.

◆ tokenList_

tokenList tokenList_
protected

Definition at line 31 of file iTstream.hpp.

Referenced by iTstream::isLastToken().

◆ currentToken_

tokenList::iterator currentToken_
protected

Definition at line 34 of file iTstream.hpp.

Referenced by iTstream::isLastToken().


The documentation for this class was generated from the following files: