Lumiera  0.pre.03
»edit your freedom«
Hook Class Referenceabstract

#include "vault/gear/activity.hpp"

Description

Extension point to invoke a callback from Activity activation.

Remarks
referred from the Activity::Verb::HOOK
See also
ActivityDetector primary usage for testing

Definition at line 153 of file activity.hpp.

Public Member Functions

virtual ~Hook ()
 this is an interface
 
virtual Proc activation (Activity &thisHook, Time now, void *executionCtx)=0
 Callback on activation of the corresponding HOOK-Activity. More...
 
virtual std::string diagnostic () const
 
virtual Time getDeadline () const =0
 
virtual Proc notify (Activity &thisHook, Time now, void *executionCtx)=0
 Callback when dispatching a NOTIFY-Activity to thisHook.
 
 operator std::string () const
 

Member Function Documentation

◆ activation()

virtual Proc activation ( Activity thisHook,
Time  now,
void *  executionCtx 
)
pure virtual

Callback on activation of the corresponding HOOK-Activity.

Parameters
thisHookthe Activity record wired to this hook
nowcurrent »wall-clock-time« as used by the Scheduler
executionCtxopaque pointer to the actual execution context
Returns
decision how to proceed with the activation
Remarks
the intended use is to rig this callback based on additional knowledge regarding the usage context. Through thisHook, the follow-up chain is accessible, and an additional payload data field (size_t). Since the execution context is a concept, it is necessary to know the actual type of the concrete execution context and cast down in the implementation. This mechanism is used especially for detecting expected test invocations.

Implemented in ActivityDetector::ActivityProbe.

+ Inheritance diagram for Hook:
+ Collaboration diagram for Hook:

The documentation for this class was generated from the following files: