relocate the JobClosure interface to be defined alongside of Job
This is necessary since the implementation of the job functions calls through the VTable of the interface JobClosure. Thus this interface (and the VTable definition) needs to reside within some compilation unit linked together with the basic job class. TODO: move class Job entirely into the Backend
This commit is contained in:
parent
56be672358
commit
082822fde8
4 changed files with 42 additions and 24 deletions
|
|
@ -45,7 +45,6 @@ namespace engine {
|
|||
// using mobject::session::Effect;
|
||||
|
||||
|
||||
JobClosure::~JobClosure() { }
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -52,28 +52,6 @@ using util::isnil;
|
|||
//
|
||||
//class ExitNode;
|
||||
|
||||
/**
|
||||
* a job closure represents the execution context of a job.
|
||||
* This allows us to enqueue simple job-"functions" with the scheduler.
|
||||
* By virtue of the JobClosure-pointer, embedded into #lumiera_jobDefinition,
|
||||
* the invocation of such a job may re-gain the full context, including the
|
||||
* actual ProcNode to pull and further specifics, like the media channel.
|
||||
*/
|
||||
class JobClosure
|
||||
: public lumiera_jobClosure
|
||||
{
|
||||
public:
|
||||
virtual ~JobClosure(); ///< this is an interface
|
||||
|
||||
|
||||
virtual void invokeJobOperation (JobParameter parameter) =0;
|
||||
virtual void signalFailure (JobParameter parameter) =0;
|
||||
|
||||
virtual JobKind getJobKind() const =0;
|
||||
virtual bool verify (Time nominalJobTime) const =0;
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* execution plan for pulling a specific exit node.
|
||||
|
|
|
|||
|
|
@ -57,6 +57,18 @@ namespace engine {
|
|||
// using mobject::session::Effect;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* emit the VTable for JobClosure within this compilation unit,
|
||||
* which is still part of the backend. The actual job implementation
|
||||
* classes are defined in the Proc-Layer
|
||||
*/
|
||||
JobClosure::~JobClosure() { }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/** @todo WIP-WIP 2/12
|
||||
*/
|
||||
void
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ namespace engine {
|
|||
|
||||
|
||||
/**
|
||||
* Frame rendering task, represented as closure.
|
||||
* Individual frame rendering task, forwarding to a closure.
|
||||
* This functor encodes all information necessary to trigger
|
||||
* and invoke the actual rendering operation. It will be embedded
|
||||
* by value into a job descriptor and then enqueued with the scheduler
|
||||
|
|
@ -182,6 +182,35 @@ namespace engine {
|
|||
};
|
||||
|
||||
|
||||
/**
|
||||
* Interface of the closure for frame rendering jobs.
|
||||
* Hidden behind this interface resides all of the context re-building
|
||||
* and invocation mechanics to get the actual calculations going. While
|
||||
* the job descriptor, as handled by the scheduler, contains the variable
|
||||
* "moving parts", the corresponding job closure represents the execution
|
||||
* context of a job and is shared between several jobs within the same
|
||||
* segment of the timeline.
|
||||
*
|
||||
* This allows us to enqueue simple job-"functions" with the scheduler.
|
||||
* By virtue of the JobClosure-pointer, embedded into #lumiera_jobDefinition,
|
||||
* the invocation of such a job may re-gain the full context, including the
|
||||
* actual ProcNode to pull and further specifics, like the media channel.
|
||||
*/
|
||||
class JobClosure
|
||||
: public lumiera_jobClosure
|
||||
{
|
||||
public:
|
||||
virtual ~JobClosure(); ///< this is an interface
|
||||
|
||||
|
||||
virtual void invokeJobOperation (JobParameter parameter) =0;
|
||||
virtual void signalFailure (JobParameter parameter) =0;
|
||||
|
||||
virtual JobKind getJobKind() const =0;
|
||||
virtual bool verify (Time nominalJobTime) const =0;
|
||||
};
|
||||
|
||||
|
||||
}} // namespace proc::engine
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue