diff transform/ModelTransformer.h @ 876:47aa3aeb687b tonioni

For outputs with unknown bin count or multiple bins with variable sample rate, create additional output models for bins beyond the first
author Chris Cannam
date Wed, 29 Jan 2014 09:31:22 +0000
parents 418cd2064769
children b109b88bfa85
line wrap: on
line diff
--- a/transform/ModelTransformer.h	Tue Jan 28 18:52:22 2014 +0000
+++ b/transform/ModelTransformer.h	Wed Jan 29 09:31:22 2014 +0000
@@ -83,14 +83,14 @@
      * be initialised; an error message may be available via
      * getMessage() in this situation.
      */
-    Models getOutputModels() { return m_outputs; }
+    Models getOutputModels();        
 
     /**
      * Return the set of output models, also detaching them from the
      * transformer so that they will not be deleted when the
      * transformer is.  The caller takes ownership of the models.
      */
-    Models detachOutputModels() { m_detached = true; return m_outputs; }
+    Models detachOutputModels() { m_detached = true; return getOutputModels(); }
 
     /**
      * Return a warning or error message.  If getOutputModel returned
@@ -104,6 +104,14 @@
     ModelTransformer(Input input, const Transform &transform);
     ModelTransformer(Input input, const Transforms &transforms);
 
+    /**
+     * Return any additional models that were created during
+     * processing. This might happen if, for example, a transform was
+     * configured to split a multi-bin output into separate single-bin
+     * models as it processed.
+     */
+    virtual Models getAdditionalOutputModels() { return Models(); }
+
     Transforms m_transforms;
     Input m_input; // I don't own the model in this
     Models m_outputs; // I own this, unless...