Go to the documentation of this file.
61 while (
get(
c) &&
c !=
'\n')
70 if (
get(
c) &&
c ==
'*')
115 if (
read(*wPtr).bad())
134 static const int maxLen = 128;
135 static char buf[maxLen];
149 char c = nextValid();
190 string* sPtr =
new string;
192 if (
read(*sPtr).bad())
208 if (
read(nextC).bad())
217 string* sPtr =
new string;
219 if (readVerbatim(*sPtr).bad())
248 if (
read(nextC).bad())
259 string* sPtr =
new string;
261 if (readVariable(*sPtr).bad())
290 case '0' :
case '1' :
case '2' :
case '3' :
case '4' :
291 case '5' :
case '6' :
case '7' :
case '8' :
case '9' :
293 bool asLabel = (
c !=
'.');
315 asLabel = isdigit(
c);
322 buf[maxLen-1] =
'\0';
325 <<
"number '" << buf <<
"...'\n"
326 <<
" is too long (max. " << maxLen <<
" characters)"
335 setState(is_.rdstate());
344 if (nChar == 1 && buf[0] ==
'-')
412 static const int maxLen = 1024;
413 static const int errLen = 80;
414 static char buf[maxLen];
444 <<
"word '" << buf <<
"...'\n"
445 <<
" is too long (max. " << maxLen <<
" characters)"
455 buf[errLen] = buf[nChar] =
'\0';
458 <<
"problem while reading word '" << buf <<
"...' after "
459 << nChar <<
" characters\n"
468 <<
"invalid first character found : " <<
c
483 static const int maxLen = 1024;
484 static const int errLen = 80;
485 static char buf[maxLen];
492 <<
"cannot read start of string"
502 <<
"Incorrect start of string character found : " <<
c
509 bool escaped =
false;
537 buf[errLen] = buf[nChar] =
'\0';
540 <<
"found '\\n' while reading string \""
562 <<
"string \"" << buf <<
"...\"\n"
563 <<
" is too long (max. " << maxLen <<
" characters)"
572 buf[errLen] = buf[nChar] =
'\0';
575 <<
"problem while reading string \"" << buf <<
"...\""
585 static const int maxLen = 1024;
586 static const int errLen = 80;
587 static char buf[maxLen];
593 if (!get(
c) ||
c !=
'$')
596 <<
"invalid first character found : " <<
c
624 <<
"word '" << buf <<
"...'\n"
625 <<
" is too long (max. " << maxLen <<
" characters)"
660 <<
"word '" << buf <<
"...'\n"
661 <<
" is too long (max. " << maxLen <<
" characters)"
672 buf[errLen] = buf[nChar] =
'\0';
675 <<
"problem while reading string '" << buf <<
"...' after "
676 << nChar <<
" characters\n"
685 <<
"invalid first character found : " <<
c
705 static const int maxLen = 8000;
706 static const int errLen = 80;
707 static char buf[maxLen];
737 <<
"string \"" << buf <<
"...\"\n"
738 <<
" is too long (max. " << maxLen <<
" characters)"
747 buf[errLen] = buf[nChar] =
'\0';
750 <<
"problem while reading string \"" << buf <<
"...\""
760 setState(is_.rdstate());
768 setState(is_.rdstate());
776 setState(is_.rdstate());
787 <<
"stream format not binary"
791 readBegin(
"binaryBlock");
792 is_.read(buf, count);
793 readEnd(
"binaryBlock");
795 setState(is_.rdstate());
803 stdStream().rdbuf()->pubseekpos(0);
static autoPtr< compound > New(const word &type, Istream &)
Select null constructed.
static bool valid(char)
Is this character valid for a word.
word format(conversionProperties.lookup("format"))
double doubleScalar
Double precision floating point scalar type.
A class for handling words, derived from string.
ISstream & get(char &)
Raw, low-level get character function.
void readWordToken(token &)
bool read(const char *, int32_t &)
float floatScalar
Float precision floating point scalar type.
ISstream & putback(const char &)
Raw, low-level putback character function.
punctuationToken
Standard punctuation tokens.
A token holds items read from Istream.
A class for handling character strings derived from std::string.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
static bool isCompound(const word &name)
Return true if name is a compound type.
bool bad() const
Return true if stream is corrupted.
Istream & readVerbatim(string &)
Read a verbatim string (excluding block delimiters).
errorManipArg< error, int > exit(error &err, const int errNo=1)
Istream & readVariable(string &)
Read a variable name (includes '{')
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if succesful.
virtual Istream & read(token &)
Return next token from stream.
virtual ios_base::fmtflags flags() const
Return flags of output stream.
const dimensionedScalar c
Speed of light in a vacuum.
virtual Istream & rewind()
Rewind and return the stream so that it may be read again.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
bool good() const
Return true if next operation might succeed.
bool getBack(token &)
Get the put back token if there is one and return true.