CppMicroServices

C++ Micro Services: MakeInterfaceMap< I1, I2, I3 > Struct Template Reference
MakeInterfaceMap< I1, I2, I3 > Struct Template Reference

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

Collaboration diagram for 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 ()
 

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 MakeInterfaceMap< I1, I2, I3 >

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

Example usage:

* MyService service; // implementes I1 and I2
*

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

See Also
InterfaceMap

Constructor & Destructor Documentation

template<class I1, class I2 = void, class I3 = void>
template<class Impl >
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.
template<class I1, class I2 = void, class I3 = void>
MakeInterfaceMap< I1, I2, I3 >::MakeInterfaceMap ( ServiceFactory factory)
inline

Constructor taking a service factory.

Parameters
factoryA service factory.

Member Function Documentation

Member Data Documentation

template<class I1, class I2 = void, class I3 = void>
ServiceFactory* MakeInterfaceMap< I1, I2, I3 >::m_factory
template<class I1, class I2 = void, class I3 = void>
I1* MakeInterfaceMap< I1, I2, I3 >::m_interface1
template<class I1, class I2 = void, class I3 = void>
I2* MakeInterfaceMap< I1, I2, I3 >::m_interface2
template<class I1, class I2 = void, class I3 = void>
I3* MakeInterfaceMap< I1, I2, I3 >::m_interface3