Medical Imaging Interaction Toolkit  2018.04.99-3ec0dd08
Medical Imaging Interaction Toolkit
us::ServiceConstants Namespace Reference

Functions

US_Core_EXPORT const std::string & OBJECTCLASS ()
 
US_Core_EXPORT const std::string & SERVICE_ID ()
 
US_Core_EXPORT const std::string & SERVICE_RANKING ()
 
US_Core_EXPORT const std::string & SERVICE_SCOPE ()
 
US_Core_EXPORT const std::string & SCOPE_SINGLETON ()
 
US_Core_EXPORT const std::string & SCOPE_MODULE ()
 
US_Core_EXPORT const std::string & SCOPE_PROTOTYPE ()
 

Function Documentation

◆ OBJECTCLASS()

US_Core_EXPORT const std::string& us::ServiceConstants::OBJECTCLASS ( )

Service property identifying all of the class names under which a service was registered in the framework. The value of this property must be of type std::vector<std::string>.

This property is set by the framework when a service is registered.

◆ SCOPE_MODULE()

US_Core_EXPORT const std::string& us::ServiceConstants::SCOPE_MODULE ( )

Service scope is module. Each module using the service receives a distinct service object.

See also
SERVICE_SCOPE()

◆ SCOPE_PROTOTYPE()

US_Core_EXPORT const std::string& us::ServiceConstants::SCOPE_PROTOTYPE ( )

Service scope is prototype. Each module using the service receives either a distinct service object or can request multiple distinct service objects via ServiceObjects.

See also
SERVICE_SCOPE()

◆ SCOPE_SINGLETON()

US_Core_EXPORT const std::string& us::ServiceConstants::SCOPE_SINGLETON ( )

Service scope is singleton. All modules using the service receive the same service object.

See also
SERVICE_SCOPE()

◆ SERVICE_ID()

US_Core_EXPORT const std::string& us::ServiceConstants::SERVICE_ID ( )

Service property identifying a service's registration number. The value of this property must be of type long int.

The value of this property is assigned by the framework when a service is registered. The framework assigns a unique value that is larger than all previously assigned values since the framework was started. These values are NOT persistent across restarts of the framework.

◆ SERVICE_RANKING()

US_Core_EXPORT const std::string& us::ServiceConstants::SERVICE_RANKING ( )

Service property identifying a service's ranking number.

This property may be supplied in the ServiceProperties object passed to the ModuleContext::RegisterService method. The value of this property must be of type int.

The service ranking is used by the framework to determine the natural order of services, see ServiceReference::operator<(const ServiceReference&), and the default service to be returned from a call to the ModuleContext::GetServiceReference method.

The default ranking is zero (0). A service with a ranking of std::numeric_limits<int>::max() is very likely to be returned as the default service, whereas a service with a ranking of std::numeric_limits<int>::min() is very unlikely to be returned.

If the supplied property value is not of type int, it is deemed to have a ranking value of zero.

◆ SERVICE_SCOPE()

US_Core_EXPORT const std::string& us::ServiceConstants::SERVICE_SCOPE ( )

Service property identifying a service's scope. This property is set by the framework when a service is registered. If the registered object implements PrototypeServiceFactory, then the value of this service property will be SCOPE_PROTOTYPE(). Otherwise, if the registered object implements ServiceFactory, then the value of this service property will be SCOPE_MODULE(). Otherwise, the value of this service property will be SCOPE_SINGLETON().