Mercurial > hg > svcore
diff transform/ModelTransformer.h @ 851:c9846844ac11 tonioni
Merge branch tonioni_multi_transform
author | Chris Cannam |
---|---|
date | Mon, 02 Dec 2013 15:47:06 +0000 |
parents | 418cd2064769 |
children | 47aa3aeb687b |
line wrap: on
line diff
--- a/transform/ModelTransformer.h Tue Nov 26 14:37:01 2013 +0000 +++ b/transform/ModelTransformer.h Mon Dec 02 15:47:06 2013 +0000 @@ -40,6 +40,8 @@ public: virtual ~ModelTransformer(); + typedef std::vector<Model *> Models; + class Input { public: Input(Model *m) : m_model(m), m_channel(-1) { } @@ -76,18 +78,19 @@ int getInputChannel() { return m_input.getChannel(); } /** - * Return the output model created by the transform. Returns a - * null model if the transform could not be initialised; an error - * message may be available via getMessage() in this situation. + * Return the set of output models created by the transform or + * transforms. Returns an empty list if any transform could not + * be initialised; an error message may be available via + * getMessage() in this situation. */ - Model *getOutputModel() { return m_output; } + Models getOutputModels() { return m_outputs; } /** - * Return the output model, also detaching it from the transformer - * so that it will not be deleted when the transformer is. The - * caller takes ownership of the model. + * 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. */ - Model *detachOutputModel() { m_detached = true; return m_output; } + Models detachOutputModels() { m_detached = true; return m_outputs; } /** * Return a warning or error message. If getOutputModel returned @@ -99,10 +102,11 @@ protected: ModelTransformer(Input input, const Transform &transform); + ModelTransformer(Input input, const Transforms &transforms); - Transform m_transform; + Transforms m_transforms; Input m_input; // I don't own the model in this - Model *m_output; // I own this, unless... + Models m_outputs; // I own this, unless... bool m_detached; // ... this is true. bool m_abandoned; QString m_message;