summaryrefslogtreecommitdiffstats
path: root/signal-composer-binding/clientApp.cpp
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-09-25 18:29:48 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-12-14 11:00:25 +0100
commitb7dd0a6e19d5387bc8d499bd1b3a99d457fa58d9 (patch)
tree0d1a26964435e8f91b96713e2b5beb3c1e94d0b2 /signal-composer-binding/clientApp.cpp
parentdb45a68715c07e6b8fe35e322ddcbbc6c473cb2b (diff)
Enhance pointer manage and container browsing
- SourceAPI now holds share_ptr of Signal - Signal are stored in a map<string,signal> that change way to browse the signals - subscribed property included in SourceAPI. - Clean old code - renaming struct SignalValue->signalValue Change-Id: Ic5c28296ddd7197c6562e12fbc91c504c1cc0b4d Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'signal-composer-binding/clientApp.cpp')
-rw-r--r--signal-composer-binding/clientApp.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/signal-composer-binding/clientApp.cpp b/signal-composer-binding/clientApp.cpp
index ce30163..c325fcb 100644
--- a/signal-composer-binding/clientApp.cpp
+++ b/signal-composer-binding/clientApp.cpp
@@ -29,11 +29,11 @@ void clientAppCtx::update(Signal* sig)
return;
}
-void clientAppCtx::appendSignals(std::vector<Signal*>& sigV)
+void clientAppCtx::appendSignals(std::vector<std::shared_ptr<Signal>>& sigV)
{
bool set = false;
// Clean up already subscribed signals to avoid duplicata
- for (std::vector<Signal*>::const_iterator it = sigV.begin();
+ for (std::vector<std::shared_ptr<Signal>>::const_iterator it = sigV.begin();
it != sigV.end(); ++it)
{
for (auto& ctxSig: subscribedSignals_)
@@ -44,7 +44,7 @@ void clientAppCtx::appendSignals(std::vector<Signal*>& sigV)
sigV.erase(it);
continue;
}
- Signal* sig = *it;
+ std::shared_ptr<Signal> sig = *it;
sig->addObserver(this);
}