41 return sptr ? sptr->
stdStream().tellg() : std::streampos(0);
73 putBackAvail_ =
false;
74 putBackToken_.reset();
83 <<
"Attempt to put back onto bad stream" 86 else if (putBackAvail_)
89 <<
"Attempt to put back another token" 105 <<
"Attempt to put back onto bad stream" 108 else if (putBackAvail_)
111 <<
"Attempt to put back another token" 116 putBackAvail_ =
true;
117 putBackToken_ = std::move(tok);
127 <<
"Attempt to get back from bad stream" 130 else if (putBackAvail_)
132 putBackAvail_ =
false;
133 tok = std::move(putBackToken_);
143 const token delimiter(*
this);
150 <<
"' while reading " << funcName
151 <<
", found " << delimiter.info() <<
nl 161 const token delimiter(*
this);
168 <<
"' while reading " << funcName
169 <<
", found " << delimiter.info()
170 <<
" at stream position " << stream_tellg(
this) <<
nl 180 const token delimiter(*
this);
188 <<
"' while reading " << funcName
189 <<
", found " << delimiter.info()
195 return delimiter.pToken();
201 const token delimiter(*
this);
209 <<
"' while reading " << funcName
210 <<
", found " << delimiter.info()
211 <<
" at stream position " << stream_tellg(
this) <<
nl 217 return delimiter.pToken();
229 return const_cast<Istream&
>(*this);
Begin block [isseparator].
static const token undefinedToken
An undefined token.
const token & peekBack() const noexcept
Examine putback token without removing it.
Istream & operator()() const
Return a non-const reference to const Istream.
bool getBack(token &tok)
Retrieve the put-back token if there is one.
errorManipArg< error, int > exit(error &err, const int errNo=1)
virtual const std::istream & stdStream() const
Const access to underlying std::istream.
bool readBegin(const char *funcName)
Begin read of data chunk, starts with '('.
char readEndList(const char *funcName)
End read of list data, ends with ')' or '}'.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
constexpr char nl
The newline '\n' character (0x0a)
void putBackClear()
Drop the putback token.
A token holds an item read from Istream.
Begin list [isseparator].
void putBack(const token &tok)
Put back a token (copy). Only a single put back is permitted.
char readBeginList(const char *funcName)
Begin read of list data, starts with '(' or '{'.
void exit(const int errNo=1)
Exit : can be called for any error to exit program.
bool readEnd(const char *funcName)
End read of data chunk, ends with ')'.
static void check(const int retVal, const char *what)
Generic input stream using a standard (STL) stream.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...