24 #include "../common.hpp"
25 #include "../peyton/util.hpp"
37 for(
int i =0 ; i < n ; i++ )
38 insert( std::pair<std::string,std::string>( key_value_pairs[i][0], key_value_pairs[i][1] ) ) ;
45 std::ifstream in(fn.c_str());
46 if(!in) ERROR(
"Cannot open configuration file '" + fn +
"'.");
50 while(std::getline(in, line))
54 if(line.empty()) {
continue; }
55 if(line[0] ==
'#') {
continue; }
57 size_t eqpos = line.find(
'=');
58 if(eqpos == std::string::npos) ERROR(
"Error on line " + line +
": '=' sign expected.");
60 std::string key =
trim(line.substr(0, eqpos)), val =
trim(line.substr(eqpos+1));