X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcommandinterpreter.h;fp=source%2Fcommandinterpreter.h;h=8ce59d0a85fc02343908bf3001c21050227ea6f6;hb=c6b2f7585d51164dc32f4dd2a05855913e464c58;hp=0000000000000000000000000000000000000000;hpb=8b398bfe13b0884191b1fac56f274d395fd9d4dd;p=gldbg.git diff --git a/source/commandinterpreter.h b/source/commandinterpreter.h new file mode 100644 index 0000000..8ce59d0 --- /dev/null +++ b/source/commandinterpreter.h @@ -0,0 +1,38 @@ +/* $Id$ + +This file is part of gldbg +Copyright © 2009 Mikko Rasa, Mikkosoft Productions +Distributed under the GPL +*/ + +#ifndef COMMANDINTERPRETER_H_ +#define COMMANDINTERPRETER_H_ + +#include +#include + +class GlDbg; + +class CommandInterpreter +{ +private: + typedef void (CommandInterpreter::*CommandFunc)(const std::string &); + typedef std::map 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