MCPcopy Create free account
hub / github.com/CobaltFusion/DebugViewPP / SaveConfiguration

Method SaveConfiguration

DebugView++/MainFrame.cpp:888–919  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

886}
887
888void CMainFrame::SaveConfiguration(const std::wstring& fileName)
889{
890#if BOOST_VERSION < 105600
891 boost::property_tree::xml_writer_settings<char> settings('\t', 1);
892#else
893 boost::property_tree::xml_writer_settings<std::string> settings('\t', 1);
894#endif
895
896 boost::property_tree::ptree mainPt;
897 mainPt.put("AutoNewline", m_logSources.GetAutoNewLine());
898 mainPt.put("LinkViews", m_linkViews);
899
900 int views = GetViewCount();
901 for (int i = 0; i < views; ++i)
902 {
903 auto& logView = GetView(i);
904 auto filters = logView.GetFilters();
905 boost::property_tree::ptree viewPt;
906 viewPt.put("Index", i);
907 viewPt.put("Name", Str(logView.GetName()).str());
908 viewPt.put("ClockTime", logView.GetClockTime());
909 viewPt.put("ProcessColors", logView.GetViewProcessColors());
910 viewPt.put_child("MessageFilters", MakePTree(filters.messageFilters));
911 viewPt.put_child("ProcessFilters", MakePTree(filters.processFilters));
912 mainPt.add_child("Views.View", viewPt);
913 }
914
915 boost::property_tree::ptree pt;
916 pt.add_child("DebugViewPP", mainPt);
917
918 boost::property_tree::write_xml(Str(fileName), pt, std::locale(), settings);
919}
920
921void CMainFrame::OnFileOpen(UINT /*uNotifyCode*/, int /*nID*/, CWindow /*wndCtl*/)
922{

Callers

nothing calls this directly

Calls 8

StrClass · 0.85
MakePTreeFunction · 0.85
GetClockTimeMethod · 0.80
GetViewProcessColorsMethod · 0.80
GetAutoNewLineMethod · 0.45
GetFiltersMethod · 0.45
strMethod · 0.45
GetNameMethod · 0.45

Tested by

no test coverage detected