44 for (
const token& tok : toks)
72 const auto&
s = tok.stringToken();
73 if (
s.starts_with(
"//") && !
s.ends_with(
'\n'))
99 token(token::tokenType::CHAR_DATA, std::string(
s, len));
107 const std::string& content
121 std::string&& content
A class for handling keywords in dictionaries.
virtual Ostream & write(const char c) override
Write character.
A token holds an item read from Istream.
T & front()
Access first element of the list, position [0].
formattingEntry(const keyType &key, const char *s, std::streamsize len)
Construct with character data, using the provided keyword.
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
A keyword and a list of tokens comprise a primitiveEntry. A primitiveEntry can be read...
auto key(const Type &t) -> std::enable_if_t< std::is_enum_v< Type >, std::underlying_type_t< Type > >
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
An Ostream is an abstract base class for all output systems (streams, files, token lists...
OBJstream os(runTime.globalPath()/outputName)
virtual void write(Ostream &os) const
Write content without the keyword.
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.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))
static void writeTokens(Ostream &os, const UList< token > &toks)