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

Method Restore

src/Mod/CAM/App/PropertyPath.cpp:102–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100}
101
102void PropertyPath::Restore(Base::XMLReader& reader)
103{
104 reader.readElement("Path");
105
106 std::string file(reader.getAttribute<const char*>("file"));
107 if (!file.empty()) {
108 // initiate a file read
109 reader.addFile(file.c_str(), this);
110 }
111
112 if (reader.hasAttribute("version")) {
113 int version = reader.getAttribute<long>("version");
114 if (version >= Toolpath::SchemaVersion) {
115 reader.readElement("Center");
116 double x = reader.getAttribute<double>("x");
117 double y = reader.getAttribute<double>("y");
118 double z = reader.getAttribute<double>("z");
119 Base::Vector3d center(x, y, z);
120 _Path.setCenter(center);
121 }
122 }
123}
124
125void PropertyPath::SaveDocFile(Base::Writer&) const
126{

Callers

nothing calls this directly

Calls 6

readElementMethod · 0.80
hasAttributeMethod · 0.80
emptyMethod · 0.45
addFileMethod · 0.45
c_strMethod · 0.45
setCenterMethod · 0.45

Tested by

no test coverage detected