Medical Imaging Interaction Toolkit  2025.12.02
Medical Imaging Interaction Toolkit
berryExtensionTracker.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 #ifndef BERRYEXTENSIONTRACKER_H
14 #define BERRYEXTENSIONTRACKER_H
15 
16 #include <berryIExtensionTracker.h>
17 
18 namespace berry {
19 
20 struct IExtension;
21 struct IExtensionPoint;
22 struct IExtensionRegistry;
23 struct IExtensionPointFilter;
24 
31 {
32  struct Impl;
33  QScopedPointer<Impl> d;
34 
35 public:
36 
38  ~ExtensionTracker() override;
39 
47 
48  void RegisterHandler(IExtensionChangeHandler* handler, const IExtensionPointFilter& filter) override;
49 
50  void RegisterHandler(IExtensionChangeHandler* handler, const QString& extensionPointId) override;
51 
52  void UnregisterHandler(IExtensionChangeHandler* handler) override;
53 
55  const SmartPointer<Object>& object, ReferenceType referenceType) override;
56 
57  QList<SmartPointer<Object> > GetObjects(const SmartPointer<IExtension>& element) const override;
58 
59  void Close() override;
60 
61  void UnregisterObject(const SmartPointer<IExtension>& extension, const SmartPointer<Object>& object) override;
62 
63  QList<SmartPointer<Object> > UnregisterObject(const SmartPointer<IExtension>& extension) override;
64 
72 
80 
87  static IExtensionPointFilter CreateNamespaceFilter(const QString& id);
88 
89 
90 protected:
91 
92  virtual void ApplyAdd(IExtensionChangeHandler* handler, const SmartPointer<IExtension>& extension);
93 
94  virtual void ApplyRemove(IExtensionChangeHandler* handler, const SmartPointer<IExtension>& removedExtension,
95  const QList<SmartPointer<Object> >& removedObjects);
96 
97 private:
98 
99  void Init(IExtensionRegistry* registry);
100 };
101 
102 }
103 
104 #endif // BERRYEXTENSIONTRACKER_H
void UnregisterHandler(IExtensionChangeHandler *handler) override
void Close() override
void RegisterHandler(IExtensionChangeHandler *handler, const QString &extensionPointId) override
void UnregisterObject(const SmartPointer< IExtension > &extension, const SmartPointer< Object > &object) override
~ExtensionTracker() override
virtual void ApplyRemove(IExtensionChangeHandler *handler, const SmartPointer< IExtension > &removedExtension, const QList< SmartPointer< Object > > &removedObjects)
void RegisterObject(const SmartPointer< IExtension > &element, const SmartPointer< Object > &object, ReferenceType referenceType) override
void RegisterHandler(IExtensionChangeHandler *handler, const IExtensionPointFilter &filter) override
QList< SmartPointer< Object > > GetObjects(const SmartPointer< IExtension > &element) const override
QList< SmartPointer< Object > > UnregisterObject(const SmartPointer< IExtension > &extension) override
virtual void ApplyAdd(IExtensionChangeHandler *handler, const SmartPointer< IExtension > &extension)
static IExtensionPointFilter CreateExtensionPointFilter(const QList< SmartPointer< IExtensionPoint > > &xpts)
ExtensionTracker(IExtensionRegistry *theRegistry)
static IExtensionPointFilter CreateExtensionPointFilter(const SmartPointer< IExtensionPoint > &xpt)
static IExtensionPointFilter CreateNamespaceFilter(const QString &id)
Implements transparent reference counting.
#define org_blueberry_core_runtime_EXPORT