From 375799fa79d1af76f33299acc20a11a167a021f8 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Thu, 17 Aug 2023 12:32:50 +0200 Subject: project: restructure libraries and build env --- source/lib/src/command.cpp | 47 ---------------------------------------------- 1 file changed, 47 deletions(-) delete mode 100644 source/lib/src/command.cpp (limited to 'source/lib/src/command.cpp') diff --git a/source/lib/src/command.cpp b/source/lib/src/command.cpp deleted file mode 100644 index 83c6b73..0000000 --- a/source/lib/src/command.cpp +++ /dev/null @@ -1,47 +0,0 @@ -#include "wanda/command.hpp" - -namespace wanda -{ - std::optional command::message() const - { - using namespace std::string_literals; - auto const command = [this] { - switch (id) - { - case command_id::change: - return "CHANGE"s; - default: - return ""s; - } - }(); - - auto argument_string = std::string{}; - for (int index = 0ul; index < arguments.size(); ++index) - { - argument_string += (index) ? "," + arguments[index] : arguments[index]; - } - - if (command.empty()) - { - return std::nullopt; - } - - return wanda::message{"C", command, argument_string}; - } - - std::optional make_command(message message) - { - if (message.command == "CHANGE") - { - return {{command_id::change}}; - } - - return std::nullopt; - } - - command make_change_command() - { - return {command_id::change}; - } - -} // namespace wanda \ No newline at end of file -- cgit v1.2.3