mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
functionObjects: Moved into the functionObjects namespace and rationalized and simplified failable construction
Rather than requiring each functionObject to handle failed construction internally (using the active_ flag) the static member function "viable" is provided which returns true if construction of the functionObject is likely to be successful. Failed construction is then handled by the wrapper-class which constructs the functionObject, e.g. "OutputFilterFunctionObject".
This commit is contained in:
@ -107,8 +107,7 @@ Foam::functionObjects::writeDictionary::writeDictionary
|
||||
}
|
||||
|
||||
|
||||
Foam::autoPtr<Foam::functionObjects::writeDictionary>
|
||||
Foam::functionObjects::writeDictionary::New
|
||||
bool Foam::functionObjects::writeDictionary::viable
|
||||
(
|
||||
const word& name,
|
||||
const objectRegistry& obr,
|
||||
@ -116,10 +115,7 @@ Foam::functionObjects::writeDictionary::New
|
||||
const bool loadFromFiles
|
||||
)
|
||||
{
|
||||
return autoPtr<writeDictionary>
|
||||
(
|
||||
new writeDictionary(name, obr, dict, loadFromFiles)
|
||||
);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user