Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
berryExtensionTracker.h
Go to the documentation of this file.
1 /*===================================================================
2 
3 BlueBerry Platform
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef BERRYEXTENSIONTRACKER_H
18 #define BERRYEXTENSIONTRACKER_H
19 
20 #include <berryIExtensionTracker.h>
21 
22 namespace berry {
23 
24 struct IExtension;
25 struct IExtensionPoint;
26 struct IExtensionRegistry;
27 struct IExtensionPointFilter;
28 
35 {
36  struct Impl;
37  QScopedPointer<Impl> d;
38 
39 public:
40 
43 
51 
52  void RegisterHandler(IExtensionChangeHandler* handler, const IExtensionPointFilter& filter) override;
53 
54  void RegisterHandler(IExtensionChangeHandler* handler, const QString& extensionPointId) override;
55 
56  void UnregisterHandler(IExtensionChangeHandler* handler) override;
57 
58  void RegisterObject(const SmartPointer<IExtension>& element,
59  const SmartPointer<Object>& object, ReferenceType referenceType) override;
60 
61  QList<SmartPointer<Object> > GetObjects(const SmartPointer<IExtension>& element) const override;
62 
63  void Close() override;
64 
65  void UnregisterObject(const SmartPointer<IExtension>& extension, const SmartPointer<Object>& object) override;
66 
67  QList<SmartPointer<Object> > UnregisterObject(const SmartPointer<IExtension>& extension) override;
68 
75  static IExtensionPointFilter CreateExtensionPointFilter(const SmartPointer<IExtensionPoint>& xpt);
76 
83  static IExtensionPointFilter CreateExtensionPointFilter(const QList<SmartPointer<IExtensionPoint> >& xpts);
84 
91  static IExtensionPointFilter CreateNamespaceFilter(const QString& id);
92 
93 
94 protected:
95 
96  virtual void ApplyAdd(IExtensionChangeHandler* handler, const SmartPointer<IExtension>& extension);
97 
98  virtual void ApplyRemove(IExtensionChangeHandler* handler, const SmartPointer<IExtension>& removedExtension,
99  const QList<SmartPointer<Object> >& removedObjects);
100 
101 private:
102 
103  void Init(IExtensionRegistry* registry);
104 };
105 
106 }
107 
108 #endif // BERRYEXTENSIONTRACKER_H
static MsgHandler handler
Definition: usUtils.cpp:261
Implements transparent reference counting.
#define org_blueberry_core_runtime_EXPORT