| 106 | } |
| 107 | |
| 108 | int ConfigurationParser::GetInt(const std::string& key, int defaultValue) const |
| 109 | { |
| 110 | auto v = entries.find(key); |
| 111 | if (v == entries.end()) return defaultValue; |
| 112 | try |
| 113 | { |
| 114 | return stoi(v->second); |
| 115 | } catch (const exception&) |
| 116 | { |
| 117 | throw_with_nested(Exception("�������á�" + key + "��ֵת��Ϊint��")); |
| 118 | } |
| 119 | } |
| 120 | |
| 121 | double ConfigurationParser::GetDouble(const std::string& key, double defaultValue) const |
| 122 | { |