CppMicroServices

C++ Micro Services: MakeInterfaceMap< Interfaces > Struct Template Reference
MakeInterfaceMap< Interfaces > Struct Template Reference

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

Collaboration diagram for MakeInterfaceMap< Interfaces >:

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
 
detail::InterfacesTuple< std::tuple, Interfaces...>::type m_interfaces
 

Detailed Description

template<class... Interfaces>
struct MakeInterfaceMap< Interfaces >

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

Example usage:

MyService service; // implementes I1 and I2
See also
InterfaceMap

Constructor & Destructor Documentation

template<class... Interfaces>
template<class Impl >
MakeInterfaceMap< Interfaces >::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... Interfaces>
MakeInterfaceMap< Interfaces >::MakeInterfaceMap ( ServiceFactory factory)
inline

Constructor taking a service factory.

Parameters
factoryA service factory.

Member Function Documentation

template<class... Interfaces>
MakeInterfaceMap< Interfaces >::operator InterfaceMap ( )
inline

Member Data Documentation

template<class... Interfaces>
ServiceFactory* MakeInterfaceMap< Interfaces >::m_factory
template<class... Interfaces>
detail::InterfacesTuple<std::tuple, Interfaces...>::type MakeInterfaceMap< Interfaces >::m_interfaces