Something went wrong. Try again.
art software for the rest of us
drawing paint image sdl art
Something went wrong. Try again.
C
123456789101112131415161718#pragma once#include <string>#include <chrono>#include "json.hpp"using json = nlohmann::json;
class Command {protected: std::chrono::system_clock::time_point timestamp;public: virtual ~Command() = default; virtual void Execute() = 0; virtual void Undo() = 0; virtual json SerializeArgs() = 0; const json Serialize(); virtual std::string GetTitle() = 0; // can be different for same command, used in user facing context virtual const char* GetIdentity() const = 0; // is always the same for a command, used internaly};