Skip to content

Commands ( Handler Commands )

SpaceOC edited this page Aug 29, 2024 · 1 revision

handlerCommands class

#include "Core/base/command/handler_commands.h"
  • thisVariable(std::string command) is a bool variable. Returns true if the command is a variable.
  • parsing(std::string& command) - std::vectorstd::string variable. Parses the command and its arguments. Does not currently work.
  • sendCommand(std::string command) - function. Executes a variable/command depending on what the argument (command) is.
  • addCommand(std::string name, std::string description, std::function<void()> function) - function. Adds a new command (along with its description and function) to commandMap.
  • addCommand(std::string name, CommandDescription data, std::function<void()> function, int minArgs, int maxArgs) - function. Adds a new command (along with its description, argsNames and function) to commandWithArgsMap.
  • getCommand(std::string name) - map<string, string> variable. Returns the name and description of the command.
  • getAllCommands() - map<string, string>. Returns the names and description of all commands.

Clone this wiki locally