Medical Imaging Interaction Toolkit  2023.04.00
Medical Imaging Interaction Toolkit
berryINullSelectionListener.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 BERRYInullptrSELECTIONLISTENER_H_
15 #define BERRYInullptrSELECTIONLISTENER_H_
16 
18 
19 namespace berry
20 {
21 
39 {
40  ~INullSelectionListener() override;
41 };
42 
68 template<typename R>
70 {
71 
72  typedef R Listener;
73  typedef void
75 
77  listener(l), callback(c)
78  {
79  poco_assert(listener);
80  poco_assert(callback);
81  }
82 
84  const ISelection::ConstPointer& selection) override
85  {
86  (listener->*callback)(part, selection);
87  }
88 
89 private:
90 
91  Listener* listener;
92  Callback callback;
93 };
94 
95 }
96 
97 #endif /* BERRYInullptrSELECTIONLISTENER_H_ */
berry::ISelectionListener
Definition: berryISelectionListener.h:38
berry::NullSelectionChangedAdapter::SelectionChanged
void SelectionChanged(const IWorkbenchPart::Pointer &part, const ISelection::ConstPointer &selection) override
Definition: berryINullSelectionListener.h:83
berry::NullSelectionChangedAdapter::Listener
R Listener
Definition: berryINullSelectionListener.h:72
berry::NullSelectionChangedAdapter
Definition: berryINullSelectionListener.h:69
BERRY_UI_QT
#define BERRY_UI_QT
Definition: org_blueberry_ui_qt_Export.h:26
berry::NullSelectionChangedAdapter::Callback
void(R::* Callback)(const IWorkbenchPart::Pointer &, const ISelection::ConstPointer &)
Definition: berryINullSelectionListener.h:74
berry::INullSelectionListener
Definition: berryINullSelectionListener.h:38
berry::Object::ConstPointer
berry::SmartPointer< const Self > ConstPointer
Definition: berryObject.h:83
berryISelectionListener.h
berry::NullSelectionChangedAdapter::NullSelectionChangedAdapter
NullSelectionChangedAdapter(R *l, Callback c)
Definition: berryINullSelectionListener.h:76
berry::Object::Pointer
berry::SmartPointer< Self > Pointer
Definition: berryObject.h:82
berry
Definition: QmitkPropertyItemModel.h:24