Exporters infrastructure has been added

This commit is contained in:
Arin Alexander
2018-06-23 00:04:28 +03:00
parent 44e37178d0
commit fef507dde0
21 changed files with 275 additions and 40 deletions

View File

@@ -0,0 +1,34 @@
#ifndef LREXPORTERSFACTORY_H
#define LREXPORTERSFACTORY_H
#include "lrattribsabstractfactory.h"
#include "lrexporterintf.h"
namespace LimeReport{
typedef ReportExporterInterface* (*CreateExporter)(ReportEnginePrivate* parent);
struct ExporterAttribs{
QString m_alias;
QString m_tag;
ExporterAttribs(){}
ExporterAttribs(const QString& alias, const QString& tag):m_alias(alias),m_tag(tag){}
bool operator==( const ExporterAttribs &right) const {
return (m_alias==right.m_alias) && (m_tag==right.m_tag);
}
};
class ExportersFactory : public AttribsAbstractFactory<LimeReport::ReportExporterInterface, QString, CreateExporter, ExporterAttribs>
{
private:
friend class Singleton<ExportersFactory>;
private:
ExportersFactory(){}
~ExportersFactory(){}
ExportersFactory(const ExportersFactory&){}
ExportersFactory& operator = (const ExportersFactory&){return *this;}
};
} // namespace LimeReport
#endif // LREXPORTERSFACTORY_H