AAO DRAMA/DRAMA2 C++ Interface
DRAMA C++11 and later interface
Public Member Functions | List of all members
drama::ThreadDispatcher Class Referenceabstract

Detailed Description

A class to dispatch message sending to another thread.

Implements a common but somewhat complex design pattern in DRAMA tasks.

This is an abstract class, a sub-class must override SendMessage() to send the actual message and GetMessageType() which returns a string indicating the type of message (for use in error reports)

Warning
Currently experimental, Obeys only. Will be reworked into a base class that can used for various message types.

#include "threaddispatch.hh"

Inheritance diagram for drama::ThreadDispatcher:
drama::ObeyThreadDispatcher

Public Member Functions

 ThreadDispatcher (drama::Task *theTask, const std::string &threadName, const std::string &messageName)
 Construct a thread dispatcher.
 
virtual ~ThreadDispatcher ()
 Destructor.
 
bool CheckResult (StatusType *status)
 Check the result of the thread.
 
bool IsRunning ()
 Returns true if the thread is running.
 
void Send (drama::thread::TMessHandler *messHandler, drama::Path *path, sds::IdPtr arg=nullptr)
 Send a message using a new thread.
 

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