Go to the documentation of this file.
33 const Foam::word Foam::functionObjects::properties::resultsName_ =
34 SHA1(
"results").str();
61 const word& objectName
64 return found(objectName);
70 const word& objectName
73 if (!
found(objectName))
78 return subDict(objectName);
84 remove(
"triggerIndex");
92 readIfPresent(
"triggerIndex", idx);
103 const label currTriggeri = getTrigger();
105 if (increaseOnly ? (triggeri > currTriggeri) : (triggeri != currTriggeri))
107 set(
"triggerIndex", triggeri);
119 const word& objectName,
120 const word& entryName
123 if (
found(objectName))
125 const dictionary& baseDict = subDict(objectName);
126 return baseDict.
found(entryName);
135 const word& objectName,
136 const word& entryName,
140 if (
found(objectName))
142 const dictionary& baseDict = subDict(objectName);
144 if (baseDict.
found(entryName) && baseDict.
isDict(entryName))
157 const word& objectName
160 if (
found(resultsName_))
162 return subDict(resultsName_).found(objectName);
171 if (
found(resultsName_))
173 return subDict(resultsName_).sortedToc();
182 const word& objectName,
183 const word& entryName
186 if (
found(resultsName_))
188 const dictionary& resultsDict = subDict(resultsName_);
190 if (resultsDict.
found(objectName))
194 for (
const entry& dEntry : objectDict)
198 if (
dict.found(entryName))
212 const word& objectName,
213 const word& entryName
216 if (
found(resultsName_))
218 const dictionary& resultsDict = subDict(resultsName_);
220 if (resultsDict.
found(objectName))
224 for (
const entry& dEntry : objectDict)
228 if (
dict.found(entryName))
230 return dict.dictName();
242 const word& objectName
247 if (
found(resultsName_))
249 const dictionary& resultsDict = subDict(resultsName_);
251 if (resultsDict.
found(objectName))
255 for (
const entry& dEntry : objectDict)
273 const word& objectName,
277 if (
found(resultsName_))
279 const dictionary& resultsDict = subDict(resultsName_);
281 if (resultsDict.
found(objectName))
287 os <<
" Type: " << dataFormat <<
nl;
293 os <<
" " << result <<
nl;
306 if (
found(resultsName_))
308 const dictionary& resultsDict = subDict(resultsName_);
312 os <<
"Object: " << objectName <<
endl;
314 writeResultEntries(objectName,
os);
A keyword and a list of tokens is an 'entry'.
bool hasObjectDict(const word &objectName) const
Return true if the object with objectName exists.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Defines the attributes of an object for which implicit objectRegistry management is supported,...
void set(List< bool > &bools, const labelRange &range)
Set the specified range 'on' in a boolList.
A class for handling words, derived from Foam::string.
bool found(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Search for an entry (const access) with the given keyword.
dictionary & getObjectDict(const word &objectName)
Get dictionary for named object. Creates one if required.
Ostream & endl(Ostream &os)
Add newline and flush stream.
bool hasResultObject(const word &objectName) const
Return true if the object with objectName exists in results.
label getTrigger() const
Get the current trigger index.
void clearTrigger()
Remove the trigger index from the properties.
List< word > wordList
A List of words.
bool foundObjectProperty(const word &objectName, const word &entryName) const
Return true if the property exists.
word objectResultType(const word &objectName, const word &entryName) const
Return the type of result.
DynamicList< T, SizeMin > & append(const T &val)
Append an element to the end of this list.
void transfer(List< T > &list)
const dictionary & subDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary.
properties(const properties &)=delete
No copy construct.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
void add(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
OBJstream os(runTime.globalPath()/outputName)
bool setTrigger(const label triggeri, bool increaseOnly=true)
Set the trigger index. Normally only if greater than current.
bool isDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Check if entry is found and is a sub-dictionary.
wordList objectResultNames() const
Return list of objects with results.
wordList objectNames() const
Return list of object names.
static const word null
An empty word.
void writeAllResultEntries(Ostream &os) const
Write the results entries for all objects to stream.
bool hasResultObjectEntry(const word &objectName, const word &entryName) const
void writeResultEntries(Ostream &os) const
Write the results entries for all objects to stream.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
wordList sortedToc() const
Return the sorted table of contents.
wordList objectResultEntries(const word &objectName) const
Return result entries for named object.