NAME
OTCEV_Action -
Event object to notify that it is time to perform some action.
SYNOPSIS
#include <OTC/dispatch/action.hh>
class OTCEV_Action : public OTC_Event
{
public:
~OTCEV_Action();
inline OTCEV_Action(int theActionId);
inline int action() const;
void* type() const;
inline static void* typeId();
void dump(ostream& outs) const;
static int schedule(int theAgentId);
static void cancel(int theActionId);
static void cancelAgent(int theAgentId);
static OTC_Boolean active(int theActionId);
};
CLASS TYPE
Concrete
DESCRIPTION
OTCEV_Action is a derived version of OTC_Event for notifying
agents that it should now perform whatever action that it has been
waiting to perform. A request to receive this event is registered
as an idle job, and will only be delivered when the dispatcher
has nothing else to do.
CONSTRUCTION
inline OTCEV_Action(int theActionId);
Creates an event object for notifying an
agent that the action given by
theActionId can now be performed.
QUERY
inline int action() const;
Returns the ID number of the action which
should now be performed.
IDENTIFICATION
void* type() const;
Returns a value that uniquely identifies
this type of event.
inline static void* typeId();
Returns a value that uniquely identifies
this type of event.
DEBUGGING
void dump(ostream& outs) const;
Dumps info about the event onto outs.
SUBSCRIPTION
static int schedule(int theAgentId);
Registers that the agent with ID number
theAgentId wishes to perform an action.
The identifier for the action is returned.
The agent will be notified that it can
perform the action when the scheduler
next has no other work to do, and the
agents request has come to the front of
the queue.
static void cancel(int theActionId);
Cancels the action with ID number
theActionId.
static void cancelAgent(int theAgentId);
Cancels any actions which the agent with
ID number theAgentId is waiting upon.
static OTC_Boolean active(int theActionId);
Returns OTCLIB_TRUE if the action with
ID number theTimerId has not yet been
performed.
NOTES
A value of 0 will never be used as an action ID.
SEE ALSO
OTC_EVAgent, OTC_Event
LIBRARY
OTC
AUTHOR(S)
Graham Dumpleton
COPYRIGHT
Copyright 1994 DUMPLETON SOFTWARE CONSULTING PTY LIMITED