# HG changeset patch # User Chris Cannam # Date 1385987394 0 # Node ID 19282182e60dab3e8fe3a666525579ddf80ea653 # Parent 14b1768e54069b9b6ff386546cacd75d65d8f5a8 Update to the multi-transform api in svcore diff -r 14b1768e5406 -r 19282182e60d framework/Document.cpp --- 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 diff -r 14b1768e5406 -r 19282182e60d framework/Document.h --- 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