33 const Foam::word Foam::functionObjects::properties::resultsName_ =
61 const word& objectName
64 return found(objectName);
70 const word& objectName
73 if (!
found(objectName))
78 return subDict(objectName);
84 remove(
"triggerIndex");
102 if (triggeri != getTrigger())
104 set(
"triggerIndex", triggeri);
116 const word& objectName,
117 const word& entryName
122 return (dictptr && dictptr->
found(entryName));
128 const word& objectName,
129 const word& entryName,
133 const dictionary* dictptr = findDict(objectName);
137 dictptr = dictptr->
findDict(entryName);
152 const word& objectName,
156 const dictionary* dictptr = findDict(resultsName_);
175 const word& objectName
178 const dictionary* dictptr = findDict(resultsName_);
180 return (dictptr && dictptr->
found(objectName));
186 if (
found(resultsName_))
188 return subDict(resultsName_).sortedToc();
197 const word& objectName,
198 const word& entryName
201 if (
found(resultsName_))
203 const dictionary& resultsDict = subDict(resultsName_);
205 if (resultsDict.
found(objectName))
209 for (
const entry& dEntry : objectDict)
213 if (
dict.found(entryName))
227 const word& objectName,
228 const word& entryName
231 if (
found(resultsName_))
233 const dictionary& resultsDict = subDict(resultsName_);
235 if (resultsDict.
found(objectName))
239 for (
const entry& dEntry : objectDict)
243 if (
dict.found(entryName))
245 return dict.dictName();
257 const word& objectName
262 if (
found(resultsName_))
264 const dictionary& resultsDict = subDict(resultsName_);
266 if (resultsDict.
found(objectName))
270 for (
const entry& dEntry : objectDict)
288 const word& objectName,
292 if (
found(resultsName_))
294 const dictionary& resultsDict = subDict(resultsName_);
296 if (resultsDict.
found(objectName))
302 os <<
" Type: " << dataFormat <<
nl;
308 os <<
" " << result <<
nl;
321 if (
found(resultsName_))
323 const dictionary& resultsDict = subDict(resultsName_);
325 for (
const word& objectName : resultsDict.sortedToc())
327 os <<
"Object: " << objectName <<
endl;
329 writeResultEntries(objectName,
os);
std::string str(const bool prefixed=false) const
The digest (40-byte) text representation, optionally with '_' prefix.
properties(const properties &)=delete
No copy construct.
void transfer(List< T > &list)
Transfer the contents of the argument List into this list and annul the argument list.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
dictionary & getObjectDict(const word &objectName)
Get dictionary for named object. Creates one if required.
wordList objectNames() const
Return list of object names.
constexpr char nl
The newline '\n' character (0x0a)
label getTrigger() const
Get the current trigger index.
Ostream & endl(Ostream &os)
Add newline and flush stream.
void writeAllResultEntries(Ostream &os) const
Write the results entries for all objects to stream.
wordList objectResultEntries(const word &objectName) const
Return result entries for named object.
bool foundObjectProperty(const word &objectName, const word &entryName) const
Return true if the property exists.
bool setTrigger(const label triggeri)
Set new trigger index.
const dictionary & subDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary.
wordList objectResultNames() const
Return list of objects with results.
bool found(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find an entry (const access) with the given keyword.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
void writeResultEntries(Ostream &os) const
Write the results entries for all objects to stream.
bool hasResultObjectEntry(const word &objectName, const word &entryName) const
Return true if the object with objectName exists and has entryName in its results.
void clearTrigger()
Remove the trigger index from the properties.
A class for handling words, derived from Foam::string.
static const word null
An empty word.
bool hasObjectDict(const word &objectName) const
Return true if the object with objectName exists.
void append(const T &val)
Copy append an element to the end of this list.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
bool hasResultObject(const word &objectName) const
Return true if the object with objectName exists in results.
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)
List< word > wordList
List of word.
word objectResultType(const word &objectName, const word &entryName) const
Return the type of result.
meshDefDict readIfPresent("polyMeshPatches", polyPatchNames)
Functions to compute SHA1 message digest according to the NIST specification FIPS-180-1.
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, IOobject::NO_REGISTER)
bool getObjectResultDict(const word &objectName, dictionary &dict) const
Get dictionary of object results, return true if set.
Defines the attributes of an object for which implicit objectRegistry management is supported...
wordList sortedToc() const
Return the sorted table of contents.
A keyword and a list of tokens is an 'entry'.
const dictionary * findDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary pointer if present (and it is a dictionary) otherwise return nullptr...