|
Medical Imaging Interaction Toolkit
2026.06.00
Medical Imaging Interaction Toolkit
|
#include <usServiceReferenceBase.h>

Public Member Functions | |
| ServiceReferenceBase (const ServiceReferenceBase &ref) | |
| Copy constructor. More... | |
| operator bool_type () const | |
Converts this ServiceReferenceBase 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. More... | |
| ServiceReferenceBase & | operator= (int null) |
Releases any resources held or locked by this ServiceReferenceBase and renders it invalid. More... | |
| ~ServiceReferenceBase () | |
| Destructor. More... | |
| Any | GetProperty (const std::string &key) const |
Returns the property value to which the specified property key is mapped in the properties ServiceProperties object of the service referenced by this ServiceReferenceBase object. More... | |
| void | GetPropertyKeys (std::vector< std::string > &keys) const |
Returns a list of the keys in the ServiceProperties object of the service referenced by this ServiceReferenceBase object. More... | |
| Module * | GetModule () const |
Returns the module that registered the service referenced by this ServiceReferenceBase object. More... | |
| void | GetUsingModules (std::vector< Module * > &modules) const |
Returns the modules that are using the service referenced by this ServiceReferenceBase object. Specifically, this method returns the modules whose usage count for that service is greater than zero. More... | |
| std::string | GetInterfaceId () const |
| Returns the interface identifier this ServiceReferenceBase object is bound to. More... | |
| bool | IsConvertibleTo (const std::string &interfaceid) const |
| Checks whether this ServiceReferenceBase object can be converted to another ServiceReferenceBase object, which will be bound to the given interface identifier. More... | |
| bool | operator< (const ServiceReferenceBase &reference) const |
Compares this ServiceReferenceBase with the specified ServiceReferenceBase for order. More... | |
| bool | operator== (const ServiceReferenceBase &reference) const |
| Equality comparison operator. More... | |
| bool | operator== (std::nullptr_t) const noexcept |
| Equality comparison with nullptr. More... | |
| ServiceReferenceBase & | operator= (const ServiceReferenceBase &reference) |
| Copy assignment operator. More... | |
A reference to a service.
Definition at line 34 of file usServiceReferenceBase.h.
| us::ServiceReferenceBase::ServiceReferenceBase | ( | const ServiceReferenceBase & | ref | ) |
Copy constructor.
| us::ServiceReferenceBase::~ServiceReferenceBase | ( | ) |
Destructor.
| std::string us::ServiceReferenceBase::GetInterfaceId | ( | ) | const |
Returns the interface identifier this ServiceReferenceBase object is bound to.
A default constructed ServiceReferenceBase object is not bound to any interface identifier and calling this method will return an empty string.
Referenced by us::ServiceReference< S >::ServiceReference().
| Module* us::ServiceReferenceBase::GetModule | ( | ) | const |
Returns the module that registered the service referenced by this ServiceReferenceBase object.
This method must return 0 when the service has been unregistered. This can be used to determine if the service has been unregistered.
ServiceReferenceBase object; 0 if that service has already been unregistered. | Any us::ServiceReferenceBase::GetProperty | ( | const std::string & | key | ) | const |
Returns the property value to which the specified property key is mapped in the properties ServiceProperties object of the service referenced by this ServiceReferenceBase object.
Property keys are case-insensitive.
This method continues to return property values after the service has been unregistered. This is so references to unregistered services can still be interrogated.
If this ServiceReferenceBase is invalid (default-constructed), returns an empty Any.
| [in] | key | The property key. |
| void us::ServiceReferenceBase::GetPropertyKeys | ( | std::vector< std::string > & | keys | ) | const |
Returns a list of the keys in the ServiceProperties object of the service referenced by this ServiceReferenceBase object.
This method will continue to return the keys after the service has been unregistered. This is so references to unregistered services can still be interrogated.
If this ServiceReferenceBase is invalid (default-constructed), keys is left unchanged.
| [out] | keys | A vector being filled with the property keys. |
| void us::ServiceReferenceBase::GetUsingModules | ( | std::vector< Module * > & | modules | ) | const |
Returns the modules that are using the service referenced by this ServiceReferenceBase object. Specifically, this method returns the modules whose usage count for that service is greater than zero.
If this ServiceReferenceBase is invalid (default-constructed), modules is left unchanged.
| [out] | modules | A list of modules whose usage count for the service referenced by this ServiceReferenceBase object is greater than zero. |
| bool us::ServiceReferenceBase::IsConvertibleTo | ( | const std::string & | interfaceid | ) | const |
Checks whether this ServiceReferenceBase object can be converted to another ServiceReferenceBase object, which will be bound to the given interface identifier.
ServiceReferenceBase objects can be converted if the underlying service implementation was registered under multiple service interfaces.
| [in] | interfaceid | The target interface identifier. |
true if this ServiceReferenceBase object can be converted, false otherwise. Referenced by us::ServiceReference< S >::ServiceReference().
| us::ServiceReferenceBase::operator bool_type | ( | ) | const |
Converts this ServiceReferenceBase 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.
| bool us::ServiceReferenceBase::operator< | ( | const ServiceReferenceBase & | reference | ) | const |
Compares this ServiceReferenceBase with the specified ServiceReferenceBase for order.
If this ServiceReferenceBase and the specified ServiceReferenceBase have the same service id they are equal. This ServiceReferenceBase is less than the specified ServiceReferenceBase if it has a lower service ranking and greater if it has a higher service ranking. Otherwise, if this ServiceReferenceBase and the specified ServiceReferenceBase have the same service ranking, this ServiceReferenceBase is less than the specified ServiceReferenceBase if it has a higher service id and greater if it has a lower service id.
| [in] | reference | The ServiceReferenceBase to be compared. |
ServiceReferenceBase is less than or greater than the specified ServiceReferenceBase. | ServiceReferenceBase& us::ServiceReferenceBase::operator= | ( | const ServiceReferenceBase & | reference | ) |
Copy assignment operator.
| ServiceReferenceBase& us::ServiceReferenceBase::operator= | ( | int | null | ) |
Releases any resources held or locked by this ServiceReferenceBase and renders it invalid.
| bool us::ServiceReferenceBase::operator== | ( | const ServiceReferenceBase & | reference | ) | const |
Equality comparison operator.
|
noexcept |
Equality comparison with nullptr.