Parsing errors to to status in b_manage

This commit is contained in:
2024-03-15 19:28:37 +01:00
parent fe24aa0b3e
commit 3691363b8e
4 changed files with 37 additions and 29 deletions

View File

@@ -8,11 +8,12 @@ namespace platform {
class CommandParser {
public:
CommandParser() = default;
std::pair<char, int> parse(const std::string& color, const std::vector<std::tuple<std::string, char, bool>>& options, const char defaultCommand, const int minIndex, const int maxIndex);
std::tuple<char, int, bool> parse(const std::string& color, const std::vector<std::tuple<std::string, char, bool>>& options, const char defaultCommand, const int minIndex, const int maxIndex);
char getCommand() const { return command; };
int getIndex() const { return index; };
std::string getErrorMessage() const { return errorMessage; };
private:
void messageError(const std::string& message);
std::string errorMessage;
char command;
int index;
};