// // Created by erki on 06.03.21. // #include "OperationLog.hpp" namespace { template std::unique_ptr DecodeType(const nlohmann::json& j, const std::string& entry_type) { if (entry_type == T::TYPE_NAME) { auto t = std::make_unique(); j.get_to(*t); return t; } else { return nullptr; } } } nlohmann::json OperationLog::FunctionCall::toJson() const { return *this; } nlohmann::json OperationLog::BasicOperation::toJson() const { return *this; } void OperationLog::DecodeEntry(const nlohmann::json& j) { if ((entry = DecodeType(j, entry_type))) return; else if ((entry = DecodeType(j, entry_type))) return; }