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

Method writeObjectData

src/App/Document.cpp:1468–1488  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1466}
1467
1468void Document::writeObjectData(const std::vector<DocumentObject*>& objs,
1469 Base::Writer& writer) const
1470{
1471 // writing the features itself
1472 writer.Stream() << writer.ind() << "<ObjectData Count=\"" << objs.size() << "\">\n";
1473
1474 writer.incInd(); // indentation for 'Object name'
1475 for (auto it : objs) {
1476 writer.Stream() << writer.ind() << "<Object name=\"" << it->getExportName() << "\"";
1477 if (it->hasExtensions()) {
1478 writer.Stream() << " Extensions=\"True\"";
1479 }
1480
1481 writer.Stream() << ">\n";
1482 it->Save(writer);
1483 writer.Stream() << writer.ind() << "</Object>\n";
1484 }
1485 writer.decInd(); // indentation for 'Object name'
1486
1487 writer.Stream() << writer.ind() << "</ObjectData>\n";
1488}
1489
1490void Document::writeObjects(const std::vector<DocumentObject*>& objs,
1491 Base::Writer& writer) const

Callers

nothing calls this directly

Calls 6

incIndMethod · 0.80
getExportNameMethod · 0.80
hasExtensionsMethod · 0.80
decIndMethod · 0.80
sizeMethod · 0.45
SaveMethod · 0.45

Tested by

no test coverage detected