34 char Foam::ISstream::nextValid()
62 while (
get(c) && c !=
'\n')
71 if (
get(c) && c ==
'*')
112 void Foam::ISstream::readWordToken(token& t)
114 word* wPtr =
new word;
147 char c = nextValid();
188 string* sPtr =
new string;
217 if (readVerbatim(*vsPtr).
bad())
266 if (readVariable(*vPtr).
bad())
288 case '0' :
case '1' :
case '2' :
case '3' :
case '4' :
289 case '5' :
case '6' :
case '7' :
case '8' :
case '9' :
291 bool asLabel = (c !=
'.');
313 asLabel = isdigit(c);
330 if (buf_.
size() == 2 && buf_[0] ==
'-')
427 buf_.
data()[bufErrorLength] = buf_.
last() =
'\0';
430 <<
"problem while reading word '" << buf_.
cdata() <<
"...' after " 431 << buf_.
size() <<
" characters\n" 440 <<
"invalid first character found : " << c
462 <<
"cannot read start of string" 472 <<
"Incorrect start of string character found : " << c
478 bool escaped =
false;
507 buf_.
data()[bufErrorLength] = buf_.
last() =
'\0';
510 <<
"found '\\n' while reading string \"" 511 << buf_.
cdata() <<
"...\"" 530 buf_.
data()[bufErrorLength] = buf_.
last() =
'\0';
533 <<
"problem while reading string \"" << buf_.
cdata() <<
"...\"" 546 if (!
get(c) || c !=
'$')
549 <<
"invalid first character found : " << c
623 buf_.
data()[bufErrorLength] = buf_.
last() =
'\0';
626 <<
"problem while reading string '" << buf_.
cdata() <<
"...' after " 627 << buf_.
size() <<
" characters\n" 636 <<
"invalid first character found : " << c
682 buf_.
data()[bufErrorLength] = buf_.
last() =
'\0';
685 <<
"problem while reading string \"" << buf_.
cdata() <<
"...\"" 698 if (continuation && s.size())
700 while (s.back() ==
'\\')
703 getline(is_, contLine);
746 if (
bad() || listDepth != 0)
749 <<
" problem while reading delimited string \n" 750 << str.c_str() <<
endl 807 <<
"stream format not binary" 812 is_.read(buf, count);
A class for handling verbatimStrings, derived from string.
Istream & readBegin(const char *funcName)
static bool valid(char)
Is this character valid for a variable.
static bool valid(char)
Is this character valid for a word.
Istream & readList(string &)
Read a '(...)' delimited set of characters into a string.
bool empty() const
Return true if the UList is empty (ie, size() is zero)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
errorManipArg< error, int > exit(error &err, const int errNo=1)
bool bad() const
Return true if stream is corrupted.
const T * cdata() const
Return a const pointer to the first data element,.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
void size(const label)
Override size to be inconsistent with allocated storage.
A token holds items read from Istream.
Ostream & endl(Ostream &os)
Add newline and flush stream.
label count(const ListType &l, typename ListType::const_reference x)
Count the number of occurrences of a value in a list.
label lineNumber() const
Return current stream line number.
virtual Istream & read(token &)
Return next token from stream.
const dimensionedScalar c
Speed of light in a vacuum.
bool good() const
Return true if next operation might succeed.
virtual ios_base::fmtflags flags() const
Return flags of output stream.
virtual Istream & rewind()
Rewind and return the stream so that it may be read again.
Istream & readEnd(const char *funcName)
bool read(const char *, int32_t &)
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
A functionName is a word starting with '#'.
A class for handling words, derived from string.
float floatScalar
Float precision floating point scalar type.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
punctuationToken
Standard punctuation tokens.
double doubleScalar
Double precision floating point scalar type.
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if successful.
streamFormat format() const
Return current stream format.
Istream & readBlock(string &)
Read a '{...}' delimited set of characters into a string.
virtual istream & stdStream()
Access to underlying std::istream.
static bool isCompound(const word &name)
Return true if name is a compound type.
long double longDoubleScalar
Lang double precision floating point scalar type.
ISstream & putback(const char &)
Low-level putback character function.
T remove()
Remove and return the top element.
T * data()
Return a pointer to the first data element,.
ISstream & getLine(string &, const bool continuation=true)
Read line into a string.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
bool getBack(token &)
Get the put back token if there is one and return true.
void setState(ios_base::iostate state)
Set stream state.
T & last()
Return the last element of the list.
void clear()
Clear the addressed list, i.e. set the size to zero.
A class for handling character strings derived from std::string.
static autoPtr< compound > New(const word &type, Istream &)
Select null constructed.
A variable is a word with support for additional characters, in particular '$' and '/'...