MCPcopy Create free account
hub / github.com/WinMerge/winmerge / characters

Method characters

Src/ProjectFile.cpp:109–236  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107 m_stack.pop();
108 }
109 void characters(const XMLChar ch[], int start, int length)
110 {
111 //process .winmerge entries of third level deep only
112 if (m_stack.size() != 3 && m_pProject->size() == 0)
113 return;
114
115 ProjectFileItem& currentItem = m_pProject->back();
116
117 const std::string& nodename = m_stack.top();
118 const std::string& token = std::string(ch + start, length);
119
120 if (nodename == Left_element_name)
121 {
122 currentItem.m_paths.SetLeft(currentItem.m_paths.GetLeft() + xmlch2tstr(ch + start, length), false);
123 currentItem.m_bHasLeft = true;
124 }
125 else if (nodename == Middle_element_name)
126 {
127 currentItem.m_paths.SetMiddle(currentItem.m_paths.GetMiddle() + xmlch2tstr(ch + start, length), false);
128 currentItem.m_bHasMiddle = true;
129 }
130 else if (nodename == Right_element_name)
131 {
132 currentItem.m_paths.SetRight(currentItem.m_paths.GetRight() + xmlch2tstr(ch + start, length), false);
133 currentItem.m_bHasRight = true;
134 }
135 else if (nodename == Left_desc_element_name)
136 {
137 currentItem.m_leftDesc = currentItem.GetLeftDesc() + xmlch2tstr(ch + start, length);
138 }
139 else if (nodename == Middle_desc_element_name)
140 {
141 currentItem.m_middleDesc = currentItem.GetMiddleDesc() + xmlch2tstr(ch + start, length);
142 }
143 else if (nodename == Right_desc_element_name)
144 {
145 currentItem.m_rightDesc = currentItem.GetRightDesc() + xmlch2tstr(ch + start, length);
146 }
147 else if (nodename == Filter_element_name)
148 {
149 currentItem.m_filter = currentItem.GetFilter() + xmlch2tstr(ch + start, length);
150 }
151 else if (nodename == Subfolders_element_name)
152 {
153 currentItem.m_subfolders = atoi(token.c_str());
154 }
155 else if (nodename == Left_ro_element_name)
156 {
157 currentItem.m_bLeftReadOnly = atoi(token.c_str()) != 0;
158 }
159 else if (nodename == Middle_ro_element_name)
160 {
161 currentItem.m_bMiddleReadOnly = atoi(token.c_str()) != 0;
162 }
163 else if (nodename == Right_ro_element_name)
164 {
165 currentItem.m_bRightReadOnly = atoi(token.c_str()) != 0;
166 }

Callers 1

writeElementFunction · 0.45

Calls 15

xmlch2tstrFunction · 0.85
toTStringFunction · 0.85
GetLeftDescMethod · 0.80
GetMiddleDescMethod · 0.80
GetRightDescMethod · 0.80
GetFilterMethod · 0.80
sizeMethod · 0.45
backMethod · 0.45
SetLeftMethod · 0.45
GetLeftMethod · 0.45
SetMiddleMethod · 0.45
GetMiddleMethod · 0.45

Tested by

no test coverage detected