Go to the documentation of this file.
64 std::ostringstream buf;
67 return word(buf.str(),
false);
73 char* endptr =
nullptr;
103 char* endptr =
nullptr;
142 <<
"Bad token - could not get scalar value"
155 <<
"Wrong token type - expected scalar value, found "
static const Scalar vsmall
A class for handling words, derived from Foam::string.
Scalar ScalarRead(const char *buf)
Parse entire buffer as a float/double, skipping leading/trailing whitespace.
bool isNumber() const
Token is LABEL, FLOAT or DOUBLE.
errorType checkConversion(const char *buf, char *endptr)
Sanity check after strtof, strtod, etc.
Istream & operator>>(Istream &, directionInfo &)
A token holds an item read from Istream.
bool good() const
True if token is not UNDEFINED or ERROR.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
scalar number() const
Return label, float or double value.
InfoProxy< token > info() const
Return info proxy for printing token information to a stream.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
static const char *const typeName
pTraits(const PrimitiveType &p)
Copy construct from primitive.
word name(const complex &c)
Return string representation of complex.
static const Scalar rootMax
const Foam::Enum< errorType > errorNames
Strings corresponding to the errorType.
errorType
Enumeration for possible parsing error.
virtual bool check(const char *operation) const
Check IOstream status for given operation.
virtual bool write(const token &tok)=0
Write token to stream or otherwise handle it.
errorManipArg< error, int > exit(error &err, const int errNo=1)
static const char *const componentNames[]
void setBad()
Set stream to be bad.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
static const Scalar rootMin