From 566512f7bc43fc8de9715ce8ed1db6788af5d7a8 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Mon, 25 Oct 2021 11:52:05 +0200 Subject: [PATCH] #1807 argument_types() on schema entity --- src/ifcwrap/IfcParseWrapper.i | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/ifcwrap/IfcParseWrapper.i b/src/ifcwrap/IfcParseWrapper.i index 57cc1d2fa7..b53f2d25aa 100644 --- a/src/ifcwrap/IfcParseWrapper.i +++ b/src/ifcwrap/IfcParseWrapper.i @@ -660,6 +660,22 @@ static IfcUtil::ArgumentType helper_fn_attribute_type(const IfcUtil::IfcBaseClas def __repr__(self): return "" % (self.name()) %} + std::vector argument_types() { + size_t i = 0; + std::vector r; + for (auto& attr : $self->all_attributes()) { + auto at = IfcUtil::Argument_UNKNOWN; + auto pt = attr->type_of_attribute(); + if ($self->derived()[i++]) { + at = IfcUtil::Argument_DERIVED; + } + if (pt == 0) { + at = IfcUtil::Argument_UNKNOWN; + } + r.push_back(IfcUtil::ArgumentTypeToString(IfcUtil::from_parameter_type(pt))); + } + return r; + } } %extend IfcParse::schema_definition {