Left-overs after merge

This commit is contained in:
Thomas Krijnen
2025-08-26 10:20:08 +02:00
parent e920379ca3
commit 862aa71a77
5 changed files with 12 additions and 12 deletions
+1 -1
View File
@@ -625,7 +625,7 @@ std::optional<std::tuple<size_t, const IfcParse::declaration*, IfcEntityInstance
Logger::Status(ss.str(), false);
}
auto data = ps.construct(current_id, references_to_resolve_, entity_type, boost::none);
auto data = ps.construct(current_id, references_to_resolve_, entity_type, boost::none, -1);
return_value.emplace(
(size_t)current_id,
+8 -8
View File
@@ -724,7 +724,7 @@ void IfcParse::impl::in_memory_file_storage::load(unsigned entity_instance_name,
// type) and to be able to actually register the references in
// the 2nd pass.
load(entity_instance_name, entity, ps, attribute_index == -1 ? (int)attribute_index_within_data : attribute_index);
auto* simple_type_instance = (schema ? schema : file->schema())->instantiate(decl, ps.construct(entity_instance_name, references_to_resolve, decl, boost::none, attribute_index == -1 ? (int)attribute_index_within_data : attribute_index));
auto* simple_type_instance = (schema ? schema : file->schema())->instantiate(decl, ps.construct(entity_instance_name, *references_to_resolve, decl, boost::none, attribute_index == -1 ? (int)attribute_index_within_data : attribute_index));
//@todo decide addEntity(((IfcUtil::IfcBaseClass*)*entity));
context.push(simple_type_instance);
simple_type_instance->file_ = file;
@@ -753,7 +753,7 @@ IfcEntityInstanceData IfcParse::impl::in_memory_file_storage::read(unsigned int
parse_context pc;
tokens->Next();
load(i, ty->as_entity(), pc, -1);
return IfcEntityInstanceData(pc.construct(i, *references_to_resolve, ty, boost::none));
return IfcEntityInstanceData(pc.construct(i, *references_to_resolve, ty, boost::none, -1));
}
void IfcParse::impl::in_memory_file_storage::try_read_semicolon() const {
@@ -1543,7 +1543,7 @@ void IfcParse::impl::in_memory_file_storage::read_from_stream(IfcParse::IfcSpfSt
auto attr_index = p.first.index_;
if (storage->has_attribute_value<IfcUtil::IfcBaseClass*>(nullptr, nullptr, 0, attr_index)) {
auto inst = storage->get_attribute_value<IfcUtil::IfcBaseClass*>(nullptr, nullptr, 0, attr_index);
IfcUtil::IfcBaseClass* inst = storage->get_attribute_value(nullptr, nullptr, 0, attr_index);
if (!inst->declaration().as_entity()) {
// Probably a case of IfcPropertySetDefinitionSet, divert storage of reference to the simply type instance
storage = &inst->data();
@@ -1552,7 +1552,7 @@ void IfcParse::impl::in_memory_file_storage::read_from_stream(IfcParse::IfcSpfSt
}
if (storage->has_attribute_value<Blank>(nullptr, nullptr, 0, attr_index)) {
storage->set(nullptr, nullptr, 0, attr_index, it->second);
storage->set_attribute_value(nullptr, nullptr, 0, attr_index, it->second);
} else {
Logger::Error("Duplicate definition for instance reference");
}
@@ -1580,7 +1580,7 @@ void IfcParse::impl::in_memory_file_storage::read_from_stream(IfcParse::IfcSpfSt
auto attr_index = p.first.index_;
if (storage->has_attribute_value<IfcUtil::IfcBaseClass*>(nullptr, nullptr, 0, attr_index)) {
auto inst = storage->get_attribute_value<IfcUtil::IfcBaseClass*>(nullptr, nullptr, 0, attr_index);
IfcUtil::IfcBaseClass* inst = storage->get_attribute_value(nullptr, nullptr, 0, attr_index);
if (!inst->declaration().as_entity()) {
// Probably a case of IfcPropertySetDefinitionSet, divert storage of reference to the simply type instance
storage = &inst->data();
@@ -1589,7 +1589,7 @@ void IfcParse::impl::in_memory_file_storage::read_from_stream(IfcParse::IfcSpfSt
}
if (storage->has_attribute_value<Blank>(nullptr, nullptr, 0, attr_index)) {
storage->set(nullptr, nullptr, 0, attr_index, instances);
storage->set_attribute_value(nullptr, nullptr, 0, attr_index, instances);
} else {
Logger::Error("Duplicate definition for instance reference");
}
@@ -1616,7 +1616,7 @@ void IfcParse::impl::in_memory_file_storage::read_from_stream(IfcParse::IfcSpfSt
auto attr_index = p.first.index_;
if (storage->has_attribute_value<IfcUtil::IfcBaseClass*>(nullptr, nullptr, 0, attr_index)) {
auto inst = storage->get_attribute_value<IfcUtil::IfcBaseClass*>(nullptr, nullptr, 0, attr_index);
IfcUtil::IfcBaseClass* inst = storage->get_attribute_value(nullptr, nullptr, 0, attr_index);
if (!inst->declaration().as_entity()) {
// Probably a case of IfcPropertySetDefinitionSet, divert storage of reference to the simply type instance
storage = &inst->data();
@@ -1625,7 +1625,7 @@ void IfcParse::impl::in_memory_file_storage::read_from_stream(IfcParse::IfcSpfSt
}
if (storage->has_attribute_value<Blank>(nullptr, nullptr, 0, attr_index)) {
storage->set(nullptr, nullptr, 0, attr_index, instances);
storage->set_attribute_value(nullptr, nullptr, 0, attr_index, instances);
} else {
Logger::Error("Duplicate definition for instance reference");
}
+1 -1
View File
@@ -35,7 +35,7 @@ namespace {
parse_context pc;
storage->tokens->Next();
storage->load(-1, nullptr, pc, -1);
return pc.construct(-1, *storage->references_to_resolve, nullptr, s);
return pc.construct(-1, *storage->references_to_resolve, nullptr, s, -1);
} else {
// std::unreachable();
return IfcEntityInstanceData(in_memory_attribute_storage(10));
+1 -1
View File
@@ -171,7 +171,7 @@ namespace IfcParse {
void push(IfcUtil::IfcBaseClass* inst);
IfcEntityInstanceData construct(int name, unresolved_references& references_to_resolve, const IfcParse::declaration* decl, boost::optional<size_t> expected_size);
IfcEntityInstanceData construct(int name, unresolved_references& references_to_resolve, const IfcParse::declaration* decl, boost::optional<size_t> expected_size, int resolve_reference_index);
};
namespace impl {
+1 -1
View File
@@ -43,7 +43,7 @@ private:
// Available as get_inverse().
%ignore IfcParse::IfcFile::instances_by_reference;
%ignore parse_context;
%ignore IfcParse::parse_context;
%ignore operator<<;