SDPUC_Param.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef SDPUC_PARAM_INCLUDED
00014 #define SDPUC_PARAM_INCLUDED
00015
00016
00017 #include "UtilMacros.h"
00018 #include "UtilMacrosDecomp.h"
00019 #include "UtilParameters.h"
00020
00021
00022
00029
00030 class SDPUC_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 if(!checkOptions())
00045 throw UtilException("Bad Parameter", "getSettings", "MCF_Param");
00046 }
00047
00048 bool checkOptions(){
00049 bool optionsOk = true;
00050 return optionsOk;
00051 }
00052
00053 void dumpSettings(ostream * os = &cout){
00054 static const char * common = "MCF";
00055 (*os) << "\n=====================================================\n"
00056 << "MCF_DECOMP PARAMETER SETTINGS \n";
00057 (*os) << common << ": LogLevel : " << LogLevel << endl;
00058 (*os) << common << ": UseSparse : " << UseSparse << endl;
00059 (*os) << common << ": DataDir : " << DataDir << endl;
00060 (*os) << common << ": Instance : " << Instance << endl;
00061 (*os) << "=====================================================\n";
00062 }
00063
00064 public:
00065 SDPUC_Param() :
00066 LogLevel (0),
00067 UseSparse (0),
00068 DataDir (""),
00069 Instance ("")
00070 {}
00071 ~SDPUC_Param() {};
00072 };
00073
00074 #endif