Commit dedabab1 authored by mattijs's avatar mattijs
Browse files

expose name of functionObjects

parent 18fef89f
......@@ -50,8 +50,7 @@ Foam::OutputFilterFunctionObject<OutputFilter>::OutputFilterFunctionObject
const dictionary& dict
)
:
functionObject(),
name_(name),
functionObject(name),
time_(t),
dict_(dict),
regionName_(polyMesh::defaultRegion),
......@@ -92,7 +91,7 @@ bool Foam::OutputFilterFunctionObject<OutputFilter>::start()
(
new IOOutputFilter<OutputFilter>
(
name_,
name(),
time_.lookupObject<objectRegistry>(regionName_),
dictName_
)
......@@ -104,7 +103,7 @@ bool Foam::OutputFilterFunctionObject<OutputFilter>::start()
(
new OutputFilter
(
name_,
name(),
time_.lookupObject<objectRegistry>(regionName_),
dict_
)
......
......@@ -63,9 +63,6 @@ class OutputFilterFunctionObject
{
// Private data
//- Output filter name
word name_;
//- Reference to the time database
const Time& time_;
......@@ -121,12 +118,6 @@ public:
// Access
//- Return name
virtual const word& name() const
{
return name_;
}
//- Return time database
virtual const Time& time() const
{
......
......@@ -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;
......
......@@ -133,6 +133,9 @@ public:
//- Return true if the List is empty (ie, size() is zero).
using PtrList<functionObject>::empty;
//- Access to the functionObjects
using PtrList<functionObject>::operator[];
//- Clear the list of function objects
virtual void clear();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment