MCPcopy Create free account
hub / github.com/Kitware/CMake / StartElement

Method StartElement

Source/CPack/WiX/cmWIXPatchParser.cxx:38–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36}
37
38void cmWIXPatchParser::StartElement(std::string const& name, char const** atts)
39{
40 if (State == BEGIN_DOCUMENT) {
41 if (name == "CPackWiXPatch"_s) {
42 State = BEGIN_FRAGMENTS;
43 } else {
44 ReportValidationError("Expected root element 'CPackWiXPatch'");
45 }
46 } else if (State == BEGIN_FRAGMENTS) {
47 if (name == "CPackWiXFragment"_s) {
48 State = INSIDE_FRAGMENT;
49 StartFragment(atts);
50 } else {
51 ReportValidationError("Expected 'CPackWixFragment' element");
52 }
53 } else if (State == INSIDE_FRAGMENT) {
54 cmWIXPatchElement& parent = *ElementStack.back();
55
56 auto element = cm::make_unique<cmWIXPatchElement>();
57
58 element->name = name;
59
60 for (size_t i = 0; atts[i]; i += 2) {
61 std::string key = atts[i];
62 std::string value = atts[i + 1];
63
64 element->attributes[key] = value;
65 }
66
67 ElementStack.push_back(element.get());
68 parent.children.push_back(std::move(element));
69 }
70}
71
72void cmWIXPatchParser::StartFragment(char const** attributes)
73{

Callers 8

CreateBackgroundMethod · 0.45
WriteDistributionFileMethod · 0.45
CreateChoiceOutlineMethod · 0.45
CreateChoiceMethod · 0.45
CreateDomainsMethod · 0.45
WriteRezXMLMethod · 0.45
WriteRezArrayMethod · 0.45
WriteRezDictMethod · 0.45

Calls 4

moveFunction · 0.85
push_backMethod · 0.80
backMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected