comparison transform/FeatureWriter.h @ 625:608b4dc5ff34

* Improve behaviour when output file write fails (i.e. fail earlier)
author Chris Cannam
date Fri, 21 May 2010 10:21:18 +0000
parents 4541581067f3
children 06579b8ffb7b
comparison
equal deleted inserted replaced
624:076dcd2ce209 625:608b4dc5ff34
83 const Transform &transform, 83 const Transform &transform,
84 const Vamp::Plugin::OutputDescriptor &output, 84 const Vamp::Plugin::OutputDescriptor &output,
85 const Vamp::Plugin::FeatureList &features, 85 const Vamp::Plugin::FeatureList &features,
86 std::string summaryType = "") = 0; 86 std::string summaryType = "") = 0;
87 87
88 /**
89 * Throw FailedToOpenOutputStream if we can already tell that we
90 * will be unable to write to the output file. This is called to
91 * test the output stream before processing begins. The writer
92 * may legitimately succeed here but still fail later -- this is
93 * really an optimisation to ensure that easy-to-recognise failure
94 * cases fail early.
95 */
96 virtual void testOutputFile(QString trackId, TransformId transformId) { }
97
88 virtual void flush() { } // whatever the last stream was 98 virtual void flush() { } // whatever the last stream was
89 99
90 virtual void finish() = 0; 100 virtual void finish() = 0;
91 101
92 virtual QString getWriterTag() const = 0; 102 virtual QString getWriterTag() const = 0;