From c07bbd3017772f149a9e9bb85255f233042b962e Mon Sep 17 00:00:00 2001 From: caotto Date: Tue, 5 Feb 2013 13:27:09 -0500 Subject: [PATCH] Add the ability to write matrix output using format classes --- sdk/plugins/output.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+), 0 deletions(-) diff --git a/sdk/plugins/output.cpp b/sdk/plugins/output.cpp index 1191313..64e3e2e 100644 --- a/sdk/plugins/output.cpp +++ b/sdk/plugins/output.cpp @@ -44,6 +44,26 @@ namespace br { +/*! + * \ingroup outputs + * \brief Adaptor class -- write a matrix output using Format classes. + * \author Charles Otto \cite caotto + */ +class DefaultOutput : public MatrixOutput +{ + Q_OBJECT + + ~DefaultOutput() + { + if (file.isNull() || targetFiles.isEmpty() || queryFiles.isEmpty()) return; + + br::Template T(this->file, this->data); + QScopedPointer writer(Factory::make(this->file)); + writer->write(T); + } +}; + +BR_REGISTER(Output, DefaultOutput) /*! * \ingroup outputs -- libgit2 0.21.4