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

Method restoreVertexTag

src/Mod/TechDraw/App/Geometry.cpp:1359–1371  ·  view source on GitHub ↗

look at the next element in the file. If it is a VertexTag, set the tag. readNextElement will stop searching when it encounters an end element (ex: ) or end of document.

Source from the content-addressed store, hash-verified

1357//! readNextElement will stop searching when it encounters an end element (ex: </CosmeticVertex>) or
1358//! end of document.
1359void Vertex::restoreVertexTag(Base::XMLReader& reader)
1360{
1361 if (!reader.readNextElement()) {
1362 return;
1363 }
1364
1365 if(strcmp(reader.localName(),"VertexTag") == 0) {
1366 std::string temp = reader.getAttribute<const char*>("value");
1367 setTag(Tag::fromString(temp));
1368 }
1369 // else we can not set the tag here. if this is a CosmeticVertex, the tag will be set later.
1370 // the tag is not used for geometry vertices.
1371}
1372
1373void Vertex::dump(const char* title)
1374{

Callers

nothing calls this directly

Calls 4

setTagFunction · 0.85
fromStringFunction · 0.85
readNextElementMethod · 0.80
localNameMethod · 0.80

Tested by

no test coverage detected