From 05d1d81fa881fbfb332c34dc75904b1c6f90c155 Mon Sep 17 00:00:00 2001 From: Stefan Laner Date: Sat, 23 Nov 2013 01:10:53 +0100 Subject: Fix for inherited interfaces --- src/CommonAPI/Factory.hpp | 2 +- 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 abstractMiddlewareProxy = createProxy(_ProxyClass<_AttributeExtensions...>::getInterfaceId(), participantId, serviceName, domain); + std::shared_ptr 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 -class Stub: public StubBase { +class Stub: public virtual StubBase { static_assert(std::is_base_of::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 { -- cgit v1.2.1