Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
#include <berryIAdaptable.h>
Public Member Functions | |
virtual Object * | GetAdapter (const QString &adapterType) const =0 |
template<class A > | |
A * | GetAdapter () |
virtual | ~IAdaptable () |
An interface for an adaptable object.
Adaptable objects can be dynamically extended to provide different interfaces (or "adapters"). Adapters are created by adapter factories, which are in turn managed by type by adapter managers.
For example,
IAdaptable a = [some adaptable]; IFoo x = (IFoo)a.getAdapter(IFoo.class); if (x != null) [do IFoo things with x]
This interface can be used without OSGi running.
Clients may implement this interface, or obtain a default implementation of this interface by subclassing PlatformObject
.
Definition at line 54 of file berryIAdaptable.h.
|
virtual |
Definition at line 21 of file berryIAdaptable.cpp.
|
pure virtual |
Returns an object which is an instance of the given class associated with this object. Returns null
if no such object can be found.
adapterType | the adapter class to look up |
null
if this object does not have an adapter for the given class Implemented in berry::Saveable, berry::PlatformObject, mitk::DataStorageEditorInput, and berry::FileEditorInput.
|
inline |
Definition at line 72 of file berryIAdaptable.h.
References BERRY_WARN, and berry::Reflection::DemangleName().