RawOptionsContainer.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef __RAWOPTIONSCONTAINER_H__
00028 #define __RAWOPTIONSCONTAINER_H__
00029
00030
00031 #include "LogTrace.h"
00032
00033
00034 #include <map>
00035 #include <string>
00036 #include <iostream>
00037 #include <sstream>
00038
00039
00040 using namespace std;
00041
00042 typedef map<string, string> StringMap;
00043
00044 class RawOptionsContainer : public MIPObject {
00045 protected:
00046 static StringMap rawOptionsMap;
00047 static bool addUpdateDashOption(string dashkey, const string& value, bool overwrite, bool showDashError = false);
00048
00049 public:
00050
00051 static bool hasOption(const string& key);
00052
00053 static bool removeOption(const string& key);
00054 static bool getOption(const string& key, string& value);
00055
00056 static bool updateOption(const string& key, const string& value);
00057
00058 static bool addOption(const string& key, const string& value);
00059
00060 static void addUpdateOption(const string& key, const string& value);
00061
00062
00063 static bool parseCommandLine(int argc, char* const argv[], bool overwrite = false);
00064
00065 static bool parseFile(const string& fileName, bool overwrite = false);
00066
00067
00068 static void clearOptions();
00069
00070 static void print();
00071 static string toString();
00072
00073
00074 static StringMap& getMap();
00075
00076 };
00077
00078 #endif