changeset 296:19282182e60d tonioni_multi_transform

Update to the multi-transform api in svcore
author Chris Cannam
date Mon, 02 Dec 2013 12:29:54 +0000
parents 14b1768e5406
children 1e61f0c26593
files framework/Document.cpp framework/Document.h
diffstat 2 files changed, 6 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/framework/Document.cpp	Tue Nov 26 14:39:57 2013 +0000
+++ b/framework/Document.cpp	Mon Dec 02 12:29:54 2013 +0000
@@ -264,13 +264,12 @@
 Layer *
 Document::createDerivedLayer(const Transform &transform,
                              const ModelTransformer::Input &input,
-                             const LayerFactory::LayerType type,
-							 const FeatureExtractionModelTransformer::PreferredOutputModel outputmodel)
+                             const LayerFactory::LayerType type)
 {
 	// !!! THIS IS TOTALLY REDUNDANT CODE, EXCEPT FOR THE type SETTING
 	
 	    QString message;
-	    Model *newModel = addDerivedModel(transform, input, message, outputmodel);
+	    Model *newModel = addDerivedModel(transform, input, message);
 	    if (!newModel) {
 	        emit modelGenerationFailed(transform.getIdentifier(), message);
 	        return 0;
@@ -564,8 +563,7 @@
 Model *
 Document::addDerivedModel(const Transform &transform,
                           const ModelTransformer::Input &input,
-                          QString &message,
-						  const FeatureExtractionModelTransformer::PreferredOutputModel outputmodel)
+                          QString &message)
 {
     Model *model = 0;
 	// model = (Model) new FlexiNoteModel();
@@ -580,9 +578,8 @@
 	}
     }
 
-	// GF: TODO: propagate preferredOutputModelSelection (done)
     model = ModelTransformerFactory::getInstance()->transform
-        (transform, input, message, outputmodel); //e.g. FeatureExtractionModelTransformer::FlexiNoteOutputModel
+        (transform, input, message);
 
     // The transform we actually used was presumably identical to the
     // one asked for, except that the version of the plugin may
--- a/framework/Document.h	Tue Nov 26 14:39:57 2013 +0000
+++ b/framework/Document.h	Mon Dec 02 12:29:54 2013 +0000
@@ -125,8 +125,7 @@
      */
     Layer *createDerivedLayer(const Transform &,
                               const ModelTransformer::Input &,
-                              const LayerFactory::LayerType type, 
-							  const FeatureExtractionModelTransformer::PreferredOutputModel outputmodel);
+                              const LayerFactory::LayerType type);
 
     /**
      * Delete the given layer, and also its associated model if no
@@ -160,12 +159,10 @@
     /**
      * Add a derived model associated with the given transform,
      * running the transform and returning the resulting model.
-	 * In case the output model is a NoteModel, the preferred output model will be selected: {NoteModel | FlexiNoteModel}.
      */
     Model *addDerivedModel(const Transform &transform,
                            const ModelTransformer::Input &input,
-                           QString &returnedMessage,
-						   FeatureExtractionModelTransformer::PreferredOutputModel outputmodel = FeatureExtractionModelTransformer::NoteOutputModel);
+                           QString &returnedMessage);
 
     /**
      * Add a derived model associated with the given transform.  This