mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
expose name of functionObjects
This commit is contained in:
@ -36,7 +36,9 @@ int Foam::functionObject::debug(Foam::debug::debugSwitch("functionObject", 0));
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::functionObject::functionObject()
|
||||
Foam::functionObject::functionObject(const word& name)
|
||||
:
|
||||
name_(name)
|
||||
{}
|
||||
|
||||
|
||||
@ -103,6 +105,12 @@ Foam::functionObject::~functionObject()
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
const Foam::word& Foam::functionObject::name() const
|
||||
{
|
||||
return name_;
|
||||
}
|
||||
|
||||
|
||||
bool Foam::functionObject::end()
|
||||
{
|
||||
return execute();
|
||||
|
||||
@ -57,6 +57,12 @@ class Time;
|
||||
|
||||
class functionObject
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Name
|
||||
const word name_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
@ -88,8 +94,8 @@ public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct null
|
||||
functionObject();
|
||||
//- Construct from components
|
||||
functionObject(const word& name);
|
||||
|
||||
//- Return clone
|
||||
autoPtr<functionObject> clone() const
|
||||
@ -137,6 +143,9 @@ public:
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Name
|
||||
virtual const word& name() const;
|
||||
|
||||
//- Called at the start of the time-loop
|
||||
virtual bool start() = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user