Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
berryIExecutionListener.cpp
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 
14 
16 #include "berryExecutionEvent.h"
17 #include "berryCommandCategory.h"
18 #include "berryState.h"
19 #include "berryIHandler.h"
20 
21 namespace berry {
22 
24 {
25 }
26 
27 void
30 {
31  if (l == nullptr) return;
32 
37 }
38 
39 void
42 {
43  if (l == nullptr) return;
44 
49 }
50 
51 bool
54 {
56  postExecuteSuccess.HasListeners() || preExecute.HasListeners();
57 }
58 
59 bool
61 ::IsEmpty() const
62 {
63  return !this->HasListeners();
64 }
65 
67 {
68 }
69 
70 }
71 
72 
73 
74 
virtual void PostExecuteSuccess(const QString &commandId, const Object::Pointer &returnValue)=0
Message2< const QString &, const ExecutionException * > postExecuteFailure
virtual void PreExecute(const QString &commandId, const SmartPointer< const ExecutionEvent > &event)=0
virtual void PostExecuteFailure(const QString &commandId, const ExecutionException *exception)=0
Message2< const QString &, const Object::Pointer & > postExecuteSuccess
virtual void RemoveListener(IExecutionListener *listener)
bool HasListeners() const
Definition: berryMessage.h:911
Message2< const QString &, const SmartPointer< const ExecutionEvent > &> preExecute
Message2< const QString &, const NotHandledException * > notHandled
virtual void AddListener(IExecutionListener *listener)
virtual void NotHandled(const QString &commandId, const NotHandledException *exception)=0