IfcParseWrapper - instance_by_guid -> by_guid

It seems they have exactly the same signatures and it makes sense to just rename instance_by_guid to by_guid, instead of implementing it separately.
This commit is contained in:
Andrej730
2025-06-17 12:34:06 +05:00
parent df91f475c1
commit ff09cd0a56
2 changed files with 1 additions and 5 deletions
@@ -942,7 +942,6 @@ class file:
@property
def header(self) -> IfcSpfHeader: ...
def ifcroot_type(self) -> entity: ...
def instance_by_guid(self, guid): ...
def instances_by_reference(self, id): ...
def internal_guid_map(self): ...
def load(self, entity_instance_name, entity, arg4, attribute_index): ...
+1 -4
View File
@@ -49,6 +49,7 @@ private:
%ignore IfcUtil::IfcBaseClass::is;
%rename("by_id") instance_by_id;
%rename("by_guid") instance_by_guid;
%rename("by_type") instances_by_type;
%rename("by_type_excl_subtypes") instances_by_type_excl_subtypes;
%rename("get_inverses_by_declaration") getInverse;
@@ -126,10 +127,6 @@ static IfcUtil::ArgumentType helper_fn_attribute_type(const IfcUtil::IfcBaseClas
return reinterpret_cast<size_t>($self);
}
IfcUtil::IfcBaseClass* by_guid(const std::string& guid) {
return $self->instance_by_guid(guid);
}
aggregate_of_instance::ptr get_inverse(IfcUtil::IfcBaseClass* e) {
if (auto e_ = e->as<IfcUtil::IfcBaseEntity>()) {
return $self->getInverse(e_->id(), 0, -1);