Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitk::USUICustomWidgetFactory Class Reference

Prototype service factory for creating unique instances of QmitUSAbstractCustomWidget. More...

#include <mitkUSUICustomWidgetFactory.h>

Inheritance diagram for mitk::USUICustomWidgetFactory:
Collaboration diagram for mitk::USUICustomWidgetFactory:

Public Member Functions

 USUICustomWidgetFactory (QmitkUSAbstractCustomWidget *prototype)
 
us::ServiceRegistration< QmitkUSAbstractCustomWidgetRegisterService (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 ()
 

Detailed Description

Prototype service factory for creating unique instances of QmitUSAbstractCustomWidget.

Definition at line 32 of file mitkUSUICustomWidgetFactory.h.

Constructor & Destructor Documentation

mitk::USUICustomWidgetFactory::USUICustomWidgetFactory ( QmitkUSAbstractCustomWidget prototype)

Definition at line 23 of file mitkUSUICustomWidgetFactory.cpp.

Member Function Documentation

us::InterfaceMap mitk::USUICustomWidgetFactory::GetService ( us::Module module,
const us::ServiceRegistrationBase registration 
)
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.

Parameters
moduleThe module requesting the service.
registrationThe ServiceRegistrationBase object for the requested service.
Returns
A service object that must contain entries for all the interfaces named when the service was registered.
See also
ServiceObjects::GetService()
InterfaceMap

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().

void mitk::USUICustomWidgetFactory::UngetService ( us::Module module,
const us::ServiceRegistrationBase registration,
const us::InterfaceMap service 
)
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.

Parameters
moduleThe module releasing the service.
registrationThe ServiceRegistrationBase object for the service being released.
serviceThe service object returned by a previous call to the GetService method.
See also
ServiceObjects::UngetService()

Implements us::PrototypeServiceFactory.

Definition at line 39 of file mitkUSUICustomWidgetFactory.cpp.


The documentation for this class was generated from the following files: