MCPcopy Create free account
hub / github.com/BeneficialCode/WinArk / BuildConfigFromTree

Method BuildConfigFromTree

WinArk/EventsDlg.cpp:91–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89}
90
91bool CEventsDlg::BuildConfigFromTree(EventsConfiguration& config) {
92 auto item = m_Tree.GetRootItem();
93 CString text;
94 while (item) {
95 item.GetText(text);
96 EventConfigCategory category;
97 category.Name = text;
98 if (m_Tree.GetCheckState(item)) {
99 config.AddCategory(category);
100 }
101 else {
102 auto child = item.GetChild();
103 while (child) {
104 if (m_Tree.GetCheckState(child)) {
105 auto evt = (KernelEvent*)child.GetData();
106 category.Opcodes.push_back(evt->Opcode);
107 }
108 child = child.GetNextSibling();
109 }
110 if (!category.Opcodes.empty())
111 config.AddCategory(category);
112 }
113 item = item.GetNextSibling();
114 }
115
116 return true;
117}
118
119void CEventsDlg::SwitchToAdvancedView(bool advanced) {
120 m_Init = true;

Callers

nothing calls this directly

Calls 5

GetTextMethod · 0.80
AddCategoryMethod · 0.80
push_backMethod · 0.80
emptyMethod · 0.80
GetDataMethod · 0.45

Tested by

no test coverage detected