15 #ifndef UTIL_PARAMETERS_INCLUDED 16 #define UTIL_PARAMETERS_INCLUDED 28 std::map<std::string, std::string> m_paramMap;
42 const std::map<std::string, std::string>
getParamMap() {
return m_paramMap; }
47 void Add(std::string& section,
50 void Add(
const char* section,
54 const char* defaultValue,
55 const char* section = NULL);
57 const int defaultValue,
58 const char* section = NULL);
60 const bool defaultValue,
61 const char* section = NULL);
63 const long defaultValue,
64 const char* section = NULL);
66 const double defaultValue,
67 const char* section = NULL);
70 const std::string defaultValue,
71 const char* section = NULL) ;
73 std::vector<std::string> &
split(
const std::string &s,
74 std::vector<std::string> &elems,
76 std::stringstream ss(s);
78 while (std::getline(ss, item, delim)) {
79 elems.push_back(item);
86 std::string* Find(
const char* section,
void LoadParamFile(string ¶mFileName)
UtilParameters(int &argc, char *argv[])
std::vector< std::string > & split(const std::string &s, std::vector< std::string > &elems, char delim='@')
string GetSetting(const char *name, const char *defaultValue, const char *section=NULL)
void ScanCmdLineArgs(int &argc, char *argv[])
const std::map< std::string, std::string > getParamMap()
void Add(string §ion, string &name, string &value)