Medical Imaging Interaction Toolkit  2024.06.99-60d9b802
Medical Imaging Interaction Toolkit
berryIExecutionListener.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 
14 #ifndef BERRYIEXECUTIONLISTENER_H_
15 #define BERRYIEXECUTIONLISTENER_H_
16 
17 #include <berryObject.h>
18 #include <berryMessage.h>
19 
22 
23 namespace berry {
24 
25 class ExecutionEvent;
26 
36 {
37 
38  struct Events {
39 
44 
45  virtual ~Events();
46 
47  virtual void AddListener(IExecutionListener* listener);
48  virtual void RemoveListener(IExecutionListener* listener);
49  virtual bool HasListeners() const;
50  virtual bool IsEmpty() const;
51 
52  private:
53 
58  };
59 
60  virtual ~IExecutionListener();
61 
72  virtual void NotHandled(const QString& commandId, const NotHandledException* exception) = 0;
73 
83  virtual void PostExecuteFailure(const QString& commandId,
84  const ExecutionException* exception) = 0;
85 
96  virtual void PostExecuteSuccess(const QString& commandId, const Object::Pointer& returnValue) = 0;
97 
108  virtual void PreExecute(const QString& commandId, const SmartPointer<const ExecutionEvent>& event) = 0;
109 };
110 
111 }
112 
113 #endif /* BERRYIEXECUTIONLISTENER_H_ */
berry::IExecutionListener
Definition: berryIExecutionListener.h:35
org_blueberry_core_commands_Export.h
berry::IExecutionListener::Events::postExecuteSuccess
Message2< const QString &, const Object::Pointer & > postExecuteSuccess
Definition: berryIExecutionListener.h:42
berry::SmartPointer
Implements transparent reference counting.
Definition: berryICommandCategoryListener.h:21
berryCommandExceptions.h
BERRY_COMMANDS
#define BERRY_COMMANDS
Definition: org_blueberry_core_commands_Export.h:26
berryMessage.h
berry::IExecutionListener::Events::preExecute
Message2< const QString &, const SmartPointer< const ExecutionEvent > & > preExecute
Definition: berryIExecutionListener.h:43
berry::IExecutionListener::Events::notHandled
Message2< const QString &, const NotHandledException * > notHandled
Definition: berryIExecutionListener.h:40
berry::Message2< const QString &, const NotHandledException * >
berry::MessageDelegate2
Definition: berryMessage.h:216
berry::IExecutionListener::Events::postExecuteFailure
Message2< const QString &, const ExecutionException * > postExecuteFailure
Definition: berryIExecutionListener.h:41
berry::IExecutionListener::Events
Definition: berryIExecutionListener.h:38
berryObject.h
berry
Definition: QmitkPropertyItemModel.h:24