ENH: add remove objects handling in timeFunctionObject and regionFunctionObject
- makes it easier to implement functionObject or field object removal
This commit is contained in:
committed by
Andrew Heather
parent
8f92fa016f
commit
e2754962cc
@ -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&
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user