/// \file /// \copyright SPDX-License-Identifier: GPL-3.0-or-later #pragma once #include #include namespace command { class Command { public: virtual ~Command() = default; virtual void execute() const = 0; }; class PrintCommand : public Command { public: explicit PrintCommand(std::string_view sv) : message{std::move(sv)} {} void execute() const override { std::cout << message << std::endl; } private: std::string_view message; }; } // namespace command