Medical Imaging Interaction Toolkit
2023.04.00
Medical Imaging Interaction Toolkit
|
#include <usServiceEvent.h>
Public Types | |
enum | Type { REGISTERED, MODIFIED, UNREGISTERING, MODIFIED_ENDMATCH } |
Public Member Functions | |
ServiceEvent () | |
~ServiceEvent () | |
bool | IsNull () const |
ServiceEvent (Type type, const ServiceReferenceBase &reference) | |
ServiceEvent (const ServiceEvent &other) | |
ServiceEvent & | operator= (const ServiceEvent &other) |
ServiceReferenceU | GetServiceReference () const |
template<class S > | |
ServiceReference< S > | GetServiceReference (InterfaceType< S >) const |
Type | GetType () const |
An event from the Micro Services framework describing a service lifecycle change.
ServiceEvent
objects are delivered to listeners connected via ModuleContext::AddServiceListener() when a change occurs in this service's lifecycle. A type code is used to identify the event type for future extendability.
Definition at line 55 of file usServiceEvent.h.
Enumerator | |
---|---|
REGISTERED | This service has been registered. This event is delivered after the service has been registered with the framework.
|
MODIFIED | The properties of a registered service have been modified. This event is delivered after the service properties have been modified. |
UNREGISTERING | This service is in the process of being unregistered. This event is delivered before the service has completed unregistering. If a module is using a service that is |
MODIFIED_ENDMATCH | The properties of a registered service have been modified and the new properties no longer match the listener's filter. This event is delivered after the service properties have been modified. This event is only delivered to listeners which were added with a non-empty filter where the filter matched the service properties prior to the modification but the filter does not match the modified service properties. |
Definition at line 62 of file usServiceEvent.h.
us::ServiceEvent::ServiceEvent | ( | ) |
Creates an invalid instance.
us::ServiceEvent::~ServiceEvent | ( | ) |
us::ServiceEvent::ServiceEvent | ( | Type | type, |
const ServiceReferenceBase & | reference | ||
) |
Creates a new service event object.
type | The event type. |
reference | A ServiceReference object to the service that had a lifecycle change. |
us::ServiceEvent::ServiceEvent | ( | const ServiceEvent & | other | ) |
ServiceReferenceU us::ServiceEvent::GetServiceReference | ( | ) | const |
Returns a reference to the service that had a change occur in its lifecycle.
This reference is the source of the event.
|
inline |
Definition at line 158 of file usServiceEvent.h.
Type us::ServiceEvent::GetType | ( | ) | const |
Returns the type of event. The event type values are:
bool us::ServiceEvent::IsNull | ( | ) | const |
Can be used to check if this ServiceEvent instance is valid, or if it has been constructed using the default constructor.
true
if this event object is valid, false
otherwise. ServiceEvent& us::ServiceEvent::operator= | ( | const ServiceEvent & | other | ) |