mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-12 18:43:26 +00:00
Fix latebound entity inheritance hierarchy wrt id() #5822 - not ideal, because BaseEntity.declation now returns declaration
This commit is contained in:
@@ -152,7 +152,7 @@ boost::optional<std::string> format_attribute(ifcopenshell::geometry::abstract_m
|
||||
|
||||
// Appends to a node with possibly existing attributes
|
||||
ptree* format_entity_instance(ifcopenshell::geometry::abstract_mapping* mapping, IfcUtil::IfcBaseEntity* instance, ptree& child, ptree& tree, bool as_link = false) {
|
||||
const unsigned n = instance->declaration().attribute_count();
|
||||
const unsigned n = instance->declaration().as_entity()->attribute_count();
|
||||
for (unsigned i = 0; i < n; ++i) {
|
||||
try {
|
||||
instance->data().get_attribute_value(i);
|
||||
@@ -163,7 +163,7 @@ ptree* format_entity_instance(ifcopenshell::geometry::abstract_mapping* mapping,
|
||||
auto argument = instance->data().get_attribute_value(i);
|
||||
if (argument.isNull()) continue;
|
||||
|
||||
std::string argument_name = instance->declaration().attribute_by_index(i)->name();
|
||||
std::string argument_name = instance->declaration().as_entity()->attribute_by_index(i)->name();
|
||||
std::map<std::string, std::string>::const_iterator argument_name_it;
|
||||
argument_name_it = POSTFIX_SCHEMA(argument_name_map).find(argument_name);
|
||||
if (argument_name_it != POSTFIX_SCHEMA(argument_name_map).end()) {
|
||||
|
||||
Reference in New Issue
Block a user