Medical Imaging Interaction Toolkit  2016.11.0
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

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.

Definition at line 28 of file usServiceProperties.cpp.

Referenced by QmitkToolTrackingStatusWidget::CreateQtPartControl(), mitk::Dispatcher::Dispatcher(), mitk::FileWriterRegistry::GetReferences(), mitk::FileReaderRegistry::GetReferences(), QmitkServiceListWidget::InitPrivate(), mitk::USActivator::Load(), us::operator<<(), and us::ServiceRegistrationBase::SetProperties().

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()

Definition at line 58 of file usServiceProperties.cpp.

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()

Definition at line 64 of file usServiceProperties.cpp.

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()

Definition at line 52 of file usServiceProperties.cpp.

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.

Definition at line 34 of file usServiceProperties.cpp.

Referenced by mitk::FileReaderSelector::FileReaderSelector(), mitk::FileWriterSelector::FileWriterSelector(), mitk::FileReaderWriterBase::GetRegisteredMimeType(), us::ServiceReferenceBase::operator<(), us::operator<<(), and us::ServiceRegistrationBase::SetProperties().

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.

Definition at line 40 of file usServiceProperties.cpp.

Referenced by mitk::FileReaderWriterBase::GetRegisteredMimeType(), mitk::AbstractFileReader::GetServiceProperties(), mitk::AbstractFileWriter::GetServiceProperties(), us::ServiceReferenceBase::operator<(), and us::ServiceRegistrationBase::SetProperties().

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().

Definition at line 46 of file usServiceProperties.cpp.