| 232 | } |
| 233 | |
| 234 | void ProjectConfiguration::Save(wxString saveFileName) |
| 235 | { |
| 236 | ptree pt; |
| 237 | WritePtree(pt, saveFileName); |
| 238 | //boost::property_tree::xml_writer_settings<char> settings(' ', 4); |
| 239 | boost::property_tree::xml_writer_settings<std::string> settings(' ', 4); |
| 240 | try { |
| 241 | #ifdef __WIN32__ |
| 242 | std::ofstream out_file(saveFileName.wc_str()); |
| 243 | write_xml(out_file, pt, settings); |
| 244 | out_file.close(); |
| 245 | #else |
| 246 | write_xml(std::string(GET_ENCODED_FILENAME(saveFileName)), pt, |
| 247 | std::locale(), settings); |
| 248 | #endif |
| 249 | } catch (const boost::property_tree::ptree_error& e) { |
| 250 | throw GdaException(e.what()); |
| 251 | } |
| 252 | } |
| 253 | |
| 254 | void ProjectConfiguration::WritePtree(ptree& pt, |
| 255 | const wxString& proj_path) |
no test coverage detected