![]() |
CTK
0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
|
#include <Libs/PluginFramework/ctkServiceRegistration.h>
Public Member Functions | |
ctkServiceRegistration () | |
ctkServiceRegistration (const ctkServiceRegistration ®) | |
ctkServiceReference | getReference () const |
operator bool () const | |
bool | operator< (const ctkServiceRegistration &o) const |
ctkServiceRegistration & | operator= (int null) |
ctkServiceRegistration & | operator= (const ctkServiceRegistration ®istration) |
bool | operator== (const ctkServiceRegistration ®istration) const |
void | setProperties (const ctkDictionary &properties) |
void | unregister () |
~ctkServiceRegistration () | |
Protected Member Functions | |
ctkServiceRegistration (ctkServiceRegistrationPrivate *registrationPrivate) | |
ctkServiceRegistration (ctkPluginPrivate *plugin, QObject *service, const ctkDictionary &props) | |
Protected Attributes | |
ctkServiceRegistrationPrivate * | d_ptr |
Friends | |
class | ctkServiceReferencePrivate |
class | ctkServices |
uint CTK_PLUGINFW_EXPORT | qHash (const ctkServiceRegistration &) |
A registered service.
The Framework returns a ctkServiceRegistration
object when a ctkPluginContext::registerService()
method invocation is successful. The ctkServiceRegistration
object is for the private use of the registering plugin and should not be shared with other plugins.
The ctkServiceRegistration
object may be used to update the properties of the service or to unregister the service.
Definition at line 50 of file ctkServiceRegistration.h.
ctkServiceRegistration::ctkServiceRegistration | ( | ) |
Creates an invalid ctkServiceRegistration object. You can use this object in boolean expressions and it will evaluate to false
.
ctkServiceRegistration::ctkServiceRegistration | ( | const ctkServiceRegistration & | reg | ) |
ctkServiceRegistration::~ctkServiceRegistration | ( | ) |
|
protected |
|
protected |
ctkServiceReference ctkServiceRegistration::getReference | ( | ) | const |
Returns a ctkServiceReference
object for a service being registered.
The ctkServiceReference
object may be shared with other plugins.
ctkIllegalStateException | If this ctkServiceRegistration object has already been unregistered or if it is invalid. |
ctkServiceReference
object. ctkServiceRegistration::operator bool | ( | ) | const |
bool ctkServiceRegistration::operator< | ( | const ctkServiceRegistration & | o | ) | const |
ctkServiceRegistration& ctkServiceRegistration::operator= | ( | int | null | ) |
Releases any resources held or locked by this ctkServiceRegistration
and renders it invalid.
ctkServiceRegistration& ctkServiceRegistration::operator= | ( | const ctkServiceRegistration & | registration | ) |
bool ctkServiceRegistration::operator== | ( | const ctkServiceRegistration & | registration | ) | const |
void ctkServiceRegistration::setProperties | ( | const ctkDictionary & | properties | ) |
Updates the properties associated with a service.
The ctkPluginConstants#OBJECTCLASS and ctkPluginConstants#SERVICE_ID keys cannot be modified by this method. These values are set by the Framework when the service is registered in the environment.
The following steps are required to modify service properties:
properties | The properties for this service. See ctkPluginConstants for a list of standard service property keys. Changes should not be made to this object after calling this method. To update the service's properties this method should be called again. |
ctkIllegalStateException | If this ctkServiceRegistration object has already been unregistered or if it is invalid. |
ctkInvalidArgumentException | If properties contains case variants of the same key name. |
void ctkServiceRegistration::unregister | ( | ) |
Unregisters a service. Remove a ctkServiceRegistration
object from the Framework service registry. All ctkServiceReference
objects associated with this ctkServiceRegistration
object can no longer be used to interact with the service once unregistration is complete.
The following steps are required to unregister a service:
ctkServiceReference
objects for the service may no longer be used to get a service object for the service. ctkServiceFactory::ungetService
method is called to release the service object for the plugin. ctkIllegalStateException | If this ctkServiceRegistration object has already been unregistered or if it is invalid. |
|
friend |
Definition at line 157 of file ctkServiceRegistration.h.
|
friend |
Definition at line 156 of file ctkServiceRegistration.h.
|
friend |
|
protected |
Definition at line 166 of file ctkServiceRegistration.h.