#pragma once #include #include #include #include "util.hpp" #include "Renderer.hpp" namespace massivedynamic { enum class Format { CONSOLE, SVG, PNG, JPG, BMP, END }; constexpr size_t FormatLength = static_cast(Format::END); class QR { private: std::string outputFile; std::vector pixels; qrcodegen::QrCode qr; size_t size; public: QR(const std::string& data, std::string outputFile, size_t size, qrcodegen::QrCode::Ecc type); QR(const QR&&) = delete; QR(QR&) = delete; ~QR() = default; QR& operator=(const QR&) = delete; void render(Format format); template void renderTyped() { T renderer = T(this->pixels, this->qr.getSize(), this->size); renderer.render(this->outputFile); } }; }