QBaseCmdParser.hh
Go to the documentation of this file.00001
00002 #ifndef _QBASECMDPARSER_HH_
00003 #define _QBASECMDPARSER_HH_
00004
00005 #include <map>
00006 #include <string>
00007 #include <list>
00008
00009 #include "QCuore.hh"
00010
00011 class QCommand;
00012
00027 class QBaseCmdParser
00028 {
00029 public:
00030
00032 QBaseCmdParser();
00033
00035 virtual ~QBaseCmdParser();
00036
00050 QCommand& Parse(const char* cmdString);
00051
00052 protected:
00053
00067 virtual void AddCommand(const std::string& name, QCommand* handler);
00068
00069 private:
00070
00072 std::map<std::string, QCommand*> commands;
00073
00083 bool ParseParameters(std::string parString,
00084 std::map<std::string,
00085 std::list<std::string> >& parMap) const;
00086 };
00087 #endif