MCPcopy Create free account
hub / github.com/GeoDaCenter/geoda / Save

Method Save

ProjectConf.cpp:234–252  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

232}
233
234void 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
254void ProjectConfiguration::WritePtree(ptree& pt,
255 const wxString& proj_path)

Callers 2

SaveProjectConfMethod · 0.45
SaveDataSourceDataMethod · 0.45

Calls 2

GdaExceptionClass · 0.85
whatMethod · 0.45

Tested by

no test coverage detected