Go to the documentation of this file.
2 #ifndef __iTstream_hpp__
3 #define __iTstream_hpp__
133 virtual void rewind()
override;
135 void seek(
size_t pos)
override;
137 size_t tell()
override;
140 virtual void reset();
161 return ios_base::fmtflags(0);
165 ios_base::fmtflags
flags(
const ios_base::fmtflags)
167 return ios_base::fmtflags(0);
ios_base::fmtflags flags() const
Return flags of output stream.
const tokenList & tokens() const
const access to token list
ios_base::fmtflags flags(const ios_base::fmtflags)
Set flags of stream.
bool isBeginToken(const token &tok)
Is tok a begin token?
bool isLastToken()
check if end of list is reached
Token class based on OpenFOAM stream, with some modifications/simplifications to be tailored to our n...
size_t tell() override
Return current position indicator.
bool isEndToken(const token &tok)
Is tok an end token?
virtual void reset()
reset the iTstream and make the stream empty
void setFirstToken()
rewind the stream
iTstream & operator=(const iTstream &)=default
copy assignment
bool validTokenForStream(const token tok)
Is tok a valid token for this stream?
void seek(size_t pos) override
word name_
name of the stream
void appendTokens(const tokenList &tList)
append a list of tokens to the end of tokens
Interface class for any input stream
tokenList tokenList_
list of tokens in this stream
iTstream(const word &streamName)
construct with a name
virtual const word & name() const
Return the name of the stream.
virtual void rewind() override
Rewind the stream so that it may be read again.
typename listType::iterator iterator
virtual iIstream & read(token &t) override
Return next token from stream.
auto count(const Vector< T, Allocator > &vec, const T &val)
void validate()
check for valid tokens in the tokenList
void appendToken(const token &t)
append token to the end of token and rewind the stream
virtual ~iTstream()=default
Destructor.
size_t numTokens() const
size
unsigned long long int uint64
tokenList::iterator currentToken_
current token
virtual iIstream & readString(word &str) override
Read a string.