mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-20 23:36:20 +00:00
Left-overs after merge
This commit is contained in:
@@ -625,7 +625,7 @@ std::optional<std::tuple<size_t, const IfcParse::declaration*, IfcEntityInstance
|
|||||||
Logger::Status(ss.str(), false);
|
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(
|
return_value.emplace(
|
||||||
(size_t)current_id,
|
(size_t)current_id,
|
||||||
|
|||||||
@@ -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
|
// type) and to be able to actually register the references in
|
||||||
// the 2nd pass.
|
// the 2nd pass.
|
||||||
load(entity_instance_name, entity, ps, attribute_index == -1 ? (int)attribute_index_within_data : attribute_index);
|
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));
|
//@todo decide addEntity(((IfcUtil::IfcBaseClass*)*entity));
|
||||||
context.push(simple_type_instance);
|
context.push(simple_type_instance);
|
||||||
simple_type_instance->file_ = file;
|
simple_type_instance->file_ = file;
|
||||||
@@ -753,7 +753,7 @@ IfcEntityInstanceData IfcParse::impl::in_memory_file_storage::read(unsigned int
|
|||||||
parse_context pc;
|
parse_context pc;
|
||||||
tokens->Next();
|
tokens->Next();
|
||||||
load(i, ty->as_entity(), pc, -1);
|
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 {
|
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_;
|
auto attr_index = p.first.index_;
|
||||||
|
|
||||||
if (storage->has_attribute_value<IfcUtil::IfcBaseClass*>(nullptr, nullptr, 0, attr_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()) {
|
if (!inst->declaration().as_entity()) {
|
||||||
// Probably a case of IfcPropertySetDefinitionSet, divert storage of reference to the simply type instance
|
// Probably a case of IfcPropertySetDefinitionSet, divert storage of reference to the simply type instance
|
||||||
storage = &inst->data();
|
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)) {
|
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 {
|
} else {
|
||||||
Logger::Error("Duplicate definition for instance reference");
|
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_;
|
auto attr_index = p.first.index_;
|
||||||
|
|
||||||
if (storage->has_attribute_value<IfcUtil::IfcBaseClass*>(nullptr, nullptr, 0, attr_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()) {
|
if (!inst->declaration().as_entity()) {
|
||||||
// Probably a case of IfcPropertySetDefinitionSet, divert storage of reference to the simply type instance
|
// Probably a case of IfcPropertySetDefinitionSet, divert storage of reference to the simply type instance
|
||||||
storage = &inst->data();
|
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)) {
|
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 {
|
} else {
|
||||||
Logger::Error("Duplicate definition for instance reference");
|
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_;
|
auto attr_index = p.first.index_;
|
||||||
|
|
||||||
if (storage->has_attribute_value<IfcUtil::IfcBaseClass*>(nullptr, nullptr, 0, attr_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()) {
|
if (!inst->declaration().as_entity()) {
|
||||||
// Probably a case of IfcPropertySetDefinitionSet, divert storage of reference to the simply type instance
|
// Probably a case of IfcPropertySetDefinitionSet, divert storage of reference to the simply type instance
|
||||||
storage = &inst->data();
|
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)) {
|
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 {
|
} else {
|
||||||
Logger::Error("Duplicate definition for instance reference");
|
Logger::Error("Duplicate definition for instance reference");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ namespace {
|
|||||||
parse_context pc;
|
parse_context pc;
|
||||||
storage->tokens->Next();
|
storage->tokens->Next();
|
||||||
storage->load(-1, nullptr, pc, -1);
|
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 {
|
} else {
|
||||||
// std::unreachable();
|
// std::unreachable();
|
||||||
return IfcEntityInstanceData(in_memory_attribute_storage(10));
|
return IfcEntityInstanceData(in_memory_attribute_storage(10));
|
||||||
|
|||||||
@@ -171,7 +171,7 @@ namespace IfcParse {
|
|||||||
|
|
||||||
void push(IfcUtil::IfcBaseClass* inst);
|
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 {
|
namespace impl {
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ private:
|
|||||||
// Available as get_inverse().
|
// Available as get_inverse().
|
||||||
%ignore IfcParse::IfcFile::instances_by_reference;
|
%ignore IfcParse::IfcFile::instances_by_reference;
|
||||||
|
|
||||||
%ignore parse_context;
|
%ignore IfcParse::parse_context;
|
||||||
|
|
||||||
%ignore operator<<;
|
%ignore operator<<;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user