Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
This category includes classes related to the C++ Micro Services component. More...
Namespaces | |
us::ServiceConstants | |
Classes | |
class | us::LDAPFilter |
class | us::Module |
struct | us::ModuleActivator |
class | ModuleContext |
class | us::ModuleEvent |
struct | us::ModuleEventHook |
struct | us::ModuleFindHook |
class | us::ModuleRegistry |
class | us::ModuleResource |
class | us::ModuleResourceStream |
class | us::ModuleSettings |
class | us::ModuleVersion |
struct | us::PrototypeServiceFactory |
class | us::ServiceEvent |
struct | ServiceEventListenerHook |
class | us::ServiceException |
class | us::ServiceFactory |
struct | us::ServiceFindHook |
struct | us::InterfaceType< Interface > |
struct | us::MakeInterfaceMap< I1, I2, I3 > |
class | us::ServiceObjects< S > |
class | us::ServiceObjects< void > |
class | us::ServiceReferenceBase |
class | us::ServiceRegistration< I1, I2, I3 > |
class | us::ServiceRegistrationBase |
struct | us::TrackedTypeTraitsBase< T, TTT > |
struct | us::TrackedTypeTraits< S, T * > |
class | us::ServiceTracker< S, TTT > |
struct | us::ServiceTrackerCustomizer< S, T > |
Macros | |
#define | US_EXPORT_MODULE_ACTIVATOR(_activator_type) |
Export a module activator class. More... | |
#define | US_INITIALIZE_STATIC_MODULE(_module_name) |
Initialize a static module. More... | |
#define | US_IMPORT_MODULE(_module_name) |
Import a static module. More... | |
#define | US_INITIALIZE_MODULE |
Creates initialization code for a module. More... | |
#define | US_DECLARE_SERVICE_INTERFACE(_service_interface_type, _service_interface_id) |
Declare a service interface id. More... | |
Typedefs | |
typedef std::map< std::string, void * > | us::InterfaceMap |
typedef US_UNORDERED_MAP_TYPE< std::string, Any > | us::ServiceProperties |
typedef ServiceRegistration< void > | us::ServiceRegistrationU |
Functions | |
static ModuleContext * | us::GetModuleContext () |
Returns the module context of the calling module. More... | |
US_Core_EXPORT std::ostream & | operator<< (std::ostream &os, const us::LDAPFilter &filter) |
US_Core_EXPORT std::ostream & | operator<< (std::ostream &os, const us::Module &module) |
US_Core_EXPORT std::ostream & | operator<< (std::ostream &os, us::Module const *module) |
US_MSVC_POP_WARNING US_Core_EXPORT std::ostream & | operator<< (std::ostream &os, const us::ModuleResource &resource) |
US_Core_EXPORT std::ostream & | operator<< (std::ostream &os, const us::ModuleVersion &v) |
template<class T > | |
std::string | us_service_interface_iid () |
template<class I1 > | |
I1 * | us::ExtractInterface (const InterfaceMap &map) |
US_MSVC_POP_WARNING US_Core_EXPORT std::ostream & | operator<< (std::ostream &os, const us::ServiceReferenceBase &serviceRef) |
US_Core_EXPORT std::ostream & | us::operator<< (std::ostream &os, ModuleEvent::Type eventType) |
US_Core_EXPORT std::ostream & | us::operator<< (std::ostream &os, const ModuleEvent &event) |
US_Core_EXPORT std::ostream & | us::operator<< (std::ostream &os, const ServiceEvent::Type &type) |
US_Core_EXPORT std::ostream & | us::operator<< (std::ostream &os, const ServiceEvent &event) |
US_Core_EXPORT std::ostream & | operator<< (std::ostream &os, const us::ServiceException &exc) |
This category includes classes related to the C++ Micro Services component.
The C++ Micro Services component provides a dynamic service registry based on the service layer as specified in the OSGi R4.2 specifications.
#define US_DECLARE_SERVICE_INTERFACE | ( | _service_interface_type, | |
_service_interface_id | |||
) |
Declare a service interface id.
This macro associates the given identifier _service_interface_id (a string literal) to the interface class called _service_interface_type. The Identifier must be unique. For example:
The usage of this macro is optional and the service interface id which is automatically associated with any type is usually good enough (the demangled type name). However, care must be taken if the default id is compared with a string literal hard-coding a service interface id. E.g. the default id for templated types in the STL may differ between platforms. For user-defined types and templates the ids are typically consistent, but platform specific default template arguments will lead to different ids.
This macro is normally used right after the class definition for _service_interface_type, in a header file.
If you want to use US_DECLARE_SERVICE_INTERFACE with interface classes declared in a namespace then you have to make sure the US_DECLARE_SERVICE_INTERFACE macro call is not inside a namespace though. For example:
_service_interface_type | The service interface type. |
_service_interface_id | A string literal representing a globally unique identifier. |
Definition at line 104 of file usServiceInterface.h.
#define US_EXPORT_MODULE_ACTIVATOR | ( | _activator_type | ) |
Export a module activator class.
_activator_type | The fully-qualified type-name of the module activator class. |
Call this macro after the definition of your module activator to make it accessible by the CppMicroServices library.
Example:
Definition at line 119 of file usModuleActivator.h.
#define US_IMPORT_MODULE | ( | _module_name | ) |
Import a static module.
_module_name | The name of the module to import. |
This macro imports the static module named _module_name
.
Inserting this macro into your application's source code will allow you to make use of a static module. It will initialize the static module and calls its ModuleActivator. It the module does not provide an activator, use the US_INITIALIZE_STATIC_MODULE macro instead. Do not forget to actually link the static module to the importing executable or shared library.
Example:
Definition at line 85 of file usModuleImport.h.
#define US_INITIALIZE_MODULE |
Creates initialization code for a module.
Each module which wants to register itself with the CppMicroServices library has to put a call to this macro in one of its source files. Further, the modules source files must be compiled with the US_MODULE_NAME
pre-processor definition set to a module-unique identifier.
Calling the US_INITIALIZE_MODULE
macro will initialize the module for use with the CppMicroServices library, using a default auto-load directory named after the US_MODULE_NAME
definition.
usFunctionGenerateModuleInit()
. Definition at line 57 of file usModuleInitialization.h.
#define US_INITIALIZE_STATIC_MODULE | ( | _module_name | ) |
Initialize a static module.
_module_name | The name of the module to initialize. |
This macro initializes the static module named _module_name
.
It the module provides an activator, use the US_IMPORT_MODULE macro instead, to ensure that the activator is called. Do not forget to actually link the static module to the importing executable or shared library.
Definition at line 52 of file usModuleImport.h.
typedef std::map<std::string, void*> us::InterfaceMap |
A map containing interfaces ids and their corresponding service object pointers. InterfaceMap instances represent a complete service object which implementes one or more service interfaces. For each implemented service interface, there is an entry in the map with the key being the service interface id and the value a pointer to the service interface implementation.
To create InterfaceMap instances, use the MakeInterfaceMap helper class.
Definition at line 138 of file usServiceInterface.h.
typedef US_UNORDERED_MAP_TYPE<std::string, Any> us::ServiceProperties |
A hash table with std::string as the key type and Any as the value type. It is typically used for passing service properties to ModuleContext::RegisterService.
Definition at line 42 of file usServiceProperties.h.
typedef ServiceRegistration<void> us::ServiceRegistrationU |
A service registration object of unknown type.
Definition at line 199 of file usServiceRegistration.h.
Definition at line 54 of file usServiceException.h.
Enumerator | |
---|---|
LOADED |
The module has been loaded. The module's ModuleActivator Load method has been executed. |
UNLOADED |
The module has been unloaded. The module's ModuleActivator Unload method has been executed. |
LOADING |
The module is about to be loaded. The module's ModuleActivator Load method is about to be called. |
UNLOADING |
The module is about to be unloaded. The module's ModuleActivator Unload method is about to be called. |
Definition at line 58 of file usModuleEvent.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 67 of file usServiceEvent.h.
I1* us::ExtractInterface | ( | const InterfaceMap & | map | ) |
Extract a service interface pointer from a given InterfaceMap instance.
map | a InterfaceMap instance. |
I1
interface type or NULL if map
does not contain an entry for the given type.Definition at line 330 of file usServiceInterface.h.
|
inlinestatic |
Returns the module context of the calling module.
This function allows easy access to the ModuleContext instance from inside a C++ Micro Services module.
Definition at line 50 of file usGetModuleContext.h.
References us::Module::GetModuleContext().
Referenced by mitk::Tool::Activated(), mitk::ToolManager::ActivateTool(), mitk::EventConfig::AddConfig(), mitk::DICOMFileReaderSelector::AddConfigFromResource(), mitk::DICOMFileReaderSelector::AddConfigsFromResources(), mitk::SegTool2D::AddContourmarker(), mitk::Gizmo::AddGizmoToNode(), mitk::OclFilter::CompileSource(), mitk::AbstractToFDeviceFactory::ConnectToFDevice(), mitk::OclImage::CreateGPUImage(), QmitkServiceListWidget::CreateQtPartControl(), QmitkToolTrackingStatusWidget::CreateQtPartControl(), mitk::TrackingDeviceSourceConfigurator::CreateTrackingDeviceSource(), mitk::Tool::Deactivated(), QmitkUSDeviceManagerWidget::DisconnectAllDevices(), mitk::Dispatcher::Dispatcher(), mitk::EventConfig::EventConfig(), mitk::LiveWireTool2D::FinishTool(), mitk::TrackingVolumeGenerator::GenerateData(), mitk::ToFDeviceFactoryManager::GetConnectedDevices(), mitk::GetCoreService(), mitk::GetCurrentDICOMTagsOfInterest(), mitk::FillRegionTool::GetCursorIconResource(), mitk::EraseRegionTool::GetCursorIconResource(), mitk::DrawPaintbrushTool::GetCursorIconResource(), mitk::ErasePaintbrushTool::GetCursorIconResource(), mitk::AddContourTool::GetCursorIconResource(), mitk::LiveWireTool2D::GetCursorIconResource(), mitk::SubtractContourTool::GetCursorIconResource(), mitk::CorrectorTool2D::GetCursorIconResource(), mitk::RegionGrowingTool::GetCursorIconResource(), mitk::FastMarchingTool::GetCursorIconResource(), mitk::PersistenceService::GetDefaultPersistenceFile(), GetDescriptionsService(), mitk::IGTLMessageProvider::GetFittingSource(), mitk::OtsuTool3D::GetIconResource(), mitk::FillRegionTool::GetIconResource(), mitk::BinaryThresholdTool::GetIconResource(), mitk::EraseRegionTool::GetIconResource(), mitk::BinaryThresholdULTool::GetIconResource(), mitk::PickingTool::GetIconResource(), mitk::DrawPaintbrushTool::GetIconResource(), mitk::ErasePaintbrushTool::GetIconResource(), mitk::LiveWireTool2D::GetIconResource(), mitk::AddContourTool::GetIconResource(), mitk::SubtractContourTool::GetIconResource(), mitk::CorrectorTool2D::GetIconResource(), mitk::RegionGrowingTool::GetIconResource(), mitk::AdaptiveRegionGrowingTool::GetIconResource(), mitk::WatershedTool::GetIconResource(), mitk::FastMarchingTool3D::GetIconResource(), mitk::FastMarchingTool::GetIconResource(), mitk::ToolManagerProvider::GetInstance(), mitk::IGTLMeasurements::GetInstance(), mitk::ToFDeviceFactoryManager::GetInstanceOfDevice(), mitk::AbstractToFDeviceFactory::GetIntrinsicsResource(), mitk::OclBinaryThresholdImageFilter::GetModule(), mitk::PersistenceService::GetModuleContext(), GetPersistenceService(), GetPropertyService(), mitk::FileReaderRegistry::GetReader(), mitk::FileReaderRegistry::GetReaders(), mitk::FileWriterRegistry::GetReferences(), mitk::FileReaderRegistry::GetReferences(), mitk::ToFDeviceFactoryManager::GetRegisteredDeviceFactories(), mitk::FileReaderWriterBase::GetRegisteredMimeType(), mitk::CoreServices::GetShaderRepository(), mitk::FileWriterRegistry::GetWriter(), mitk::FileWriterRegistry::GetWriters(), QmitkIGTLDeviceSourceSelectionWidget::IGTLDeviceSourceSelected(), QmitkIGTLMessageSourceSelectionWidget::IGTLMessageSourceSelected(), mitk::OclFilter::Initialize(), mitk::USDevice::Initialize(), mitk::Tool::InitializeStateMachine(), mitk::StateMachineContainer::LoadBehavior(), SphereInterpolator::LoadLookuptables(), mitk::LevelWindowPreset::LoadPreset(), mitk::RigidRegistrationPreset::LoadPreset(), mitk::AnatomicalStructureColorPresets::LoadPreset(), main(), mitkEventConfigTest(), mitkShaderRepositoryTest(), QmitkNavigationDataSourceSelectionWidget::NavigationDataSourceSelected(), QmitkNavigationToolStorageSelectionWidget::NavigationToolStorageSelected(), QmitkCtkPythonShell::QmitkCtkPythonShell(), QmitkPythonTextEditor::QmitkPythonTextEditor(), QmitkPythonVariableStackTableModel::QmitkPythonVariableStackTableModel(), QmitkPythonVariableStackTableView::QmitkPythonVariableStackTableView(), QmitkTrackingDeviceConfigurationWidget::RefreshTrackingDeviceCollection(), QmitkNavigationToolCreationWidget::RefreshTrackingDeviceCollection(), mitk::TrackingDeviceWidgetCollection::RegisterAsMicroservice(), mitk::TrackingDeviceTypeCollection::RegisterAsMicroservice(), mitk::IGTLDeviceSource::RegisterAsMicroservice(), mitk::NavigationToolStorage::RegisterAsMicroservice(), mitk::NavigationDataSource::RegisterAsMicroservice(), mitk::IGTLMessageSource::RegisterAsMicroservice(), mitk::USCombinedModality::RegisterAsMicroservice(), mitk::ToolManager::RegisterClient(), mitk::BaseDataCompare::RegisterCoreEquals(), mitk::AbstractFileWriter::RegisterService(), mitk::AbstractFileReader::RegisterService(), mitk::TrackingVolumeGenerator::SetTrackingDevice(), mitk::TrackingVolumeGenerator::SetTrackingDeviceType(), mitk::TrackingDevice::SetType(), SetUpBeforeTest(), mitk::MimeTypeProvider::Start(), mitk::ToFImageGrabber::StartCamera(), mitk::USDevicePersistence::StoreCurrentDevices(), mitk::ToFDeviceFactoryManager::ToFDeviceFactoryManager(), mitk::OclBinaryThresholdImageFilter::Update(), mitk::XML2EventParser::XML2EventParser(), mitk::OclFilter::~OclFilter(), QmitkCtkPythonShell::~QmitkCtkPythonShell(), QmitkPythonTextEditor::~QmitkPythonTextEditor(), and QmitkPythonVariableStackTableModel::~QmitkPythonVariableStackTableModel().
US_Core_EXPORT std::ostream& operator<< | ( | std::ostream & | os, |
const us::ServiceException & | exc | ||
) |
std::ostream & us::operator<< | ( | std::ostream & | os, |
ModuleEvent::Type | eventType | ||
) |
Definition at line 97 of file usModuleEvent.cpp.
References us::ModuleEvent::LOADED, us::ModuleEvent::LOADING, us::ModuleEvent::UNLOADED, and us::ModuleEvent::UNLOADING.
Referenced by operator<<().
std::ostream & us::operator<< | ( | std::ostream & | os, |
const ModuleEvent & | event | ||
) |
Definition at line 110 of file usModuleEvent.cpp.
References us::Module::GetLocation(), us::Module::GetModuleId(), and us::ModuleEvent::IsNull().
US_Core_EXPORT std::ostream& operator<< | ( | std::ostream & | os, |
const us::LDAPFilter & | filter | ||
) |
std::ostream & us::operator<< | ( | std::ostream & | os, |
const ServiceEvent::Type & | type | ||
) |
Definition at line 97 of file usServiceEvent.cpp.
References us::ServiceEvent::MODIFIED, us::ServiceEvent::MODIFIED_ENDMATCH, us::ServiceEvent::REGISTERED, and us::ServiceEvent::UNREGISTERING.
std::ostream & us::operator<< | ( | std::ostream & | os, |
const ServiceEvent & | event | ||
) |
Definition at line 110 of file usServiceEvent.cpp.
References us::any_cast(), us::ServiceEvent::IsNull(), us::ServiceConstants::OBJECTCLASS(), us::ServiceConstants::SERVICE_ID(), and us::Any::ToString().
US_MSVC_POP_WARNING US_Core_EXPORT std::ostream& operator<< | ( | std::ostream & | os, |
const us::ServiceReferenceBase & | serviceRef | ||
) |
US_Core_EXPORT std::ostream& operator<< | ( | std::ostream & | os, |
const us::ModuleVersion & | v | ||
) |
US_MSVC_POP_WARNING US_Core_EXPORT std::ostream& operator<< | ( | std::ostream & | os, |
const us::ModuleResource & | resource | ||
) |
US_Core_EXPORT std::ostream& operator<< | ( | std::ostream & | os, |
const us::Module & | module | ||
) |
US_Core_EXPORT std::ostream& operator<< | ( | std::ostream & | os, |
us::Module const * | module | ||
) |
std::string us_service_interface_iid | ( | ) |
Returns a unique id for a given type. By default, the demangled name of T
is returned.
This template method may be specialized directly or be using the macro US_DECLARE_SERVICE_INTERFACE to return a custom id for each service interface.
T | The service interface type. |
Definition at line 50 of file usServiceInterface.h.
References us::GetDemangledName().