33 const word& entryName,
34 const Type& defaultValue
37 Type result = defaultValue;
52 const word& entryName,
56 if (properties_.found(baseName_))
67 const word& entryName,
71 if (properties_.found(baseName_))
74 baseDict.
add(entryName, value,
true);
79 properties_.subDict(baseName_).add(entryName, value);
87 const word& entryName,
91 if (properties_.found(baseName_))
95 if (inLine() && baseDict.
found(modelName_))
99 else if (baseDict.
found(modelType_))
112 const word& entryName,
113 const Type& defaultValue
116 Type result = defaultValue;
117 getModelProperty(entryName, result);
125 const word& entryName,
129 if (properties_.found(baseName_))
135 if (baseDict.
found(modelName_))
137 baseDict.
subDict(modelName_).
add(entryName, value,
true);
142 baseDict.
subDict(modelName_).
add(entryName, value,
true);
147 if (baseDict.
found(modelType_))
149 baseDict.
subDict(modelType_).
add(entryName, value,
true);
154 baseDict.
subDict(modelType_).
add(entryName, value,
true);
164 properties_.subDict(baseName_).add(modelName_,
dictionary());
165 properties_.subDict(baseName_).subDict(modelName_).add
173 properties_.subDict(baseName_).add(modelType_,
dictionary());
174 properties_.subDict(baseName_).subDict(modelType_).add
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
const dictionary & subDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary.
bool found(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Search for an entry (const access) with the given keyword.
bool readIfPresent(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX) const
entry * add(entry *entryPtr, bool mergeEntry=false)
Add a new entry.
bool getModelProperty(const word &entryName, Type &value) const
Retrieve generic property from the sub-model.
Type getBaseProperty(const word &entryName, const Type &defaultValue=Type(Zero)) const
Retrieve generic property from the base model.
const word baseName_
Name of the sub-model base class.
void setBaseProperty(const word &entryName, const Type &value)
Add generic property to the base model.
dictionary & properties_
Reference to properties dictionary e.g. for restart.
void setModelProperty(const word &entryName, const Type &value)
Add generic property to the sub-model.
A class for handling words, derived from Foam::string.