]> git.tdb.fi Git - gldbg.git/blobdiff - source/commandinterpreter.h
Support command aliases
[gldbg.git] / source / commandinterpreter.h
index 8ce59d0a85fc02343908bf3001c21050227ea6f6..537245fb53c1a0f38bea5b0a652f490e97fa64cf 100644 (file)
@@ -16,8 +16,22 @@ 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 *alias_for;
+
+               Command();
+               Command(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,12 +41,17 @@ 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 &);
        void cmd_kill(const std::string &);
        void cmd_exit(const std::string &);
        void cmd_trace(const std::string &);
+       void cmd_profile(const std::string &);
+       void cmd_state(const std::string &);
+       void cmd_texture(const std::string &);
+       void cmd_buffer(const std::string &);
 };
 
 #endif