]> git.tdb.fi Git - gldbg.git/blobdiff - source/commandinterpreter.h
Add help
[gldbg.git] / source / commandinterpreter.h
index 8ce59d0a85fc02343908bf3001c21050227ea6f6..bdd3c174b2d993a2a34c694e1d6be279d627e7d3 100644 (file)
@@ -16,8 +16,20 @@ class GlDbg;
 class CommandInterpreter
 {
 private:
-       typedef void (CommandInterpreter::*CommandFunc)(const std::string &);
-       typedef std::map<std::string, CommandFunc> 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<std::string, Command> 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 &);