Medical Imaging Interaction Toolkit
2024.12.99-0da743f6
Medical Imaging Interaction Toolkit
|
#include <berryExecutionEvent.h>
Public Types | |
typedef QHash< QString, QString > | ParameterMap |
Public Types inherited from berry::Object | |
typedef Object | Self |
typedef berry::SmartPointer< Self > | Pointer |
typedef berry::SmartPointer< const Self > | ConstPointer |
typedef berry::WeakPointer< Self > | WeakPtr |
typedef berry::WeakPointer< const Self > | ConstWeakPtr |
Public Member Functions | |
berryObjectMacro (ExecutionEvent) | |
ExecutionEvent () | |
ExecutionEvent (const Command::ConstPointer &command, const ParameterMap ¶meters, const Object::ConstPointer &trigger, const Object::Pointer &applicationContext) | |
const Object::Pointer | GetApplicationContext () const |
const Command::ConstPointer | GetCommand () const |
const Object::ConstPointer | GetObjectParameterForExecution (const QString ¶meterId) const |
QString | GetParameter (const QString ¶meterId) const |
const ParameterMap & | GetParameters () 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::TypeInfo > | GetSuperclasses () 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::TypeInfo > | GetStaticSuperclasses () |
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 |
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.
typedef QHash<QString, QString> berry::ExecutionEvent::ParameterMap |
Definition at line 43 of file berryExecutionEvent.h.
berry::ExecutionEvent::ExecutionEvent | ( | ) |
Constructs a new instance of ExecutionEvent
with no parameters, no trigger and no application context. This is just a convenience method.
berry::ExecutionEvent::ExecutionEvent | ( | const Command::ConstPointer & | command, |
const ParameterMap & | parameters, | ||
const Object::ConstPointer & | trigger, | ||
const Object::Pointer & | applicationContext | ||
) |
Constructs a new instance of ExecutionEvent
.
command | The command being executed; may be null . |
parameters | The parameters to qualify the execution; must not be null . This must be a map of parameter ids (String ) to parameter values (String ). |
trigger | The object that triggered the execution; may be null . |
applicationContext | The state of the application at the time the execution was triggered; may be null . |
berry::ExecutionEvent::berryObjectMacro | ( | ExecutionEvent | ) |
const Object::Pointer berry::ExecutionEvent::GetApplicationContext | ( | ) | const |
Returns the state of the application at the time the execution was triggered.
null
. const Command::ConstPointer berry::ExecutionEvent::GetCommand | ( | ) | const |
Returns the command being executed.
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.
parameterId | The id of a parameter to retrieve the object value of. |
ExecutionException | if the parameter object value could not be obtained for any reason |
QString berry::ExecutionEvent::GetParameter | ( | const QString & | parameterId | ) | const |
Returns the value of the parameter with the given id.
parameterId | The id of the parameter to retrieve; may be null . |
null
if the parameter cannot be found. const ParameterMap& berry::ExecutionEvent::GetParameters | ( | ) | const |
Returns all of the parameters.
null
, but may be empty. const Object::ConstPointer berry::ExecutionEvent::GetTrigger | ( | ) | const |
Returns the object that triggered the execution
null
if there was no trigger.
|
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.