Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
us::ServiceRegistration< I1, I2, I3 > Class Template Reference

#include <usServiceRegistration.h>

Inheritance diagram for us::ServiceRegistration< I1, I2, I3 >:
Collaboration diagram for us::ServiceRegistration< I1, I2, I3 >:

Public Member Functions

 ServiceRegistration ()
 Creates an invalid ServiceRegistration object. You can use this object in boolean expressions and it will evaluate to false. More...
 
ServiceRegistrationBase & operator= (int null)
 Releases any resources held or locked by this ServiceRegistrationBase and renders it invalid. More...
 
ServiceRegistrationBase & operator= (const ServiceRegistrationBase &registration)
 Copy assignment operator. More...
 
ServiceReference< I1 > GetReference (InterfaceType< I1 >) const
 Returns a ServiceReference object for a service being registered. More...
 
ServiceReference< I2 > GetReference (InterfaceType< I2 >) const
 Returns a ServiceReference object for a service being registered. More...
 
ServiceReference< I3 > GetReference (InterfaceType< I3 >) const
 Returns a ServiceReference object for a service being registered. More...
 
- Public Member Functions inherited from us::ServiceRegistrationBase
 ServiceRegistrationBase (const ServiceRegistrationBase &reg)
 Copy constructor. More...
 
 operator bool_type () const
 A boolean conversion operator converting this ServiceRegistrationBase object to true if it is valid and to false otherwise. A SeriveRegistration object is invalid if it was default-constructed or was invalidated by assigning 0 to it. More...
 
ServiceRegistrationBase & operator= (int null)
 Releases any resources held or locked by this ServiceRegistrationBase and renders it invalid. More...
 
 ~ServiceRegistrationBase ()
 Destructor. More...
 
ServiceReferenceBase GetReference (const std::string &interfaceId=std::string()) const
 Returns a ServiceReference object for a service being registered. More...
 
void SetProperties (const ServiceProperties &properties)
 Updates the properties associated with a service. More...
 
void Unregister ()
 Unregisters a service. Remove a ServiceRegistrationBase object from the framework service registry. All ServiceRegistrationBase objects associated with this ServiceRegistrationBase object can no longer be used to interact with the service once unregistration is complete. More...
 
bool IsAvailable () const
 Returns whether the service is still registered. More...
 
bool operator< (const ServiceRegistrationBase &o) const
 Compare two ServiceRegistrationBase objects. More...
 
bool operator== (const ServiceRegistrationBase &registration) const
 Equality comparison operator. More...
 
bool operator== (std::nullptr_t) const noexcept
 Equality comparison with nullptr. More...
 
ServiceRegistrationBase & operator= (const ServiceRegistrationBase &registration)
 Copy assignment operator. More...
 

Detailed Description

template<class I1, class I2 = void, class I3 = void>
class us::ServiceRegistration< I1, I2, I3 >

A registered service.

The framework returns a ServiceRegistration object when a ModuleContext::RegisterService() method invocation is successful. The ServiceRegistration object is for the private use of the registering module and should not be shared with other modules.

The ServiceRegistration object may be used to update the properties of the service or to unregister the service.

Template Parameters
SClass type of the service interface
See also
ModuleContext::RegisterService()
Remarks
This class is thread safe.

Definition at line 39 of file usServiceRegistration.h.

Constructor & Destructor Documentation

◆ ServiceRegistration()

template<class I1 , class I2 = void, class I3 = void>
us::ServiceRegistration< I1, I2, I3 >::ServiceRegistration ( )
inline

Creates an invalid ServiceRegistration object. You can use this object in boolean expressions and it will evaluate to false.

Definition at line 49 of file usServiceRegistration.h.

Member Function Documentation

◆ GetReference() [1/3]

template<class I1 , class I2 = void, class I3 = void>
ServiceReference<I1> us::ServiceRegistration< I1, I2, I3 >::GetReference ( InterfaceType< I1 >  ) const
inline

Returns a ServiceReference object for a service being registered.

The ServiceReference object may be shared with other modules.

Exceptions
std::logic_errorIf this ServiceRegistration object has already been unregistered or if it is invalid.
Returns
ServiceReference object.

Definition at line 66 of file usServiceRegistration.h.

References us::ServiceRegistrationBase::GetReference().

◆ GetReference() [2/3]

template<class I1 , class I2 = void, class I3 = void>
ServiceReference<I2> us::ServiceRegistration< I1, I2, I3 >::GetReference ( InterfaceType< I2 >  ) const
inline

Returns a ServiceReference object for a service being registered.

The ServiceReference object may be shared with other modules.

Exceptions
std::logic_errorIf this ServiceRegistration object has already been unregistered or if it is invalid.
Returns
ServiceReference object.

Definition at line 70 of file usServiceRegistration.h.

References us::ServiceRegistrationBase::GetReference().

◆ GetReference() [3/3]

template<class I1 , class I2 = void, class I3 = void>
ServiceReference<I3> us::ServiceRegistration< I1, I2, I3 >::GetReference ( InterfaceType< I3 >  ) const
inline

Returns a ServiceReference object for a service being registered.

The ServiceReference object may be shared with other modules.

Exceptions
std::logic_errorIf this ServiceRegistration object has already been unregistered or if it is invalid.
Returns
ServiceReference object.

Definition at line 74 of file usServiceRegistration.h.

References us::ServiceRegistrationBase::GetReference().

◆ operator=() [1/2]

template<class I1 , class I2 = void, class I3 = void>
ServiceRegistrationBase& us::ServiceRegistrationBase::operator=

Copy assignment operator.

◆ operator=() [2/2]

template<class I1 , class I2 = void, class I3 = void>
ServiceRegistrationBase& us::ServiceRegistrationBase::operator=

Releases any resources held or locked by this ServiceRegistrationBase and renders it invalid.

Returns
This ServiceRegistrationBase object.

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