diff options
author | Stefan Laner <laner@itestra.de> | 2013-11-23 01:10:53 +0100 |
---|---|---|
committer | Stefan Laner <laner@itestra.de> | 2013-11-23 01:10:53 +0100 |
commit | 05d1d81fa881fbfb332c34dc75904b1c6f90c155 (patch) | |
tree | 91bb404f32ea190cc53da2e95e343dcb59e8771e /src/CommonAPI | |
parent | 4d1a57a008904455899c7fd6367eac9efe3292c6 (diff) | |
download | genivi-common-api-runtime-05d1d81fa881fbfb332c34dc75904b1c6f90c155.tar.gz |
Fix for inherited interfaces
Diffstat (limited to 'src/CommonAPI')
-rw-r--r-- | src/CommonAPI/Factory.hpp | 2 | ||||
-rw-r--r-- | src/CommonAPI/Stub.h | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/CommonAPI/Factory.hpp b/src/CommonAPI/Factory.hpp index 6ba73f6..865144c 100644 --- a/src/CommonAPI/Factory.hpp +++ b/src/CommonAPI/Factory.hpp @@ -18,7 +18,7 @@ Factory::buildProxy(const std::string& participantId, const std::string& serviceName, const std::string& domain) { - std::shared_ptr<Proxy> abstractMiddlewareProxy = createProxy(_ProxyClass<_AttributeExtensions...>::getInterfaceId(), participantId, serviceName, domain); + std::shared_ptr<Proxy> abstractMiddlewareProxy = createProxy(_ProxyClass<_AttributeExtensions...>::InterfaceType::getInterfaceId(), participantId, serviceName, domain); if (abstractMiddlewareProxy) { return std::make_shared<_ProxyClass<_AttributeExtensions...>>(abstractMiddlewareProxy); } diff --git a/src/CommonAPI/Stub.h b/src/CommonAPI/Stub.h index d724548..f09790b 100644 --- a/src/CommonAPI/Stub.h +++ b/src/CommonAPI/Stub.h @@ -35,7 +35,7 @@ struct StubBase { }; template<typename _StubAdapter, typename _StubRemoteEventHandler> -class Stub: public StubBase { +class Stub: public virtual StubBase { static_assert(std::is_base_of<StubAdapter, _StubAdapter>::value, "Invalid StubAdapter Class!"); public: typedef _StubAdapter StubAdapterType; @@ -45,6 +45,12 @@ class Stub: public StubBase { } virtual _StubRemoteEventHandler* initStubAdapter(const std::shared_ptr<_StubAdapter>& stubAdapter) = 0; + virtual const std::shared_ptr<_StubAdapter> getStubAdapter() { + return stubAdapter_; + } + protected: + std::shared_ptr<_StubAdapter> stubAdapter_; + }; enum SelectiveBroadcastSubscriptionEvent { |