diff framework/Document.h @ 297:1e61f0c26593 tonioni_multi_transform

Enable multi-transform stuff through to here
author Chris Cannam
date Mon, 02 Dec 2013 15:06:16 +0000
parents 19282182e60d
children f72d58d1ccb0
line wrap: on
line diff
--- a/framework/Document.h	Mon Dec 02 12:29:54 2013 +0000
+++ b/framework/Document.h	Mon Dec 02 15:06:16 2013 +0000
@@ -118,14 +118,13 @@
                               const ModelTransformer::Input &);
 
     /**
-     * Exactly the same as above, but providing exactly the layer type
-     * for cases in which the first suitable layer type for a transform
-     * is not the desired one.
-     * WARNING: highly redundant code (with the above creation funciotn)
+     * Create and return suitable layers for the given transforms,
+     * which must be identical apart from the output (i.e. must use
+     * the same plugin and configuration). The layers are returned in
+     * the same order as the transformed are supplied.
      */
-    Layer *createDerivedLayer(const Transform &,
-                              const ModelTransformer::Input &,
-                              const LayerFactory::LayerType type);
+    std::vector<Layer *> createDerivedLayers(const Transforms &,
+                                             const ModelTransformer::Input &);
 
     /**
      * Delete the given layer, and also its associated model if no
@@ -165,6 +164,15 @@
                            QString &returnedMessage);
 
     /**
+     * Add derived models associated with the given set of related
+     * transforms, running the transforms and returning the resulting
+     * models.
+     */
+    std::vector<Model *> addDerivedModels(const Transforms &transforms,
+                                          const ModelTransformer::Input &input,
+                                          QString &returnedMessage);
+
+    /**
      * Add a derived model associated with the given transform.  This
      * is necessary to register any derived model that was not created
      * by the document using createDerivedModel or createDerivedLayer.