mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 17:58:20 +00:00
#1153 HdfSerializer.remove() for cache eviction
This commit is contained in:
@@ -252,6 +252,11 @@ void HdfSerializer::read_surface_style(surface_style_serialization& s, std::shar
|
||||
|
||||
}
|
||||
|
||||
void HdfSerializer::remove(const std::string& guid) {
|
||||
if (H5Lexists(file.getId(), guid.c_str(), H5P_DEFAULT)) {
|
||||
file.unlink(guid);
|
||||
}
|
||||
}
|
||||
|
||||
const IfcGeom::Element* HdfSerializer::read(IfcParse::IfcFile& f, const std::string& guid, unsigned int representation_id, read_type rt) {
|
||||
if (!H5Lexists(file.getId(), guid.c_str(), H5P_DEFAULT)) {
|
||||
|
||||
@@ -95,6 +95,7 @@ public:
|
||||
H5::Group write(const IfcGeom::Element* o);
|
||||
void write(const IfcGeom::BRepElement* o);
|
||||
void write(const IfcGeom::TriangulationElement* o);
|
||||
void remove(const std::string& guid);
|
||||
|
||||
const IfcGeom::Element* read(IfcParse::IfcFile& f, const std::string& guid, unsigned int representation_id, read_type rt = READ_BREP);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user