diff framework/SVFileReader.h @ 629:10046d544e76

Further work on #1773 "Loading a session with features extracted from multiplexed inputs". Re-read the aggregate wave models from the session file; also re-order the way they are written so as to improve the likelihood of successfully re-reading them (! - as it stood before, there was some chance involved)
author Chris Cannam
date Mon, 15 Oct 2018 15:50:39 +0100
parents b23bebfdfaba
children 163573a73ebe
line wrap: on
line diff
--- a/framework/SVFileReader.h	Wed Oct 10 08:44:37 2018 +0100
+++ b/framework/SVFileReader.h	Mon Oct 15 15:50:39 2018 +0100
@@ -229,12 +229,20 @@
     bool readParameter(const QXmlAttributes &);
     bool readSelection(const QXmlAttributes &);
     bool readMeasurement(const QXmlAttributes &);
+
+    void makeAggregateModels();
     void addUnaddedModels();
 
     bool haveModel(int id) {
         return (m_models.find(id) != m_models.end()) && m_models[id];
     }
 
+    struct PendingAggregateRec {
+        QString name;
+        sv_samplerate_t sampleRate;
+        std::vector<int> components;
+    };
+    
     Document *m_document;
     SVFileReaderPaneCallback &m_paneCallback;
     QString m_location;
@@ -242,6 +250,7 @@
     std::map<int, Layer *> m_layers;
     std::map<int, Model *> m_models;
     std::set<Model *> m_addedModels;
+    std::map<int, PendingAggregateRec> m_pendingAggregates;
     std::map<int, int> m_awaitingDatasets; // map dataset id -> model id
     Layer *m_currentLayer;
     Model *m_currentDataset;