Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
us::MakeInterfaceMap< I1, I2, I3 > Struct Template Reference

Helper class for constructing InterfaceMap instances based on service implementations or service factories. More...

#include <usServiceInterface.h>

Collaboration diagram for us::MakeInterfaceMap< I1, I2, I3 >:

Public Member Functions

template<class Impl >
 MakeInterfaceMap (Impl *impl)
 Constructor taking a service implementation pointer. More...
 
 MakeInterfaceMap (ServiceFactory *factory)
 Constructor taking a service factory. More...
 
 operator InterfaceMap ()
 Conversion operator to InterfaceMap. More...
 

Public Attributes

ServiceFactory * m_factory
 
I1 * m_interface1
 
I2 * m_interface2
 
I3 * m_interface3
 

Detailed Description

template<class I1, class I2 = void, class I3 = void>
struct us::MakeInterfaceMap< I1, I2, I3 >

Helper class for constructing InterfaceMap instances based on service implementations or service factories.

Example usage:

MyService service; // implements I1 and I2
InterfaceMap im = MakeInterfaceMap<I1,I2>(&service);
std::map< std::string, void * > InterfaceMap
A map containing interfaces ids and their corresponding service object pointers.

The MakeInterfaceMap supports service implementations with up to three service interfaces.

See also
InterfaceMap

Definition at line 180 of file usServiceInterface.h.

Constructor & Destructor Documentation

◆ MakeInterfaceMap() [1/2]

template<class I1 , class I2 = void, class I3 = void>
template<class Impl >
us::MakeInterfaceMap< I1, I2, I3 >::MakeInterfaceMap ( Impl *  impl)
inline

Constructor taking a service implementation pointer.

Parameters
[in]implA service implementation pointer, which must be castable to a all specified service interfaces.

Definition at line 194 of file usServiceInterface.h.

◆ MakeInterfaceMap() [2/2]

template<class I1 , class I2 = void, class I3 = void>
us::MakeInterfaceMap< I1, I2, I3 >::MakeInterfaceMap ( ServiceFactory *  factory)
inline

Constructor taking a service factory.

Parameters
[in]factoryA service factory.

Definition at line 206 of file usServiceInterface.h.

Member Function Documentation

◆ operator InterfaceMap()

template<class I1 , class I2 = void, class I3 = void>
us::MakeInterfaceMap< I1, I2, I3 >::operator InterfaceMap ( )
inline

Member Data Documentation

◆ m_factory

template<class I1 , class I2 = void, class I3 = void>
ServiceFactory* us::MakeInterfaceMap< I1, I2, I3 >::m_factory

◆ m_interface1

template<class I1 , class I2 = void, class I3 = void>
I1* us::MakeInterfaceMap< I1, I2, I3 >::m_interface1

◆ m_interface2

template<class I1 , class I2 = void, class I3 = void>
I2* us::MakeInterfaceMap< I1, I2, I3 >::m_interface2

◆ m_interface3

template<class I1 , class I2 = void, class I3 = void>
I3* us::MakeInterfaceMap< I1, I2, I3 >::m_interface3

The documentation for this struct was generated from the following file: