MCF_Param.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef MCF_PARAM_INCLUDED
00014 #define MCF_PARAM_INCLUDED
00015
00016
00017 #include "UtilMacros.h"
00018 #include "UtilMacrosDecomp.h"
00019 #include "UtilParameters.h"
00020
00021
00022
00029
00030 class MCF_Param {
00031 public:
00032 int LogLevel;
00033 int UseSparse;
00034 string DataDir;
00035 string Instance;
00036
00037 public:
00038 void getSettings(UtilParameters& utilParam) {
00039 static const char* common = "MCF";
00040 LogLevel = utilParam.GetSetting("LogLevel", 0, common);
00041 UseSparse = utilParam.GetSetting("UseSparse", 0, common);
00042 DataDir = utilParam.GetSetting("DataDir", "", common);
00043 Instance = utilParam.GetSetting("Instance", "", common);
00044
00045 if (!checkOptions()) {
00046 throw UtilException("Bad Parameter", "getSettings", "MCF_Param");
00047 }
00048 }
00049
00050 bool checkOptions() {
00051 bool optionsOk = true;
00052 return optionsOk;
00053 }
00054
00055 void dumpSettings(ostream* os = &cout) {
00056 static const char* common = "MCF";
00057 (*os) << "\n=====================================================\n"
00058 << "MCF_DECOMP PARAMETER SETTINGS \n";
00059 (*os) << common << ": LogLevel : " << LogLevel << endl;
00060 (*os) << common << ": UseSparse : " << UseSparse << endl;
00061 (*os) << common << ": DataDir : " << DataDir << endl;
00062 (*os) << common << ": Instance : " << Instance << endl;
00063 (*os) << "=====================================================\n";
00064 }
00065
00066 public:
00067 MCF_Param() :
00068 LogLevel (0),
00069 UseSparse (0),
00070 DataDir (""),
00071 Instance ("") {
00072 }
00073 ~MCF_Param() {};
00074 };
00075
00076 #endif