Lumiera
0.pre.03
»edit your freedom«
|
#include "vault/gear/activity-term.hpp"
A Term of the »Activity Language«, describing the steps necessary to perform the calculation of a single frame or similar tasks.
Definition at line 93 of file activity-term.hpp.
Public Types | |
enum | Template { CALC_JOB, LOAD_JOB, META_JOB } |
Public Member Functions | |
Term (AllocHandle &&allocHandle, Template kind, Time start, Time dead, Job job) | |
Term & | appendNotificationTo (Term &targetTerm, bool unlimitedTime=false) |
Builder operation: append a Notification link to the end of this Term's chain. More... | |
Activity & | callback () |
Term & | expectNotification (Activity ¬ificationSrc, bool unlimitedTime=false) |
Builder operation: block this Term waiting for prerequisite notification. More... | |
operator std::string () const | |
Activity & | post () |
Term & | requireDirectActivation () |
Insert a self-inhibition to enforce activation is possible only after the scheduled start time. More... | |
Private Types | |
using | AllocHandle = BlockFlowAlloc::AllocatorHandle |
Private Member Functions | |
void | configureTemplate (Template kind) |
void | insertWorkBracket () |
void | setupGate () |
Activity * | setupInvocation (Job &job) |
Activity * | setupPost (Time start, Time dead, Activity *followUp) |
void | severAsyncChain () |
Static Private Member Functions | |
static Activity * | findTail (Activity *chain) |
static void | insert (Activity *anchor, Activity *target) |
Private Attributes | |
AllocHandle | alloc_ |
Activity * | callback_ {nullptr} |
Activity * | gate_ {nullptr} |
Activity * | invoke_ {nullptr} |
Activity * | post_ {nullptr} |
enum Template |
Enumerator | |
---|---|
CALC_JOB | scheme for a synchronous media calculation job |
LOAD_JOB | scheme for an asynchronous data retrieval job |
META_JOB | scheme for planning and organisational job |
Definition at line 108 of file activity-term.hpp.
|
inline |
Definition at line 138 of file activity-term.hpp.
Referenced by Scheduler::continueMetaJob().
|
inline |
Definition at line 149 of file activity-term.hpp.
References Term::callback_.
Builder operation: block this Term waiting for prerequisite notification.
notificationSrc | an NOTIFY -Activity to attach the notification-link |
GATE
-Activity (if not already present) and to increase the Gate's latch counter. Moreover, the Argument, must be a NOTIFY
and will be modified to store the link to this receiving Gate; typically this function is actually invoked starting from the other Term — the prerequisite — by invoking #appendNotificationTo(targetTerm). Definition at line 165 of file activity-term.hpp.
References Time::ANYTIME, and Activity::NOTIFY.
Referenced by Term::appendNotificationTo(), and Term::requireDirectActivation().
Builder operation: append a Notification link to the end of this Term's chain.
NOTIFY
. Definition at line 182 of file activity-term.hpp.
References Term::callback_, Term::expectNotification(), and Activity::NOTIFY.
|
inline |
Insert a self-inhibition to enforce activation is possible only after the scheduled start time.
Relevant for Jobs, which are to be triggered by external events, while the actual computation must not be start prior to activating the main chain, even if all prerequisites are already fulfilled.
GroomingToken
, the dispatch()
actually happens synchronous and immediately processes the activated tail-chain in a nested call. Definition at line 210 of file activity-term.hpp.
References Term::CALC_JOB, Term::callback_, Term::expectNotification(), Activity::FEED, Activity::GATE, stage::widget::kind(), Term::LOAD_JOB, Term::META_JOB, Activity::next, Activity::NOTIFY, Activity::WORKSTART, and Activity::WORKSTOP.
|
private |
Definition at line 104 of file activity-term.hpp.
Referenced by Term::appendNotificationTo(), Term::callback(), and Term::requireDirectActivation().