Workspace 6.21.5
Public Types | Public Member Functions | List of all members
OperationUpdateEvent Class Reference

Event raised when an operation is being brought up to date. More...

#include <Workspace/DataExecution/Operations/operationupdateevent.h>

Inheritance diagram for OperationUpdateEvent:
[legend]

Public Types

enum  EventType { ExecuteStarting , ExecuteSucceeded , ExecuteFailed }
 

Public Member Functions

 OperationUpdateEvent (Operation &op, EventType type)
 
EventType getEventType () const
 
OperationgetOperation () const
 
- Public Member Functions inherited from ObservableEventType< OperationUpdateEvent >
CSIRO_WORKSPACE_API const EventIDSingleton< CSIRO::DataExecution::AllObservableEvents > & eventID ()
 
CSIRO_WORKSPACE_API const EventIDSingleton< CSIRO::DataExecution::ProgressEvent > & eventID ()
 
const EventIDSingleton< OperationUpdateEvent > & getEventID () const override
 
- Public Member Functions inherited from ObservableEvent
virtual ~ObservableEvent ()=default
 
virtual const EventIDgetEventID () const =0
 

Additional Inherited Members

- Static Public Member Functions inherited from ObservableEventType< OperationUpdateEvent >
static const EventIDSingleton< OperationUpdateEvent > & eventID ()
 
- Protected Member Functions inherited from ObservableEventType< OperationUpdateEvent >
 ObservableEventType ()=default
 

Detailed Description

Operations with getBroadcastUpdateEvents() enabled will broadcast this events via the root workspace as they are updated.

Important: When using this event for its primary intended purpose of passively observing when an operation begins and ends updating it is recommended that you use an OperationUpdateEventObserver created via createOperationUpdateEventObserver() to avoid misuse. See OperationUpdateEvent::getOperation() for more information.

Member Enumeration Documentation

◆ EventType

enum EventType

The part of the update process this event represents

Enumerator
ExecuteStarting 
ExecuteSucceeded 
ExecuteFailed 

Constructor & Destructor Documentation

◆ OperationUpdateEvent()

OperationUpdateEvent ( Operation op,
EventType  type 
)
inline

Member Function Documentation

◆ getEventType()

EventType getEventType ( ) const
inline

◆ getOperation()

Operation & getOperation ( ) const
inline

Important warnings when accessing the operation:

1) This event will have originated from the execution thread. Therefore depending on the threading model (ObserverThreadType) of the observer you are using to catch this event you need to be very careful of misusing this operation reference from other threads.

2) You should not under any circumstances make changes to the operation that will affect its upToDate state during a ExecuteStarting event.

3) If you make any changes to the operation that affect its upToDate state during a ExecuteSucceeded event the operation will no longer be upToDate and will need to execute again.