68 tokens().emplace_back() = string(str, len);
75 token::tokenType::WORD,
86 word nonWhiteChars(string::validate<word>(str));
88 if (nonWhiteChars.size() == 1)
91 write(nonWhiteChars[0]);
93 else if (nonWhiteChars.size())
96 tokens().emplace_back() = std::move(nonWhiteChars);
106 tokens().emplace_back() = str;
123 tokens().push_back(
token(label(val)));
131 tokens().push_back(
token(label(val)));
139 tokens().push_back(
token(val));
147 tokens().push_back(
token(val));
170 std::streamsize
count 197 os <<
"OTstream : " <<
name().c_str() <<
", " << size() <<
" tokens, ";
bool good() const noexcept
True if token is not UNDEFINED or ERROR.
A token holds an item read from Istream.
virtual bool beginRawWrite(std::streamsize count) override
Begin marker for low-level raw binary output.
const DynamicList< token > & tokens() const noexcept
The tokens.
void write(vtk::formatter &fmt, const Type &val, const label n=1)
Component-wise write of a value (N times)
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
virtual bool write(const token &tok) override
Write token to stream or otherwise handle it.
virtual Ostream & writeRaw(const char *data, std::streamsize count) override
Low-level raw binary output.
punctuationToken
Standard punctuation tokens (a character)
virtual Ostream & writeQuoted(const char *str, std::streamsize len, const bool quoted=true) override
Write character/string content, with/without surrounding quotes.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
OBJstream os(runTime.globalPath()/outputName)
virtual void print(Ostream &os) const
Print stream description to Ostream.
void push_back(const T &val)
Copy append an element to the end of this list.
const dimensionedScalar c
Speed of light in a vacuum.
void print(Ostream &os) const override
Print stream description to Ostream.
bool isspace(char c) noexcept
Test for whitespace (C-locale)
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
A class for handling character strings derived from std::string.