Go to the documentation of this file.
36 <<
"No " << Type::typeName <<
" available, deactivating " <<
name_
49 const word& entryName,
50 const Type& defaultValue
53 Type result = defaultValue;
54 getProperty(entryName, result);
62 const word& entryName,
66 getObjectProperty(name_, entryName, value);
73 const word& entryName,
77 setObjectProperty(name_, entryName, value);
84 const word& objectName,
85 const word& entryName,
86 const Type& defaultValue
89 Type result = defaultValue;
90 getObjectProperty(objectName, entryName, result);
98 const word& objectName,
99 const word& entryName,
103 if (stateDict_.found(objectName))
106 if (baseDict.
found(entryName))
108 if (baseDict.
isDict(entryName))
110 value = baseDict.
subDict(entryName);
114 baseDict.
lookup(entryName) >> value;
124 const word& objectName,
125 const word& entryName,
129 if (!stateDict_.found(objectName))
135 baseDict.
add(entryName, value,
true);
142 const word& entryName,
146 setObjectResult(name_, entryName, value);
153 const word& objectName,
154 const word& entryName,
158 if (!stateDict_.found(resultsName_))
165 if (!resultsDict.
found(objectName))
174 if (!objectDict.
found(dictTypeName))
181 resultTypeDict.
add(entryName, value,
true);
188 const word& entryName,
189 const Type& defaultValue
192 return getObjectResult(name_, entryName, defaultValue);
199 const word& objectName,
200 const word& entryName,
201 const Type& defaultValue
204 Type result = defaultValue;
205 getObjectResult(objectName, entryName, result);
213 const word& objectName,
214 const word& entryName,
218 if (stateDict_.found(resultsName_))
222 if (resultsDict.
found(objectName))
228 if (objectDict.
found(dictTypeName))
231 objectDict.
subDict(dictTypeName);
A class for handling words, derived from string.
Type getProperty(const word &entryName, const Type &defaultValue=pTraits< Type >::zero) const
Retrieve generic property.
bool readIfPresent(const word &, T &, bool recursive=false, bool patternMatch=true) const
Find an entry if present, and assign to T.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
bool setActive()
Set the active status by querying objectRegistry type.
Ostream & endl(Ostream &os)
Add newline and flush stream.
bool isDict(const word &) const
Check if entry is a sub-dictionary.
void setProperty(const word &entryName, const Type &value)
Add generic property.
void setObjectResult(const word &objectName, const word &entryName, const Type &value)
Add result from named object.
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
Type getResult(const word &entryName, const Type &defaultValue=pTraits< Type >::zero) const
Retrieve result.
const objectRegistry & obr_
Reference to the database.
void setResult(const word &entryName, const Type &value)
Add result.
void setObjectProperty(const word &objectName, const word &entryName, const Type &value)
Add generic property from named object.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Type getObjectResult(const word &objectName, const word &entryName, const Type &defaultValue=pTraits< Type >::zero) const
Retrieve result from named object.
bool active_
Flag to indicate whether the object is active.
const word name_
Name of model.
Traits class for primitives.
Type getObjectProperty(const word &objectName, const word &entryName, const Type &defaultValue=pTraits< Type >::zero) const
Retrieve generic property from named object.
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
#define WarningInFunction
Report a warning using Foam::Warning.
bool add(entry *, bool mergeEntry=false)
Add a new entry.