Medical Imaging Interaction Toolkit  2024.06.99-e4ca64e0
Medical Imaging Interaction Toolkit
berry::ExecutionEvent Class Reference

#include <berryExecutionEvent.h>

Inheritance diagram for berry::ExecutionEvent:
Collaboration diagram for berry::ExecutionEvent:

Public Types

typedef QHash< QString, QString > ParameterMap
 
- Public Types inherited from berry::Object
typedef Object Self
 
typedef berry::SmartPointer< SelfPointer
 
typedef berry::SmartPointer< const SelfConstPointer
 
typedef berry::WeakPointer< SelfWeakPtr
 
typedef berry::WeakPointer< const SelfConstWeakPtr
 

Public Member Functions

 berryObjectMacro (ExecutionEvent)
 
 ExecutionEvent ()
 
 ExecutionEvent (const Command::ConstPointer &command, const ParameterMap &parameters, const Object::ConstPointer &trigger, const Object::Pointer &applicationContext)
 
const Object::Pointer GetApplicationContext () const
 
const Command::ConstPointer GetCommand () const
 
const Object::ConstPointer GetObjectParameterForExecution (const QString &parameterId) const
 
QString GetParameter (const QString &parameterId) const
 
const ParameterMapGetParameters () const
 
const Object::ConstPointer GetTrigger () const
 
QString ToString () const override
 
- Public Member Functions inherited from berry::Object
virtual QString GetClassName () const
 
virtual Reflection::TypeInfo GetTypeInfo () const
 
virtual QList< Reflection::TypeInfoGetSuperclasses () const
 
virtual void Delete ()
 
QDebug Print (QDebug os, Indent Indent=0) const
 
virtual uint HashCode () const
 
virtual bool operator< (const Object *) const
 
void Register () const
 
void UnRegister (bool del=true) const
 
int GetReferenceCount () const
 
void SetReferenceCount (int)
 
void AddDestroyListener (const MessageAbstractDelegate<> &delegate) const
 
void RemoveDestroyListener (const MessageAbstractDelegate<> &delegate) const
 
virtual bool operator== (const Object *) const
 

Additional Inherited Members

- Static Public Member Functions inherited from berry::Object
static const char * GetStaticClassName ()
 
static Reflection::TypeInfo GetStaticTypeInfo ()
 
static QList< Reflection::TypeInfoGetStaticSuperclasses ()
 
- Protected Member Functions inherited from berry::Object
 Object ()
 
virtual ~Object ()
 
virtual QDebug PrintSelf (QDebug os, Indent indent) const
 
virtual QDebug PrintHeader (QDebug os, Indent indent) const
 
virtual QDebug PrintTrailer (QDebug os, Indent indent) const
 
- Protected Attributes inherited from berry::Object
QAtomicInt m_ReferenceCount
 
QMutex m_ReferenceCountLock
 

Detailed Description

The data object to pass to the command (and its handler) as it executes. This carries information about the current state of the application, and the application context in which the command was executed.

An execution event carries three blocks of data: the parameters, the trigger, and the application context. How these blocks are used is application dependent. In the BlueBerry workbench, the trigger is an SWT event, and the application context contains information about the selection and active part.

Definition at line 37 of file berryExecutionEvent.h.

Member Typedef Documentation

◆ ParameterMap

typedef QHash<QString, QString> berry::ExecutionEvent::ParameterMap

Definition at line 43 of file berryExecutionEvent.h.

Constructor & Destructor Documentation

◆ ExecutionEvent() [1/2]

berry::ExecutionEvent::ExecutionEvent ( )

Constructs a new instance of ExecutionEvent with no parameters, no trigger and no application context. This is just a convenience method.

◆ ExecutionEvent() [2/2]

berry::ExecutionEvent::ExecutionEvent ( const Command::ConstPointer command,
const ParameterMap parameters,
const Object::ConstPointer trigger,
const Object::Pointer applicationContext 
)

Constructs a new instance of ExecutionEvent.

Parameters
commandThe command being executed; may be null.
parametersThe parameters to qualify the execution; must not be null. This must be a map of parameter ids (String) to parameter values (String).
triggerThe object that triggered the execution; may be null.
applicationContextThe state of the application at the time the execution was triggered; may be null.

Member Function Documentation

◆ berryObjectMacro()

berry::ExecutionEvent::berryObjectMacro ( ExecutionEvent  )

◆ GetApplicationContext()

const Object::Pointer berry::ExecutionEvent::GetApplicationContext ( ) const

Returns the state of the application at the time the execution was triggered.

Returns
The application context; may be null.

◆ GetCommand()

const Command::ConstPointer berry::ExecutionEvent::GetCommand ( ) const

Returns the command being executed.

Returns
The command being executed.

◆ GetObjectParameterForExecution()

const Object::ConstPointer berry::ExecutionEvent::GetObjectParameterForExecution ( const QString &  parameterId) const

Returns the object represented by the string value of the parameter with the provided id.

This is intended to be used in the scope of an IHandler#Execute method, so any problem getting the object value causes ExecutionException to be thrown.

Parameters
parameterIdThe id of a parameter to retrieve the object value of.
Returns
The object value of the parameter with the provided id.
Exceptions
ExecutionExceptionif the parameter object value could not be obtained for any reason

◆ GetParameter()

QString berry::ExecutionEvent::GetParameter ( const QString &  parameterId) const

Returns the value of the parameter with the given id.

Parameters
parameterIdThe id of the parameter to retrieve; may be null.
Returns
The parameter value; null if the parameter cannot be found.

◆ GetParameters()

const ParameterMap& berry::ExecutionEvent::GetParameters ( ) const

Returns all of the parameters.

Returns
The parameters; never null, but may be empty.

◆ GetTrigger()

const Object::ConstPointer berry::ExecutionEvent::GetTrigger ( ) const

Returns the object that triggered the execution

Returns
The trigger; null if there was no trigger.

◆ ToString()

QString berry::ExecutionEvent::ToString ( ) const
overridevirtual

The string representation of this execution event – for debugging purposes only. This string should not be shown to an end user.

Reimplemented from berry::Object.


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