AAO DRAMA/DRAMA2 C++ Interface
DRAMA C++11 and later interface
|
This interface class must be implemented by classes which have threads waiting for messages.
It provides the common interface that allows Threaded actions and UFACE Threads to provide the same interface to sending messages and waiting for replies.
#include "thread.hh"
Public Member Functions | |
TMessHandler (const TMessHandler &source)=delete | |
Copy constructor - deleted. | |
virtual | ~TMessHandler () |
Destructor. | |
virtual Dits___CurActType | GetMessageContext () const =0 |
Get the DRAMA Context associated with the action/UFACE event. | |
virtual std::shared_ptr< Task > | GetTask () const =0 |
Get a reference to the DRAMA task we are part of. | |
virtual Task::mutexType & | Lock () const =0 |
Reference the DRAMA Task lock. | |
template<typename... Types> | |
void | MessageUser (const char *format, Types... args) |
Use DRAMA to send a message to the user - safe format. | |
virtual void | MessageUser (const std::string &text) const =0 |
Use DRAMA to send a message to the user. | |
TMessHandler & | operator= (const TMessHandler &rhs)=delete |
Assignment operator - deleted. | |
virtual const sds::PrintObjectCR & | SdsListToUser () const |
Get a reference to an SDS printer object which can be used to list an SDS object using MessageUser. | |
virtual void | SetupWaitEvent (DitsTransIdType tid, drama::Path *pathObj)=0 |
Sets up a wait event for this thread. | |
virtual void | WaitForTransaction (std::weak_ptr< Task > theTask, TransEvtInfo *const eventInfo, TransEvtProcessor *const eventProcessor, sds::IdPtr *const arg=nullptr) |
Block the current thread until a message for the transaction specified to SetupWaitEvent() occurs. | |
virtual bool | WaitForTransactionUntil (std::weak_ptr< Task > theTask, TransEvtInfo *const eventInfo, TransEvtProcessor *const eventProcessor, const std::chrono::steady_clock::time_point &until, sds::IdPtr *const arg=nullptr) |
Block the current thread until a message for the transaction specified to SetupWaitEvent() occurs or until a certain time has passed. | |
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:36 for AAO DRAMA/DRAMA2 C++ Interface by 1.9.8