summaryrefslogtreecommitdiff
path: root/src/events_ds.cc
diff options
context:
space:
mode:
authorVolker Fischer <corrados@users.noreply.github.com>2021-07-28 19:02:13 +0200
committerVolker Fischer <corrados@users.noreply.github.com>2021-07-28 19:02:13 +0200
commit61630a321ac59da01240a4b359c591e567aa84ed (patch)
tree0e4eeed42dabe4c46f06153f9e3914177a6b7967 /src/events_ds.cc
parent78c4c6abba8b02e3181c09ce9671cf454553c730 (diff)
parent62f7f2b2b004162b06af844dbc1a3cda696cfd9e (diff)
Merge remote-tracking branch 'origin/develop' into edrumulus
Diffstat (limited to 'src/events_ds.cc')
-rw-r--r--src/events_ds.cc19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/events_ds.cc b/src/events_ds.cc
index ee21f93..0195a89 100644
--- a/src/events_ds.cc
+++ b/src/events_ds.cc
@@ -99,6 +99,25 @@ void EventsDS::startAddingNewGroup(InstrumentID instrument_id)
}
}
+void EventsDS::clear()
+{
+ // *this = EventsDS();
+
+ id_to_info.clear();
+ id_to_group_data.clear();
+ for (auto& channel_data: channel_data_array)
+ {
+ channel_data.sample_events.clear();
+ }
+ for (auto& event_group_ids: instruments_sample_event_group_ids)
+ {
+ event_group_ids.clear();
+ }
+
+ current_group_id.invalidate();
+ current_groups_instrument_id.invalidate();
+}
+
void EventsDS::removeGroup(EventGroupID group_id, InstrumentID instrument_id)
{
// if we remove the current group, then invalidate it