48 if (!std::isspace(c) && std::isprint(c))
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().emplace_back().int32Token(val);
131 tokens().emplace_back().int64Token(val);
138 tokens().emplace_back().uint32Token(val);
146 tokens().emplace_back().uint64Token(val);
153 tokens().emplace_back().floatToken(val);
160 tokens().emplace_back().doubleToken(val);
182 std::streamsize count
209 os <<
"OTstream : " <<
name().c_str() <<
", " << size() <<
" tokens, ";
void push_back(const T &val)
Copy append an element to the end of this list.
virtual void print(Ostream &os) const
Print stream description to Ostream.
virtual Ostream & writeQuoted(const char *str, std::streamsize len, const bool quoted=true) override
Write character/string content, with/without surrounding quotes.
void print(Ostream &os) const override
Print stream description to Ostream.
const DynamicList< token > & tokens() const noexcept
The tokens.
virtual Ostream & writeRaw(const char *data, std::streamsize count) override
Low-level raw binary output.
virtual bool beginRawWrite(std::streamsize count) override
Begin marker for low-level raw binary output.
virtual bool write(const token &tok) override
Write token to stream or otherwise handle it.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Ostream(const Ostream &)=default
Copy construct.
T * data() noexcept
Return pointer to the underlying array serving as data storage.
void size(const label n)
Older name for setAddressableSize.
A class for handling character strings derived from std::string.
static StringType validate(const std::string &str)
Return a valid String from the given string.
A token holds an item read from Istream.
punctuationToken
Standard punctuation tokens (a character).
bool good() const noexcept
True if token is not UNDEFINED or ERROR.
A class for handling words, derived from Foam::string.
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
OBJstream os(runTime.globalPath()/outputName)