Commit 5c240d3e27da4a2523ecd1509bac773ec4d47843

Authored by jklontz
2 parents 00184788 c07bbd30

Merge pull request #10 from biometrics/format_output

Is this a good idea yes/no?
Showing 1 changed file with 20 additions and 0 deletions
sdk/plugins/output.cpp
... ... @@ -44,6 +44,26 @@
44 44  
45 45 namespace br
46 46 {
  47 +/*!
  48 + * \ingroup outputs
  49 + * \brief Adaptor class -- write a matrix output using Format classes.
  50 + * \author Charles Otto \cite caotto
  51 + */
  52 +class DefaultOutput : public MatrixOutput
  53 +{
  54 + Q_OBJECT
  55 +
  56 + ~DefaultOutput()
  57 + {
  58 + if (file.isNull() || targetFiles.isEmpty() || queryFiles.isEmpty()) return;
  59 +
  60 + br::Template T(this->file, this->data);
  61 + QScopedPointer<Format> writer(Factory<Format>::make(this->file));
  62 + writer->write(T);
  63 + }
  64 +};
  65 +
  66 +BR_REGISTER(Output, DefaultOutput)
47 67  
48 68 /*!
49 69 * \ingroup outputs
... ...