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

Detailed Description

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.

See also
TAction
TUface

#include "thread.hh"

Inheritance diagram for drama::thread::TMessHandler:
drama::thread::TAction drama::thread::TUface drama::thread::TActionViaFunctor

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< TaskGetTask () const =0
 Get a reference to the DRAMA task we are part of.
 
virtual Task::mutexTypeLock () 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.
 
TMessHandleroperator= (const TMessHandler &rhs)=delete
 Assignment operator - deleted.
 
virtual const sds::PrintObjectCRSdsListToUser () 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.
 

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