- cfindObject() for const pointer access. - getObject() for mutable non-const pointer access, similar to the objectRegistry::getObjectPtr() - cfindObject(), findObject(), getObject() with template type access to also check the headerClassName. For example, cfindObject("U") -> good cfindObject<volVectorField>("U") -> good cfindObject<volScalarField>("U") -> nullptr This allows inversion of looping logic. 1) Obtain the names for a particular Type for (const word& objName : objs.sortedNames<Type>()) { const IOobject* io = objs[objName]; ... } 2) Use previously obtained names and apply to a particular Type for (const word& objName : someListOfNames) { const IOobject* io = objs.cfindObject<Type>(objName); if (io) { ... } } |
||
---|---|---|
.. | ||
dataConversion | ||
graphics | ||
lagrangian | ||
lumped | ||
miscellaneous | ||
noise | ||
postProcess |