MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / _save_xml

Method _save_xml

src/bcf/bcf/v2/topic.py:210–214  ·  view source on GitHub ↗
(self, destination_zip: ZipFileInterface, item: Any, target: str)

Source from the content-addressed store, hash-verified

208 self.viewpoints[vpt.viewpoint].save(destination_zip, topic_dir, vpt)
209
210 def _save_xml(self, destination_zip: ZipFileInterface, item: Any, target: str) -> None:
211 if self._topic_dir is None:
212 return
213 to_write = self._xml_handler.serialize(item) if item else self._topic_dir.joinpath(target).read_bytes()
214 destination_zip.writestr(f"{self._topic_dir.name}/{target}", to_write)
215
216 def _save_bim_snippet(self, destination_zip: ZipFileInterface) -> None:
217 snippet = self.topic.bim_snippet

Callers 1

saveMethod · 0.95

Calls 2

serializeMethod · 0.45
writestrMethod · 0.45

Tested by

no test coverage detected