changeset 1657:31b46a5647db single-point

Forward the matching-event functions
author Chris Cannam
date Wed, 20 Mar 2019 15:45:52 +0000
parents e4084bc60fe8
children 5b7b01da430a
files data/model/NoteModel.h data/model/RegionModel.h
diffstat 2 files changed, 14 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/data/model/NoteModel.h	Wed Mar 20 14:58:56 2019 +0000
+++ b/data/model/NoteModel.h	Wed Mar 20 15:45:52 2019 +0000
@@ -173,6 +173,13 @@
     EventVector getEventsStartingAt(sv_frame_t f) const {
         return m_events.getEventsStartingAt(f);
     }
+    bool getNearestEventMatching(sv_frame_t startSearchAt,
+                                 std::function<bool(Event)> predicate,
+                                 EventSeries::Direction direction,
+                                 Event &found) const {
+        return m_events.getNearestEventMatching
+            (startSearchAt, predicate, direction, found);
+    }
 
     /**
      * Editing methods.
--- a/data/model/RegionModel.h	Wed Mar 20 14:58:56 2019 +0000
+++ b/data/model/RegionModel.h	Wed Mar 20 15:45:52 2019 +0000
@@ -150,6 +150,13 @@
     EventVector getEventsStartingAt(sv_frame_t f) const {
         return m_events.getEventsStartingAt(f);
     }
+    bool getNearestEventMatching(sv_frame_t startSearchAt,
+                                 std::function<bool(Event)> predicate,
+                                 EventSeries::Direction direction,
+                                 Event &found) const {
+        return m_events.getNearestEventMatching
+            (startSearchAt, predicate, direction, found);
+    }
 
     /**
      * Editing methods.