ENH: add remove objects handling in timeFunctionObject and regionFunctionObject

- makes it easier to implement functionObject or field object removal
This commit is contained in:
Mark Olesen
2019-02-08 17:47:45 +01:00
committed by Andrew Heather
parent 8f92fa016f
commit e2754962cc
19 changed files with 83 additions and 48 deletions

View File

@ -39,6 +39,22 @@ Foam::functionObjects::timeFunctionObject::timeFunctionObject
{}
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
void Foam::functionObjects::timeFunctionObject::clearOutputObjects
(
const wordList& objNames
)
{
objectRegistry& obr = storedObjects();
for (const word& objName : objNames)
{
obr.checkOut(objName);
}
}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::objectRegistry&

View File

@ -49,7 +49,7 @@ namespace functionObjects
{
/*---------------------------------------------------------------------------*\
Class functionObjects::timeFunctionObject Declaration
Class timeFunctionObject Declaration
\*---------------------------------------------------------------------------*/
class timeFunctionObject
@ -66,6 +66,10 @@ protected:
// Protected Member Functions
//- Remove specified items from "functionObjectObjects"
void clearOutputObjects(const wordList& objNames);
//- No copy construct
timeFunctionObject(const timeFunctionObject&) = delete;
@ -77,7 +81,7 @@ public:
// Constructors
//- Construct from components
//- Construct from Time
timeFunctionObject(const word& name, const Time& runTime);