0
0
mirror of https://github.com/fralx/LimeReport.git synced 2024-12-23 16:22:58 +03:00
LimeReport/limereport/lrexportersfactory.h
Андрей Лухнов 0fca7169d3 Define code style and format all source file using clang-format-14
except those placed in 3rdparty directories.
2024-09-19 21:09:38 +03:00

38 lines
1.0 KiB
C++

#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