AAO DRAMA/DRAMA2 C++ Interface
DRAMA C++11 and later interface
|
A class which implements a Spawnable DRAMA Message Handler.
Interface only. Users must sub-class and implement Spawn() and End().
In DRAMA, a "spawnable" action is one where then can be multiple action of the same name running at the same time. By default, only one action of given name can be running at one time, but spawnable actions don't have that restriction. They are a little more expensive in terms of performance.
The user implements a sub-class of this interface and provides methods invoked when the action is spawned and when it completes. The Spawn() method is invoked when the action is spawned (an obey message of the specified name is received), and must return a shared pointer to an object to handle the obey message.
These objects can then be supplied to the drama::Task::AddSpawnable() methods to add such an action to the task.
#include "spawnable.hh"
Inherits drama::ActionHandler.
Public Member Functions | |
Spawnable () | |
Create a DRAMA spawnable action action handler object. | |
Spawnable (const Spawnable &source)=delete | |
Assignment operator deleted. | |
Spawnable (Spawnable &&source)=default | |
Move assignment operator. | |
virtual | ~Spawnable () |
Spawnable destructor. | |
virtual void | ActionEnd (MessageHandlerPtr obj)=0 |
Invoked when the spawned action has completed. | |
virtual std::shared_ptr< Task > | GetTask () const |
Returns a pointer to the task. | |
Spawnable & | operator= (const Spawnable &rhs)=delete |
Copy operator deleted. | |
Spawnable & | operator= (Spawnable &&rhs)=default |
Move operator. | |
void | SetAction (Action *action) |
Invoked when the ActionHandler is associated with a DRAMA action entry (object type Action). | |
Protected Member Functions | |
virtual MessageHandlerPtr | Spawn ()=0 |
An Action has been spawned, return a handler for the message. | |
Click here for the DRAMA home page and here for the AAO home page.
For more information, contact tony.farrell@mq.edu.au
Generated on Thu Dec 12 2024 23:07:35 for AAO DRAMA/DRAMA2 C++ Interface by 1.9.8