mirror of
https://github.com/python-LimeReport/LimeReport.git
synced 2025-10-09 05:57:15 +03:00
Exporters infrastructure has been added
This commit is contained in:
34
limereport/lrexportersfactory.h
Normal file
34
limereport/lrexportersfactory.h
Normal 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
|
Reference in New Issue
Block a user