15 #ifndef UTIL_PARAMETERS_INCLUDED
16 #define UTIL_PARAMETERS_INCLUDED
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,
UtilParameters(int &argc, char *argv[])
string GetSetting(const char *name, const char *defaultValue, const char *section=NULL)
void ScanCmdLineArgs(int &argc, char *argv[])
std::vector< std::string > & split(const std::string &s, std::vector< std::string > &elems, char delim= '@')
void LoadParamFile(string ¶mFileName)
std::map< std::string, std::string > m_paramMap
void Add(string §ion, string &name, string &value)
map< string, UtilParam > m_paramMap
string * Find(const char *section, const char *name)
const std::map< std::string, std::string > getParamMap()