Medical Imaging Interaction Toolkit  2024.06.99-60d9b802
Medical Imaging Interaction Toolkit
berry::IExtensionTracker Struct Referenceabstract

#include <berryIExtensionTracker.h>

Inheritance diagram for berry::IExtensionTracker:

Public Types

enum  ReferenceType { REF_STRONG, REF_WEAK }
 

Public Member Functions

virtual ~IExtensionTracker ()
 
virtual void RegisterHandler (IExtensionChangeHandler *handler, const IExtensionPointFilter &filter)=0
 
virtual void RegisterHandler (IExtensionChangeHandler *handler, const QString &extensionPointId=QString())=0
 
virtual void UnregisterHandler (IExtensionChangeHandler *handler)=0
 
virtual void RegisterObject (const SmartPointer< IExtension > &extension, const SmartPointer< Object > &object, ReferenceType referenceType)=0
 
virtual void UnregisterObject (const SmartPointer< IExtension > &extension, const SmartPointer< Object > &object)=0
 
virtual QList< SmartPointer< Object > > UnregisterObject (const SmartPointer< IExtension > &extension)=0
 
virtual QList< SmartPointer< Object > > GetObjects (const SmartPointer< IExtension > &extension) const =0
 
virtual void Close ()=0
 

Detailed Description

An extension tracker keeps associations between extensions and their derived objects on an extension basis. All extensions being added in a tracker will automatically be removed when the extension is uninstalled from the registry. Users interested in extension removal can register a handler that will let them know when an object is being removed.

This interface is not intended to be implemented by clients.

Definition at line 50 of file berryIExtensionTracker.h.

Member Enumeration Documentation

◆ ReferenceType

Enumerator
REF_STRONG 

Constant for strong (normal) reference holding.

REF_WEAK 

Constant for weak reference holding.

Definition at line 53 of file berryIExtensionTracker.h.

Constructor & Destructor Documentation

◆ ~IExtensionTracker()

virtual berry::IExtensionTracker::~IExtensionTracker ( )
virtual

Member Function Documentation

◆ Close()

virtual void berry::IExtensionTracker::Close ( )
pure virtual

Close the tracker. All registered objects are freed and all handlers are being automatically removed.

Implemented in berry::ExtensionTracker.

◆ GetObjects()

virtual QList<SmartPointer<Object> > berry::IExtensionTracker::GetObjects ( const SmartPointer< IExtension > &  extension) const
pure virtual

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.

Parameters
extensionthe extension for which the object must be returned
Returns
the array of associated objects

Implemented in berry::ExtensionTracker.

◆ RegisterHandler() [1/2]

virtual void berry::IExtensionTracker::RegisterHandler ( IExtensionChangeHandler handler,
const IExtensionPointFilter filter 
)
pure virtual

Register an extension change handler with this tracker using the given filter.

Parameters
handlerthe handler to be registered
filterthe filter to use to choose interesting changes

Implemented in berry::ExtensionTracker.

◆ RegisterHandler() [2/2]

virtual void berry::IExtensionTracker::RegisterHandler ( IExtensionChangeHandler handler,
const QString &  extensionPointId = QString() 
)
pure virtual

Register an extension change handler with this tracker for the given extension point id.

Parameters
handlerthe handler to be registered
extensionPointIdthe extension point id to track

Implemented in berry::ExtensionTracker.

◆ RegisterObject()

virtual void berry::IExtensionTracker::RegisterObject ( const SmartPointer< IExtension > &  extension,
const SmartPointer< Object > &  object,
ReferenceType  referenceType 
)
pure virtual

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.

Parameters
extensionthe extension
objectthe object to associate with the extension
referenceTypeone of REF_STRONG, REF_WEAK

Implemented in berry::ExtensionTracker.

◆ UnregisterHandler()

virtual void berry::IExtensionTracker::UnregisterHandler ( IExtensionChangeHandler handler)
pure virtual

Unregister the given extension change handler previously registered with this tracker.

Parameters
handlerthe handler to be unregistered

Implemented in berry::ExtensionTracker.

◆ UnregisterObject() [1/2]

virtual QList<SmartPointer<Object> > berry::IExtensionTracker::UnregisterObject ( const SmartPointer< IExtension > &  extension)
pure virtual

Remove all the objects associated with the given extension. Return the removed objects.

Parameters
extensionthe extension for which the objects are removed
Returns
the objects that were associated with the extension

Implemented in berry::ExtensionTracker.

◆ UnregisterObject() [2/2]

virtual void berry::IExtensionTracker::UnregisterObject ( const SmartPointer< IExtension > &  extension,
const SmartPointer< Object > &  object 
)
pure virtual

Remove an association between the given extension and the given object.

Parameters
extensionthe extension under which the object has been registered
objectthe object to unregister

Implemented in berry::ExtensionTracker.


The documentation for this struct was generated from the following file: