31 const word& entryName,
32 const Type& defaultValue
35 Type result = defaultValue;
37 if (properties_.found(baseName_))
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
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
void getModelProperty(const word &entryName, Type &value) const
Retrieve generic property from the sub-model.
A list of keyword definitions, which are a keyword followed by any number of values (e...
bool add(entry *, bool mergeEntry=false)
Add a new entry.
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
void setModelProperty(const word &entryName, const Type &value)
Add generic property to the sub-model.
A class for handling words, derived from string.
bool readIfPresent(const word &, T &, bool recursive=false, bool patternMatch=true) const
Find an entry if present, and assign to T.
void setBaseProperty(const word &entryName, const Type &value)
Add generic property to the base model.
Type getBaseProperty(const word &entryName, const Type &defaultValue=pTraits< Type >::zero) const
Retrieve generic property from the base model.