2018-06-23 00:04:28 +03:00
|
|
|
#ifndef LREXPORTERSFACTORY_H
|
|
|
|
#define LREXPORTERSFACTORY_H
|
|
|
|
|
|
|
|
#include "lrattribsabstractfactory.h"
|
|
|
|
#include "lrexporterintf.h"
|
|
|
|
|
2024-09-04 17:31:16 +03:00
|
|
|
namespace LimeReport {
|
2018-06-23 00:04:28 +03:00
|
|
|
|
|
|
|
typedef ReportExporterInterface* (*CreateExporter)(ReportEnginePrivate* parent);
|
|
|
|
|
2024-09-04 17:31:16 +03:00
|
|
|
struct ExporterAttribs {
|
2018-06-23 00:04:28 +03:00
|
|
|
QString m_alias;
|
|
|
|
QString m_tag;
|
2024-09-04 17:31:16 +03:00
|
|
|
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);
|
2018-06-23 00:04:28 +03:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2024-09-04 17:31:16 +03:00
|
|
|
class ExportersFactory:
|
|
|
|
public AttribsAbstractFactory<LimeReport::ReportExporterInterface, QString, CreateExporter,
|
|
|
|
ExporterAttribs> {
|
2018-06-23 00:04:28 +03:00
|
|
|
private:
|
|
|
|
friend class Singleton<ExportersFactory>;
|
2024-09-04 17:31:16 +03:00
|
|
|
|
2018-06-23 00:04:28 +03:00
|
|
|
private:
|
2024-09-04 17:31:16 +03:00
|
|
|
ExportersFactory() { }
|
|
|
|
~ExportersFactory() { }
|
|
|
|
ExportersFactory(const ExportersFactory&) { }
|
|
|
|
ExportersFactory& operator=(const ExportersFactory&) { return *this; }
|
2018-06-23 00:04:28 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace LimeReport
|
|
|
|
|
|
|
|
#endif // LREXPORTERSFACTORY_H
|