mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 09:21:46 +00:00
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:
@@ -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): ...
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user