Column-oriented GPU-accelerated Database Management System
CoGaDB
/home/sebastian/gpudbms/trunk/cogadb/include/parser/commandline_interpreter.hpp
Go to the documentation of this file.
00001 
00002 #pragma once
00003 
00004 #include <string>
00005 
00006 #include <core/table.hpp>
00007 
00008 #include<boost/tokenizer.hpp>
00009 
00010 namespace CoGaDB {
00011 
00012     class CommandLineInterpreter {
00013     public:
00014         CommandLineInterpreter();
00015 
00016         bool execute(const std::string& command);
00017         bool getline(const std::string &prompt, std::string &result);
00018 
00019     private:
00020         typedef bool (*SimpleCommandHandlerPtr)();
00021         typedef bool (*ParameterizedCommandHandlerPtr)(const std::string&);
00022         typedef std::map<std::string, SimpleCommandHandlerPtr> SimpleCommandMap;
00023         typedef std::map<std::string, ParameterizedCommandHandlerPtr> ParameterizedCommandMap;
00024         SimpleCommandMap simple_command_map_;
00025         ParameterizedCommandMap command_map_;
00026         std::string prompt_;
00027     };
00028 
00029 
00030 
00031 
00032 } //end namespace CogaDB
00033 
00034 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines