QOptionHandler.hh
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef __OPTIONHANDLER_HH_
00011 #define __OPTIONHANDLER_HH_
00012
00013 #include <map>
00014 #include <string>
00015 #include <iostream>
00016
00017 #include "QCuore.hh"
00018
00019 class QOptionHandler {
00020 public:
00021
00022
00023 virtual ~QOptionHandler();
00024
00025 static QOptionHandler* Get();
00026
00027 void Parse(int,char**);
00028
00029
00030 const std::string& GetStringParam(const std::string& name);
00031
00032
00033 int GetIntParam(const std::string& name);
00034
00035
00036 double GetRealParam(const std::string& name);
00037
00038
00039 bool CheckParam(const std::string& name);
00040
00041
00042 void Dump(std::ostream& c=std::cout);
00043
00044 private:
00045
00046
00047 QOptionHandler();
00048
00049
00050 static QOptionHandler *me;
00051
00052 std::map<std::string,std::string> s_options;
00053 std::map<std::string,int> i_options;
00054 std::map<std::string,double> d_options;
00055
00056 };
00057
00058 #endif