void Session::deregister_view(shared_ptr<views::ViewBase> view)
{
-
- std::remove_if(views_.begin(), views_.end(), [&](shared_ptr<views::ViewBase> v) { return v == view; });
+ views_.erase(std::remove_if(views_.begin(), views_.end(),
+ [&](shared_ptr<views::ViewBase> v) { return v == view; }),
+ views_.end());
if (views_.empty()) {
main_view_.reset();
return result;
}
-const unordered_set< shared_ptr<data::SignalBase> > Session::signalbases() const
+const vector< shared_ptr<data::SignalBase> > Session::signalbases() const
{
return signalbases_;
}
// Create the decode signal
signal = make_shared<data::DecodeSignal>(*this);
- signalbases_.insert(signal);
+ signalbases_.push_back(signal);
// Add the decode signal to all views
for (shared_ptr<views::ViewBase>& view : views_)
void Session::remove_decode_signal(shared_ptr<data::DecodeSignal> signal)
{
- signalbases_.erase(signal);
+ signalbases_.erase(std::remove_if(signalbases_.begin(), signalbases_.end(),
+ [&](shared_ptr<data::SignalBase> s) { return s == signal; }),
+ signalbases_.end());
for (shared_ptr<views::ViewBase>& view : views_)
view->remove_decode_signal(signal);
if (!signalbase) {
signalbase = make_shared<data::SignalBase>(channel,
data::SignalBase::LogicChannel);
- signalbases_.insert(signalbase);
+ signalbases_.push_back(signalbase);
all_signal_data_.insert(logic_data_);
signalbase->set_data(logic_data_);
if (!signalbase) {
signalbase = make_shared<data::SignalBase>(channel,
data::SignalBase::AnalogChannel);
- signalbases_.insert(signalbase);
+ signalbases_.push_back(signalbase);
shared_ptr<data::Analog> data(new data::Analog());
all_signal_data_.insert(data);
bool has_view(shared_ptr<views::ViewBase> view);
- const unordered_set< shared_ptr<data::SignalBase> > signalbases() const;
+ const vector< shared_ptr<data::SignalBase> > signalbases() const;
bool all_segments_complete(uint32_t segment_id) const;
mutable mutex sampling_mutex_; //!< Protects access to capture_state_.
capture_state capture_state_;
- unordered_set< shared_ptr<data::SignalBase> > signalbases_;
+ vector< shared_ptr<data::SignalBase> > signalbases_;
unordered_set< shared_ptr<data::SignalData> > all_signal_data_;
/// trigger_list_ contains pairs of <segment_id, timestamp> values.