|
Medical Imaging Interaction Toolkit
2026.06.00
Medical Imaging Interaction Toolkit
|
This category includes classes related to the C++ Micro Services component. More...

Classes | |
| class | us::LDAPFilter |
| An RFC 1960-based Filter. More... | |
| class | us::Module |
| Represents a CppMicroServices module. More... | |
| struct | us::ModuleActivator |
| Customizes the starting and stopping of a CppMicroServices module. More... | |
| class | us::ModuleContext |
| class | us::ModuleEvent |
| An event from the Micro Services framework describing a module lifecycle change. More... | |
| struct | us::ModuleEventHook |
| Module Event Hook Service. More... | |
| struct | us::ModuleFindHook |
| Module Context Hook Service. More... | |
| class | us::ModuleRegistry |
| Here we handle all the modules that are loaded in the framework. More... | |
| class | us::ModuleResource |
| Represents a resource (text file, image, etc.) embedded in a CppMicroServices module. More... | |
| class | us::ModuleResourceStream |
| An input stream class for ModuleResource objects. More... | |
| class | us::ModuleSettings |
| Query and set certain properties of the CppMicroServices library. More... | |
| class | us::ModuleVersion |
| Version identifier for CppMicroServices modules. More... | |
| struct | us::PrototypeServiceFactory |
| A factory for prototype scope services. The factory can provide multiple, unique service objects. More... | |
| class | us::ServiceEvent |
| struct | us::ServiceEventListenerHook |
| Service Event Listener Hook Service. More... | |
| class | us::ServiceException |
| class | us::ServiceFactory |
| struct | us::ServiceFindHook |
| Service Find Hook Service. More... | |
| struct | us::InterfaceType< Interface > |
| A helper type used in several methods to get proper method overload resolutions. More... | |
| struct | us::MakeInterfaceMap< I1, I2, I3 > |
| Helper class for constructing InterfaceMap instances based on service implementations or service factories. More... | |
| struct | us::ServiceListenerHook |
| Service Listener Hook Service. More... | |
| class | us::ServiceObjectsBase |
| Base class for ServiceObjects providing type-erased service object management. More... | |
| class | us::ServiceObjects< S > |
| Allows multiple service objects for a service to be obtained. More... | |
| class | us::ServiceObjects< void > |
| Allows multiple service objects for a service to be obtained. More... | |
| class | us::ServiceReference< S > |
| 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 |
| A map containing interfaces ids and their corresponding service object pointers. More... | |
| typedef std::unordered_map< std::string, Any > | us::ServiceProperties |
| typedef ServiceReference< void > | us::ServiceReferenceU |
| typedef ServiceRegistration< void > | us::ServiceRegistrationU |
Functions | |
| static ModuleContext * | us::GetModuleContext () |
| Returns the module context of the calling module. More... | |
| MITKCPPMICROSERVICES_EXPORT std::ostream & | operator<< (std::ostream &os, const us::LDAPFilter &filter) |
| MITKCPPMICROSERVICES_EXPORT std::ostream & | operator<< (std::ostream &os, const us::Module &module) |
| Stream output operator for Module references. More... | |
| MITKCPPMICROSERVICES_EXPORT std::ostream & | operator<< (std::ostream &os, us::Module const *module) |
| Stream output operator for Module pointers. More... | |
| US_MSVC_POP_WARNING MITKCPPMICROSERVICES_EXPORT std::ostream & | operator<< (std::ostream &os, const us::ModuleResource &resource) |
| Stream output operator for ModuleResource. More... | |
| MITKCPPMICROSERVICES_EXPORT std::ostream & | operator<< (std::ostream &os, const us::ModuleVersion &v) |
| Stream output operator for ModuleVersion. More... | |
| std::string | us::GetDemangledName (const std::type_info &typeInfo) |
| Returns the demangled name for the given type_info. More... | |
| template<class T > | |
| std::string | us_service_interface_iid () |
Returns a unique id for a given type. By default, the demangled name of T is returned. More... | |
| template<class I1 > | |
| I1 * | us::ExtractInterface (const InterfaceMap &map) |
| Extract a service interface pointer from a given InterfaceMap instance. More... | |
| US_MSVC_POP_WARNING MITKCPPMICROSERVICES_EXPORT std::ostream & | operator<< (std::ostream &os, const us::ServiceReferenceBase &serviceRef) |
| Stream output operator for ServiceReferenceBase. More... | |
| MITKCPPMICROSERVICES_EXPORT std::ostream & | us::operator<< (std::ostream &os, ModuleEvent::Type eventType) |
| Stream output operator for ModuleEvent::Type. More... | |
| MITKCPPMICROSERVICES_EXPORT std::ostream & | us::operator<< (std::ostream &os, const ModuleEvent &event) |
| Stream output operator for ModuleEvent. More... | |
| MITKCPPMICROSERVICES_EXPORT std::ostream & | us::operator<< (std::ostream &os, const ServiceEvent::Type &type) |
| Stream output operator for ServiceEvent::Type. More... | |
| MITKCPPMICROSERVICES_EXPORT std::ostream & | us::operator<< (std::ostream &os, const ServiceEvent &event) |
| Stream output operator for ServiceEvent. More... | |
| MITKCPPMICROSERVICES_EXPORT std::ostream & | operator<< (std::ostream &os, const us::ServiceException &exc) |
| Stream output operator for ServiceException. More... | |
This category includes classes related to the C++ Micro Services component.
The CppMicroServices module 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:
| [in] | _service_interface_type | The service interface type. |
| [in] | _service_interface_id | A string literal representing a globally unique identifier. |
Definition at line 103 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 111 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 76 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 48 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 43 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 implements 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 139 of file usServiceInterface.h.
| typedef std::unordered_map<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 36 of file usServiceProperties.h.
| typedef ServiceReference< void > us::ServiceReferenceU |
A service reference of unknown type, which is not bound to any interface identifier.
Definition at line 33 of file usModule.h.
| typedef ServiceRegistration<void> us::ServiceRegistrationU |
A service registration object of unknown type.
Definition at line 190 of file usServiceRegistration.h.
| I1* us::ExtractInterface | ( | const InterfaceMap & | map | ) |
Extract a service interface pointer from a given InterfaceMap instance.
| [in] | map | a InterfaceMap instance. |
I1 interface type or nullptr if map does not contain an entry for the given type.Definition at line 332 of file usServiceInterface.h.
| std::string us::GetDemangledName | ( | const std::type_info & | typeInfo | ) |
Returns the demangled name for the given type_info.
| [in] | typeInfo | The type information to demangle. |
Referenced by us_service_interface_iid().
|
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 41 of file usGetModuleContext.h.
References us::ModuleRegistry::GetModule(), us::Module::GetModuleContext(), and MITK_WARN.
| MITKCPPMICROSERVICES_EXPORT std::ostream& us::operator<< | ( | std::ostream & | os, |
| const ModuleEvent & | event | ||
| ) |
Stream output operator for ModuleEvent.
| [in] | os | The output stream. |
| [in] | event | The module event to write to the stream. |
| MITKCPPMICROSERVICES_EXPORT std::ostream& us::operator<< | ( | std::ostream & | os, |
| const ServiceEvent & | event | ||
| ) |
Stream output operator for ServiceEvent.
| MITKCPPMICROSERVICES_EXPORT std::ostream& us::operator<< | ( | std::ostream & | os, |
| const ServiceEvent::Type & | type | ||
| ) |
Stream output operator for ServiceEvent::Type.
| MITKCPPMICROSERVICES_EXPORT std::ostream& operator<< | ( | std::ostream & | os, |
| const us::LDAPFilter & | filter | ||
| ) |
| MITKCPPMICROSERVICES_EXPORT std::ostream& operator<< | ( | std::ostream & | os, |
| const us::Module & | module | ||
| ) |
Stream output operator for Module references.
| [in] | os | The output stream. |
| [in] | module | The module to write to the stream. |
| US_MSVC_POP_WARNING MITKCPPMICROSERVICES_EXPORT std::ostream& operator<< | ( | std::ostream & | os, |
| const us::ModuleResource & | resource | ||
| ) |
Stream output operator for ModuleResource.
| [in] | os | The output stream. |
| [in] | resource | The module resource to write to the stream. |
| MITKCPPMICROSERVICES_EXPORT std::ostream& operator<< | ( | std::ostream & | os, |
| const us::ModuleVersion & | v | ||
| ) |
Stream output operator for ModuleVersion.
| [in] | os | The output stream. |
| [in] | v | The module version to write to the stream. |
| MITKCPPMICROSERVICES_EXPORT std::ostream& operator<< | ( | std::ostream & | os, |
| const us::ServiceException & | exc | ||
| ) |
Stream output operator for ServiceException.
| US_MSVC_POP_WARNING MITKCPPMICROSERVICES_EXPORT std::ostream& operator<< | ( | std::ostream & | os, |
| const us::ServiceReferenceBase & | serviceRef | ||
| ) |
Stream output operator for ServiceReferenceBase.
| MITKCPPMICROSERVICES_EXPORT std::ostream& us::operator<< | ( | std::ostream & | os, |
| ModuleEvent::Type | eventType | ||
| ) |
Stream output operator for ModuleEvent::Type.
| [in] | os | The output stream. |
| [in] | eventType | The module event type to write to the stream. |
| MITKCPPMICROSERVICES_EXPORT std::ostream& operator<< | ( | std::ostream & | os, |
| us::Module const * | module | ||
| ) |
Stream output operator for Module pointers.
| [in] | os | The output stream. |
| [in] | module | The module pointer to write to the stream. |
| 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 49 of file usServiceInterface.h.
References us::GetDemangledName().