// SPDX-License-Identifier: Apache-2.0 // Copyright Pionix GmbH and Contributors to EVerest #pragma once #include "command_registry.hpp" #include #include #include #include #include #include #include #include #include using CmdArguments = std::vector; class SimulationCommand { public: SimulationCommand(const RegisteredCommandBase* registered_command_in, const CmdArguments& arguments_in); bool execute() const; static std::queue parse_sim_commands(const std::string& value, const CommandRegistry& command_registry); private: using RawCommands = std::vector; using CommandWithArguments = std::pair; using CommandsWithArguments = std::vector; static RawCommands convert_commands_string_to_vector(const std::string& commands_view); static CommandsWithArguments split_into_commands_with_arguments(std::vector& commands_vector); static CommandWithArguments split_into_command_with_arguments(std::string& command); static std::queue compile_commands(CommandsWithArguments& commands_with_arguments, const CommandRegistry& command_registry); std::vector arguments; const RegisteredCommandBase* registered_command; };