1#ifndef _DRAMA2_SPAWNABLE_INC
2#define _DRAMA2_SPAWNABLE_INC
28#include "drama/action.hh"
57 class Spawnable :
public ActionHandler {
66 Request MessageEvent(std::weak_ptr<Task>
task, Action *
action)
73 void InvokeActionEnd(std::weak_ptr<Task>
task, Action *
action,
84 std::weak_ptr<Task> _theTask;
125#ifdef RUNNING_DOXYGEN
160 virtual std::shared_ptr<Task>
GetTask()
const {
161 return std::shared_ptr<Task>(_theTask);
Class used by Obey and Kick handlers to indicate rescheduling requirements.
Definition request.hh:78
virtual MessageHandlerPtr Spawn()=0
An Action has been spawned, return a handler for the message.
virtual ~Spawnable()
Spawnable destructor.
Spawnable & operator=(Spawnable &&rhs)=default
Move operator.
Spawnable & operator=(const Spawnable &rhs)=delete
Copy operator deleted.
virtual std::shared_ptr< Task > GetTask() const
Returns a pointer to the task.
Definition spawnable.hh:187
Spawnable(Spawnable &&source)=default
Move assignment operator.
virtual void ActionEnd(MessageHandlerPtr obj)=0
Invoked when the spawned action has completed.
Spawnable(const Spawnable &source)=delete
Assignment operator deleted.
Spawnable()
Create a DRAMA spawnable action action handler object.
Definition spawnable.hh:121
A class which implements a Spawnable DRAMA Message Handler.
Definition spawnable.hh:84
DRAMA 2 include file - implements a class providing access to details on an action entry.
DRAMA 2 include file - Message Handler class definition.
void CreateRunDramaTask()
Create and run a DRAMA task, with standard exception handling.
Definition task.hh:1322
std::shared_ptr< Spawnable > SpawnablePtr
This type is used for passing Spawnable object addresses around.
Definition spawnable.hh:200
std::shared_ptr< MessageHandler > MessageHandlerPtr
This type is used for passing MessageHandler object addresses around.
Definition messagehandler.hh:101
The drama namespace contains all the classes, types etc of the DRAMA 2 implementation.
Definition drama.hh:93
DRAMA 2 include file - Request class definition.
DRAMA 2 include file - Task class definition.