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

#include <usServiceInterface.h>

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

Public Member Functions

template<class Impl >
 MakeInterfaceMap (Impl *impl)
 
 MakeInterfaceMap (ServiceFactory *factory)
 
 operator InterfaceMap ()
 

Public Attributes

ServiceFactorym_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);

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

See also
InterfaceMap

Definition at line 179 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
implA service implementation pointer, which must be castable to a all specified service interfaces.

Definition at line 193 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
factoryA service factory.

Definition at line 205 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

Definition at line 217 of file usServiceInterface.h.

References us::InsertInterfaceType().

Member Data Documentation

◆ m_factory

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

Definition at line 181 of file usServiceInterface.h.

◆ m_interface1

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

Definition at line 182 of file usServiceInterface.h.

◆ m_interface2

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

Definition at line 183 of file usServiceInterface.h.

◆ m_interface3

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

Definition at line 184 of file usServiceInterface.h.


The documentation for this struct was generated from the following file:
us::InterfaceMap
std::map< std::string, void * > InterfaceMap
Definition: usServiceInterface.h:138