43 #ifndef Foam_expressions_exprString_H 44 #define Foam_expressions_exprString_H 78 inline explicit exprString(
const std::string&
s,
bool doCheck=
true);
81 inline explicit exprString(std::string&&
s,
bool doCheck=
true);
84 inline explicit exprString(
const char*
s,
bool doCheck=
true);
91 const word& entryName,
93 const bool mandatory =
true 102 const bool stripComments =
true 126 const std::string& str,
128 const bool stripComments =
true 139 const bool stripComments =
true 155 const bool stripComments =
true 162 inline bool valid()
const;
217 bool writeEmpty =
false
bool readEntry(const word &keyword, const dictionary &dict, IOobjectOption::readOption readOpt=IOobjectOption::MUST_READ)
Read/expand entry with dictionary variables, and strip any embedded C/C++ comments from the input...
bool valid() const
Check for unexpanded '$' entries. Fatal if any exist.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
void expand(const dictionary &dict, const bool stripComments=true)
Inplace expansion with dictionary variables, and strip any embedded C/C++ comments.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
static void inplaceExpand(std::string &str, const dictionary &dict, const bool stripComments=true)
Inplace expansion with dictionary variables, and strip any embedded C/C++ comments.
exprString & operator=(const exprString &str)=default
Copy assign.
exprString()=default
Default construct.
void trim()
Inplace trim leading and trailing whitespace.
A class for handling words, derived from Foam::string.
A variant of Foam::string with expansion of dictionary variables into a comma-separated form...
~exprString()=default
Destructor.
bool readIfPresent(const word &keyword, const dictionary &dict)
Read/expand optional entry with dictionary variables, and strip any embedded C/C++ comments from the ...
An Ostream is an abstract base class for all output systems (streams, files, token lists...
OBJstream os(runTime.globalPath()/outputName)
Hashing functor for string and derived string classes.
Hash function class. The default definition is for primitives. Non-primitives used to hash entries on...
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))
A class for handling character strings derived from std::string.
bool writeEntry(const word &keyword, Ostream &os, bool writeEmpty=false) const
Dictionary entry for expression string, normally suppressing empty strings. Generally uses verbatim o...
static exprString toExpr(const std::string &str)
Copy convert string to exprString.
readOption
Enumeration defining read preferences.