summaryrefslogtreecommitdiff
path: root/include/CommonAPI/Stub.hpp
diff options
context:
space:
mode:
authorDirk Huss <dirk_huss@mentor.com>2015-11-25 14:38:28 +0100
committerDirk Huss <dirk_huss@mentor.com>2015-11-25 14:38:28 +0100
commitb6f81b22fcf8d9cf8ee9248408b7d2a72fbff1d9 (patch)
tree8b0b1438ccaa9450ca4b21221eb9cd74f14b10f5 /include/CommonAPI/Stub.hpp
parent3d2fb21d0e93b6b595610285e910ac80c099a174 (diff)
downloadgenivi-common-api-runtime-b6f81b22fcf8d9cf8ee9248408b7d2a72fbff1d9.tar.gz
CommonAPI 3.1.4
Diffstat (limited to 'include/CommonAPI/Stub.hpp')
-rw-r--r--include/CommonAPI/Stub.hpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/include/CommonAPI/Stub.hpp b/include/CommonAPI/Stub.hpp
index 75ee4e0..61db6bd 100644
--- a/include/CommonAPI/Stub.hpp
+++ b/include/CommonAPI/Stub.hpp
@@ -33,21 +33,21 @@ public:
virtual ~StubBase() {}
};
-template<typename _StubAdapter, typename _StubRemoteEventHandler>
+template<typename StubAdapter_, typename StubRemoteEventHandler_>
class Stub: public virtual StubBase {
- static_assert(std::is_base_of<StubAdapter, _StubAdapter>::value, "Invalid StubAdapter Class!");
+ static_assert(std::is_base_of<StubAdapter, StubAdapter_>::value, "Invalid StubAdapter Class!");
public:
- typedef _StubAdapter StubAdapterType;
- typedef _StubRemoteEventHandler RemoteEventHandlerType;
+ typedef StubAdapter_ StubAdapterType;
+ typedef StubRemoteEventHandler_ RemoteEventHandlerType;
virtual ~Stub() {}
- virtual _StubRemoteEventHandler* initStubAdapter(const std::shared_ptr<_StubAdapter> &_stubAdapter) = 0;
+ virtual StubRemoteEventHandler_* initStubAdapter(const std::shared_ptr<StubAdapter_> &_stubAdapter) = 0;
- inline const std::shared_ptr<_StubAdapter> getStubAdapter() const { return stubAdapter_; }
+ inline const std::shared_ptr<StubAdapter_> getStubAdapter() const { return stubAdapter_.lock(); }
protected:
- std::shared_ptr<_StubAdapter> stubAdapter_;
+ std::weak_ptr<StubAdapter_> stubAdapter_;
};
enum SelectiveBroadcastSubscriptionEvent {