MCPcopy Create free account
hub / github.com/FreeCAD/FreeCAD / readEndElement

Method readEndElement

src/Base/Reader.cpp:293–318  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

291}
292
293void Base::XMLReader::readEndElement(const char* ElementName, int level)
294{
295 endCharStream();
296
297 // if we are already at the end of the current element
298 if ((ReadType == EndElement || ReadType == StartEndElement) && ElementName
299 && LocalName == ElementName && (level < 0 || level == Level)) {
300 return;
301 }
302 if (ReadType == EndDocument) {
303 // the end of the document has been reached but we still try to continue on reading
304 throw Base::XMLParseException("End of document reached");
305 }
306
307 bool ok {};
308 do {
309 ok = read();
310 if (!ok) {
311 break;
312 }
313 if (ReadType == EndDocument) {
314 break;
315 }
316 } while (ReadType != EndElement
317 || (ElementName && (LocalName != ElementName || (level >= 0 && level != Level))));
318}
319
320void Base::XMLReader::readCharacters(const char* filename, CharStreamFormat format)
321{

Callers 15

RestoreMethod · 0.80
RestoreMethod · 0.80
readObjectsMethod · 0.80
importObjectsMethod · 0.80
restoreObjectMethod · 0.80
RestoreMethod · 0.80
RestoreMethod · 0.80
restoreExtensionsMethod · 0.80
RestoreMethod · 0.80
RestoreMethod · 0.80
RestoreMethod · 0.80
RestoreMethod · 0.80

Calls 1

readFunction · 0.50

Tested by

no test coverage detected