diff rdf/RDFExporter.cpp @ 1649:1cc9a0d4b1b6 single-point

Update RegionModel following NoteModel, er, model. They have quite a bit in common that we should now pull out some of
author Chris Cannam
date Fri, 15 Mar 2019 14:23:50 +0000
parents 513192aa9b03
children 7a56bb85030f
line wrap: on
line diff
--- a/rdf/RDFExporter.cpp	Fri Mar 15 10:57:35 2019 +0000
+++ b/rdf/RDFExporter.cpp	Fri Mar 15 14:23:50 2019 +0000
@@ -85,14 +85,13 @@
         if (m) {
             f.hasTimestamp = true;
             f.hasDuration = true;
-            const RegionModel::PointList &pl(m->getPoints());
-            for (RegionModel::PointList::const_iterator i = pl.begin(); 
-                 i != pl.end(); ++i) {
-                f.timestamp = RealTime::frame2RealTime(i->frame, sr).toVampRealTime();
-                f.duration = RealTime::frame2RealTime(i->duration, sr).toVampRealTime();
+            EventVector ee(m->getAllEvents());
+            for (auto e: ee) {
+                f.timestamp = RealTime::frame2RealTime(e.getFrame(), sr).toVampRealTime();
+                f.duration = RealTime::frame2RealTime(e.getDuration(), sr).toVampRealTime();
                 f.values.clear();
-                f.values.push_back(i->value);
-                f.label = i->label.toStdString();
+                f.values.push_back(e.getValue());
+                f.label = e.getLabel().toStdString();
                 m_fw->write(trackId, transform, output, features, summaryType);
             }
             return;