Fix streamer header ownership

Create file-owned headers after storage is selected but before streaming starts. Let owner-backed streamers use that header directly, and keep owned_header_ exclusively for ownerless streamers.

Generated with the assistance of an AI coding tool.
This commit is contained in:
Thomas Krijnen
2026-07-28 04:19:20 +02:00
parent 02bc09029e
commit ba8dc53718
2 changed files with 31 additions and 30 deletions
+1 -2
View File
@@ -97,7 +97,6 @@ private:
Reader* stream_;
std::unique_ptr<spf_lexer<Reader>> lexer_;
std::unique_ptr<spf_header> owned_header_;
spf_header* header_;
ifcopenshell::file* owner_;
boost::circular_buffer<token> token_stream_;
const ifcopenshell::schema_definition* schema_;
@@ -171,7 +170,7 @@ private:
const ifcopenshell::schema_definition* schema() const { return schema_; }
const spf_header* header() const { return header_; }
const spf_header* header() const;
~instance_streamer() = default;