#include <Libs/PluginFramework/ctkServiceReference.h>
|
ctkServiceReferencePrivate * | d_ptr |
|
A reference to a service.
The Framework returns ctkServiceReference
objects from the ctkPluginContext::getServiceReference
and ctkPluginContext::getServiceReferences
methods.
A ctkServiceReference
object may be shared between plugins and can be used to examine the properties of the service and to get the service object.
Every service registered in the Framework has a unique ctkServiceRegistration
object and may have multiple, distinct ctkServiceReference
objects referring to it. ctkServiceReference
objects associated with a ctkServiceRegistration
are considered equal (more specifically, their operator==()
method will return true
when compared).
If the same service object is registered multiple times, ctkServiceReference
objects associated with different ctkServiceRegistration
objects are not equal.
- See also
- ctkPluginContext::getServiceReference
-
ctkPluginContext::getServiceReferences
-
ctkPluginContext::getService
Definition at line 68 of file ctkServiceReference.h.
◆ ctkServiceReference() [1/3]
ctkServiceReference::ctkServiceReference |
( |
| ) |
|
Creates an invalid ctkServiceReference object. You can use this object in boolean expressions and it will evaluate to false
.
◆ ctkServiceReference() [2/3]
◆ ~ctkServiceReference()
ctkServiceReference::~ctkServiceReference |
( |
| ) |
|
◆ ctkServiceReference() [3/3]
◆ getPlugin()
QSharedPointer<ctkPlugin> ctkServiceReference::getPlugin |
( |
| ) |
const |
◆ getProperty()
QVariant ctkServiceReference::getProperty |
( |
const QString & |
key | ) |
const |
Returns the property value to which the specified property key is mapped in the properties ctkDictionary
object of the service referenced by this ctkServiceReference
object.
Property keys are case-insensitive.
This method must continue to return property values after the service has been unregistered. This is so references to unregistered services can still be interrogated.
- Parameters
-
- Returns
- The property value to which the key is mapped; an invalid QVariant if there is no property named after the key.
◆ getPropertyKeys()
QStringList ctkServiceReference::getPropertyKeys |
( |
| ) |
const |
◆ getUsingPlugins()
QList<QSharedPointer<ctkPlugin> > ctkServiceReference::getUsingPlugins |
( |
| ) |
const |
Returns the plugins that are using the service referenced by this ctkServiceReference
object. Specifically, this method returns the plugins whose usage count for that service is greater than zero.
- Returns
- A list of plugins whose usage count for the service referenced by this
ctkServiceReference
object is greater than zero.
◆ operator bool()
ctkServiceReference::operator bool |
( |
| ) |
const |
Converts this ctkServiceReference instance into a boolean expression. If this instance was default constructed or the service it references has been unregistered, the conversion returns false
, otherwise it returns true
.
◆ operator<()
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ operator==()
◆ ctkLDAPSearchFilter
◆ ctkPluginAbstractTracked
template<class S , class R , class T >
friend class ctkPluginAbstractTracked |
|
friend |
◆ ctkPluginContext
◆ ctkPluginFrameworkListeners
friend class ctkPluginFrameworkListeners |
|
friend |
◆ ctkPluginPrivate
friend class ctkPluginPrivate |
|
friend |
◆ ctkServiceRegistrationPrivate
friend class ctkServiceRegistrationPrivate |
|
friend |
◆ ctkServiceTracker
template<class S , class T >
◆ ctkServiceTrackerPrivate
template<class S , class T >
◆ qHash
◆ d_ptr
ctkServiceReferencePrivate* ctkServiceReference::d_ptr |
|
protected |
The documentation for this class was generated from the following file: