--- /dev/null
+/* $Id$
+
+This file is part of gldbg
+Copyright © 2009 Mikko Rasa, Mikkosoft Productions
+Distributed under the GPL
+*/
+
+#ifndef COMMANDINTERPRETER_H_
+#define COMMANDINTERPRETER_H_
+
+#include <map>
+#include <string>
+
+class GlDbg;
+
+class CommandInterpreter
+{
+private:
+ typedef void (CommandInterpreter::*CommandFunc)(const std::string &);
+ typedef std::map<std::string, CommandFunc> CommandMap;
+
+ GlDbg &gldbg;
+ CommandMap commands;
+
+public:
+ CommandInterpreter(GlDbg &);
+ void execute(const std::string &);
+
+private:
+ 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 &);
+};
+
+#endif