Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
#include <berryExtensionTracker.h>
Public Member Functions | |
ExtensionTracker () | |
~ExtensionTracker () | |
ExtensionTracker (IExtensionRegistry *theRegistry) | |
void | RegisterHandler (IExtensionChangeHandler *handler, const IExtensionPointFilter &filter) override |
void | RegisterHandler (IExtensionChangeHandler *handler, const QString &extensionPointId) override |
void | UnregisterHandler (IExtensionChangeHandler *handler) override |
void | RegisterObject (const SmartPointer< IExtension > &element, const SmartPointer< Object > &object, ReferenceType referenceType) override |
QList< SmartPointer< Object > > | GetObjects (const SmartPointer< IExtension > &element) const override |
void | Close () override |
void | UnregisterObject (const SmartPointer< IExtension > &extension, const SmartPointer< Object > &object) override |
QList< SmartPointer< Object > > | UnregisterObject (const SmartPointer< IExtension > &extension) override |
Public Member Functions inherited from berry::IExtensionTracker | |
virtual | ~IExtensionTracker () |
Static Public Member Functions | |
static IExtensionPointFilter | CreateExtensionPointFilter (const SmartPointer< IExtensionPoint > &xpt) |
static IExtensionPointFilter | CreateExtensionPointFilter (const QList< SmartPointer< IExtensionPoint > > &xpts) |
static IExtensionPointFilter | CreateNamespaceFilter (const QString &id) |
Protected Member Functions | |
virtual void | ApplyAdd (IExtensionChangeHandler *handler, const SmartPointer< IExtension > &extension) |
virtual void | ApplyRemove (IExtensionChangeHandler *handler, const SmartPointer< IExtension > &removedExtension, const QList< SmartPointer< Object > > &removedObjects) |
Additional Inherited Members | |
Public Types inherited from berry::IExtensionTracker | |
enum | ReferenceType { REF_STRONG, REF_WEAK } |
Implementation of the IExtensionTracker.
Definition at line 34 of file berryExtensionTracker.h.
berry::ExtensionTracker::ExtensionTracker | ( | ) |
Definition at line 115 of file berryExtensionTracker.cpp.
References berry::Platform::GetExtensionRegistry().
berry::ExtensionTracker::~ExtensionTracker | ( | ) |
Definition at line 120 of file berryExtensionTracker.cpp.
berry::ExtensionTracker::ExtensionTracker | ( | IExtensionRegistry * | theRegistry | ) |
Construct a new instance of the extension tracker using the given registry containing tracked extensions and extension points.
theRegistry | the extension registry to track |
Definition at line 124 of file berryExtensionTracker.cpp.
|
protectedvirtual |
Definition at line 324 of file berryExtensionTracker.cpp.
References berry::IExtensionChangeHandler::AddExtension().
|
protectedvirtual |
Definition at line 329 of file berryExtensionTracker.cpp.
References berry::IExtensionChangeHandler::RemoveExtension().
|
overridevirtual |
Close the tracker. All registered objects are freed and all handlers are being automatically removed.
Implements berry::IExtensionTracker.
Definition at line 204 of file berryExtensionTracker.cpp.
|
static |
Return an instance of filter matching all changes for the given extension point.
xpt | the extension point |
Definition at line 263 of file berryExtensionTracker.cpp.
|
static |
Return an instance of filter matching all changes for the given extension points.
xpts | the extension points used to filter |
Definition at line 281 of file berryExtensionTracker.cpp.
|
static |
Return an instance of filter matching all changes from a given plugin.
id | the plugin id |
Definition at line 306 of file berryExtensionTracker.cpp.
References berry::IExtensionPoint::GetNamespaceIdentifier().
|
overridevirtual |
Return all the objects that have been associated with the given extension. All objects registered strongly will be return unless they have been unregistered. The objects registered softly or weakly may not be returned if they have been garbage collected. Return an empty array if no associations exist.
extension | the extension for which the object must be returned |
Implements berry::IExtensionTracker.
Definition at line 181 of file berryExtensionTracker.cpp.
References berry::WeakPointer< TObjectType >::Expired(), and berry::WeakPointer< TObjectType >::Lock().
|
overridevirtual |
Register an extension change handler with this tracker using the given filter.
handler | the handler to be registered |
filter | the filter to use to choose interesting changes |
Implements berry::IExtensionTracker.
Definition at line 141 of file berryExtensionTracker.cpp.
Referenced by RegisterHandler().
|
overridevirtual |
Register an extension change handler with this tracker for the given extension point id.
handler | the handler to be registered |
extensionPointId | the extension point id to track |
Implements berry::IExtensionTracker.
Definition at line 149 of file berryExtensionTracker.cpp.
References RegisterHandler().
|
overridevirtual |
Create an association between the given extension and the given object. The referenceType indicates how strongly the object is being kept in memory. There are 2 possible values: REF_STRONG and REF_WEAK.
extension | the extension |
object | the object to associate with the extension |
referenceType | one of REF_STRONG, REF_WEAK |
Implements berry::IExtensionTracker.
Definition at line 164 of file berryExtensionTracker.cpp.
References berry::SmartPointer< TObjectType >::IsNull(), berry::IExtensionTracker::REF_STRONG, and berry::IExtensionTracker::REF_WEAK.
|
overridevirtual |
Unregister the given extension change handler previously registered with this tracker.
handler | the handler to be unregistered |
Implements berry::IExtensionTracker.
Definition at line 155 of file berryExtensionTracker.cpp.
|
overridevirtual |
Remove an association between the given extension and the given object.
extension | the extension under which the object has been registered |
object | the object to unregister |
Implements berry::IExtensionTracker.
Definition at line 220 of file berryExtensionTracker.cpp.
|
overridevirtual |
Remove all the objects associated with the given extension. Return the removed objects.
extension | the extension for which the objects are removed |
Implements berry::IExtensionTracker.
Definition at line 237 of file berryExtensionTracker.cpp.
References berry::WeakPointer< TObjectType >::Expired(), and berry::WeakPointer< TObjectType >::Lock().