| 175 | |
| 176 | |
| 177 | bool File::IsPresent(const std::string &key) |
| 178 | { |
| 179 | configure_mapping(); |
| 180 | |
| 181 | auto it = std::find_if(map.begin(), |
| 182 | map.end(), |
| 183 | [key](OptionMapEntry &e) |
| 184 | { |
| 185 | return key == e.option; |
| 186 | }); |
| 187 | if (it == map.end()) |
| 188 | { |
| 189 | throw OptionNotFound(key); |
| 190 | } |
| 191 | |
| 192 | return it->present; |
| 193 | } |
| 194 | |
| 195 | |
| 196 | const std::string File::GetValue(const std::string &key) |