Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
Prototype service factory for creating unique instances of QmitUSAbstractCustomWidget. More...
#include <mitkUSUICustomWidgetFactory.h>
Public Member Functions | |
USUICustomWidgetFactory (QmitkUSAbstractCustomWidget *prototype) | |
us::ServiceRegistration< QmitkUSAbstractCustomWidget > | RegisterService (us::ModuleContext *context) |
Registers this factory in the given module context. More... | |
us::InterfaceMap | GetService (us::Module *, const us::ServiceRegistrationBase &) override |
void | UngetService (us::Module *, const us::ServiceRegistrationBase &, const us::InterfaceMap &service) override |
Public Member Functions inherited from us::ServiceFactory | |
virtual | ~ServiceFactory () |
Prototype service factory for creating unique instances of QmitUSAbstractCustomWidget.
Definition at line 32 of file mitkUSUICustomWidgetFactory.h.
mitk::USUICustomWidgetFactory::USUICustomWidgetFactory | ( | QmitkUSAbstractCustomWidget * | prototype | ) |
Definition at line 23 of file mitkUSUICustomWidgetFactory.cpp.
|
overridevirtual |
Returns a service object for a caller.
The framework invokes this method for each caller requesting a service object using ServiceObjects::GetService(). The factory can then return a specific service object for the caller. The framework checks that the returned service object is valid. If the returned service object is empty or does not contain entries for all the interfaces named when the service was registered, a warning is issued and NULL is returned to the caller. If this method throws an exception, a warning is issued and NULL is returned to the caller.
module | The module requesting the service. |
registration | The ServiceRegistrationBase object for the requested service. |
Implements us::PrototypeServiceFactory.
Definition at line 33 of file mitkUSUICustomWidgetFactory.cpp.
us::ServiceRegistration< QmitkUSAbstractCustomWidget > mitk::USUICustomWidgetFactory::RegisterService | ( | us::ModuleContext * | context | ) |
Registers this factory in the given module context.
Definition at line 28 of file mitkUSUICustomWidgetFactory.cpp.
References QmitkUSAbstractCustomWidget::GetServiceProperties().
|
overridevirtual |
Releases a service object created for a caller.
The framework invokes this method when a service has been released by a modules such as by calling ServiceObjects::UngetService(). The service object may then be destroyed. If this method throws an exception, a warning is issued.
module | The module releasing the service. |
registration | The ServiceRegistrationBase object for the service being released. |
service | The service object returned by a previous call to the GetService method. |
Implements us::PrototypeServiceFactory.
Definition at line 39 of file mitkUSUICustomWidgetFactory.cpp.