| 100 | } |
| 101 | |
| 102 | void 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 | |
| 125 | void PropertyPath::SaveDocFile(Base::Writer&) const |
| 126 | { |
nothing calls this directly
no test coverage detected