50Foam::substitutionModels::environmentVariable::environmentVariable
61 for (
const auto&
e : entriesDict)
63 entries_.insert(
cleanKey(
e.keyword()),
string(
e.stream()));
75 return entries_.found(keyName);
85 if (!valid(key))
return false;
97 return entries_.sortedToc();
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
string & replaceAll(const std::string &s1, const std::string &s2, size_type pos=0)
Replace all occurrences of sub-string s1 with s2, beginning at pos in the string.
Base class for substitution models.
static word cleanKey(const string &str)
Clean the key text.
static string keyify(const word &w)
Return a key representation from a word.
The environmentVariable substitution model.
virtual bool apply(const word &key, string &buffer) const
Apply substitutions to this string buffer.
virtual bool valid(const word &keyName) const
Return true of model applies to this keyName.
virtual wordList keys() const
Return a word list of the keys.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
string getEnv(const std::string &envName)
Get environment value for given envName.
List< word > wordList
List of word.
bool env(const std::string &envName)
Deprecated(2020-05) check for existence of environment variable.