mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-27 18:57:17 +00:00
declaration property
This commit is contained in:
@@ -223,9 +223,7 @@ class entity_instance_mixin:
|
|||||||
|
|
||||||
:return: True if the instance is an entity
|
:return: True if the instance is an entity
|
||||||
"""
|
"""
|
||||||
schema_name = self.is_a(True).split(".")[0]
|
return isinstance(self.declaration, ifcopenshell_wrapper.entity)
|
||||||
decl = ifcopenshell_wrapper.schema_by_name(schema_name).declaration_by_name(self.is_a())
|
|
||||||
return isinstance(decl, ifcopenshell_wrapper.entity)
|
|
||||||
|
|
||||||
def compare(self, other, op, reverse=False):
|
def compare(self, other, op, reverse=False):
|
||||||
"""Compares with another instance.
|
"""Compares with another instance.
|
||||||
|
|||||||
@@ -884,6 +884,7 @@ private:
|
|||||||
|
|
||||||
%pythoncode %{
|
%pythoncode %{
|
||||||
file = property(file_py)
|
file = property(file_py)
|
||||||
|
declaration = property(declaration)
|
||||||
%}
|
%}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,10 @@
|
|||||||
$result = SWIG_NewPointerObj(SWIG_as_voidptr($1), declaration_type_to_swig($1), 0);
|
$result = SWIG_NewPointerObj(SWIG_as_voidptr($1), declaration_type_to_swig($1), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
%typemap(out) const IfcParse::declaration& {
|
||||||
|
$result = SWIG_NewPointerObj(SWIG_as_voidptr($1), declaration_type_to_swig($1), 0);
|
||||||
|
}
|
||||||
|
|
||||||
%typemap(out) IfcParse::parameter_type* {
|
%typemap(out) IfcParse::parameter_type* {
|
||||||
if ($1->as_named_type()) {
|
if ($1->as_named_type()) {
|
||||||
$result = SWIG_NewPointerObj(SWIG_as_voidptr($1->as_named_type()), SWIGTYPE_p_IfcParse__named_type, 0);
|
$result = SWIG_NewPointerObj(SWIG_as_voidptr($1->as_named_type()), SWIGTYPE_p_IfcParse__named_type, 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user