#include "model.hpp" #include "tl/expected.hpp" using std::cout; using std::endl; #define UNUSED(s) /* s */ /** this is for now our sample model */ class DefaultModel : public Model { public: DefaultModel() = default; tl::expected get_cddc(unsigned int cdd_serial) override { cout << __FUNCTION__ << "(" << cdd_serial << ")" << endl; // NOLINT(clion-misra-cpp2008-5-2-12) return &m_cddc; }; tl::expected get_current_cddc() override { cout << __FUNCTION__ << "()" << endl; return &m_cddc; } std::vector mint(const std::string & UNUSED(transaction_reference), const std::vector &UNUSED(blinds)) override { std::vector res; cout << __FUNCTION__ << "(" << ")" << endl; return res; } std::vector getMKCs(const std::vector & UNUSED(denominations), const std::vector & UNUSED(mint_key_ids)) override { std::vector res; cout << __FUNCTION__ << endl; return res; } bool redeem(const std::vector &UNUSED(coins)) override { cout << __FUNCTION__ << endl; return false; } private: CDDC m_cddc; }; std::unique_ptr Model::get_model(const std::string & /*backend_name*/) { cout << __FUNCTION__ << endl; //:wq // if (backend_name=="default") return std::make_unique(); }