31 const word& entryName,
32 const Type& defaultValue
35 Type result = defaultValue;
50 const word& entryName,
54 if (properties_.found(baseName_))
65 const word& entryName,
69 if (properties_.found(baseName_))
72 baseDict.
add(entryName, value,
true);
77 properties_.subDict(baseName_).add(entryName, value);
85 const word& entryName,
89 if (properties_.found(baseName_))
93 if (inLine() && baseDict.
found(modelName_))
97 else if (baseDict.
found(modelType_))
108 const word& entryName,
109 const Type& defaultValue
112 Type result = defaultValue;
113 getModelProperty(entryName, result);
121 const word& entryName,
125 if (properties_.found(baseName_))
131 if (baseDict.
found(modelName_))
133 baseDict.
subDict(modelName_).
add(entryName, value,
true);
138 baseDict.
subDict(modelName_).
add(entryName, value,
true);
143 if (baseDict.
found(modelType_))
145 baseDict.
subDict(modelType_).
add(entryName, value,
true);
150 baseDict.
subDict(modelType_).
add(entryName, value,
true);
160 properties_.subDict(baseName_).add(modelName_,
dictionary());
161 properties_.subDict(baseName_).subDict(modelName_).add
169 properties_.subDict(baseName_).add(modelType_,
dictionary());
170 properties_.subDict(baseName_).subDict(modelType_).add
A list of keyword definitions, which are a keyword followed by any number of values (e....
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
bool add(entry *, bool mergeEntry=false)
Add a new entry.
bool readIfPresent(const word &, T &, bool recursive=false, bool patternMatch=true) const
Find an entry if present, and assign to T.
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
Type getBaseProperty(const word &entryName, const Type &defaultValue=pTraits< Type >::zero) const
Retrieve generic property from the base model.
void getModelProperty(const word &entryName, Type &value) const
Retrieve generic property from the sub-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 string.