Go to the documentation of this file.
13 currentToken_ = tokenList_.begin();
18 for (
auto it = tokenList_.begin(); it != tokenList_.end(); )
22 it = tokenList_.erase(it);
33 const word& streamName
39 currentToken_(tokenList_.begin())
48 const word& streamName,
55 currentToken_(tokenList_.begin())
66 const word& streamName,
72 tokenList_(std::move(tList)),
73 currentToken_(tokenList_.begin())
94 tokenList_ = std::move(tList);
123 if ( !isLastToken() )
141 "attempt to read beyond EOF \n";
152 if (tokenList_.size())
154 t.
lineNumber() = tokenList_.back().lineNumber();
298 std::streamsize
count
328 return static_cast<size_t>(-1);
338 return tokenList_.size();
343 return tokenList_.size();
const tokenList & tokens() const
const access to token list
#define notImplementedFunction
Report that a function is yet not implemented.
bool isLastToken()
check if end of list is reached
#define fatalExit
Fatal exit.
Token class based on OpenFOAM stream, with some modifications/simplifications to be tailored to our n...
size_t tell() override
Return current position indicator.
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
void reset()
Reset token to UNDEFINED and clear any allocated storage.
void appendTokens(const tokenList &tList)
append a list of tokens to the end of tokens
Interface class for any input stream
bool getBack(token &tok)
Get the put back token if there is one and return true.
#define fatalErrorInFunction
Report a fatal error and function name and exit the application.
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.
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 resetPutBack()
reset the put back token;
void appendToken(const token &t)
append token to the end of token and rewind the stream
size_t numTokens() const
size
unsigned long long int uint64
tokenList::iterator currentToken_
current token
virtual iIstream & readString(word &str) override
Read a string.
int32 lineNumber() const
The line number for the token.