41 return sptr ? sptr->
stdStream().tellg() : std::streampos(0);
75 <<
"Attempt to put back onto bad stream" 78 else if (putBackAvail_)
81 <<
"Attempt to put back another token" 97 <<
"Attempt to get back from bad stream" 100 else if (putBackAvail_)
102 putBackAvail_ =
false;
113 const token delimiter(*
this);
120 <<
"' while reading " << funcName
121 <<
", found " << delimiter.info() <<
nl 131 const token delimiter(*
this);
138 <<
"' while reading " << funcName
139 <<
", found " << delimiter.info()
140 <<
" at stream position " << stream_tellg(
this) <<
nl 150 const token delimiter(*
this);
158 <<
"' while reading " << funcName
159 <<
", found " << delimiter.info()
165 return delimiter.pToken();
171 const token delimiter(*
this);
179 <<
"' while reading " << funcName
180 <<
", found " << delimiter.info()
181 <<
" at stream position " << stream_tellg(
this) <<
nl 187 return delimiter.pToken();
199 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)
Get 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)
A token holds an item read from Istream.
Begin list [isseparator].
void putBack(const token &tok)
Put back a token. 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)
void reset()
Reset token to UNDEFINED and clear any allocated storage.
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 ...