X-Git-Url: http://git.tdb.fi/?p=gldbg.git;a=blobdiff_plain;f=source%2Fcommandinterpreter.h;h=bdd3c174b2d993a2a34c694e1d6be279d627e7d3;hp=8ce59d0a85fc02343908bf3001c21050227ea6f6;hb=0be9f22fa27bfca77f494489fce0e62b66882e5b;hpb=3c32a221de1435ae7af8d96182560e8b28f1a4c0 diff --git a/source/commandinterpreter.h b/source/commandinterpreter.h index 8ce59d0..bdd3c17 100644 --- a/source/commandinterpreter.h +++ b/source/commandinterpreter.h @@ -16,8 +16,20 @@ class GlDbg; class CommandInterpreter { private: - typedef void (CommandInterpreter::*CommandFunc)(const std::string &); - typedef std::map CommandMap; + struct Command + { + typedef void (CommandInterpreter::*Func)(const std::string &); + + Func func; + std::string description; + std::string help; + + Command(); + Command(Func, const std::string &); + Command(Func, const std::string &, const std::string &); + }; + + typedef std::map CommandMap; GlDbg &gldbg; CommandMap commands; @@ -27,6 +39,7 @@ public: void execute(const std::string &); private: + void cmd_help(const std::string &); void cmd_run(const std::string &); void cmd_continue(const std::string &); void cmd_signal(const std::string &);