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

Detailed Description

This class is used to creating MessageHandler objects referring to functions.

This class allow the user to specify a function to be used to handle messages.

Author
Tony Farrell, AAO $Revision$ $Date$

#include "messagehandler.hh"

Inheritance diagram for drama::MessageHandlerViaFunctor:
drama::MessageHandler

Public Member Functions

 MessageHandlerViaFunctor (const MessageReceiveFunction func)
 Initialize object with the specified function, which meets the MessageReceiveFunction prototype.
 
virtual const EntryInfoGetEntry ()
 Return the action entry details.
 
virtual std::shared_ptr< TaskGetTask () const
 Returns a pointer to the task.
 
drama::Request MessageReceived () override
 Invoke function.
 
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
 Use DRAMA to send a message to the user.
 
virtual void PutKickHandler (MessageHandlerPtr obj)
 Put a message handler object for the next Kick event.
 
virtual void PutKickHandler (MessageReceiveFunction func)
 Put a message handler function for the next Kick event.
 
virtual void PutObeyHandler (MessageHandlerPtr obj)
 Put a message handler object for the next Obey reschedule event.
 
virtual void PutObeyHandler (MessageReceiveFunction func)
 Put a message handler function for the next Obey reschedule event.
 
virtual const sds::PrintObjectCRSdsListToUser () const
 Get a reference to an SDS printer object which can be used to list an SDS object using MessageUser.
 
void SendBulkTrigger (BulkData *arg, DitsTransIdType *transId, bool isSds, unsigned notifyBytes=1024 *1024)
 Send a bulk data trigger message to the parent action.
 
void SendBulkTrigger (BulkDataSds *arg, DitsTransIdType *transId, unsigned notifyBytes=1024 *1024)
 Send a bulk data trigger message to the parent action.
 
void SendTrigger (const sds::Id &arg) const
 Send a trigger message to the parent action.
 
void SetAction (Action *action)
 Invoked when the ActionHandler is associated with a DRAMA action entry (object type Action).
 
void SetReturnArg (const sds::Id &arg, bool copy=true)
 Set the argument to be sent as part of the action completion message.
 
void SetReturnArg (sds::Id *arg)
 Set the argument to be sent as part of the action completion message.
 

Protected Member Functions

virtual void ActionEnd (bool taskExiting, StatusType actionEndStatus)
 Method Invoked when the action completes.
 
void GrabEntryInfo ()
 Fetch the DRAMA Entry information.
 

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