From 3edb05717816bcd3fd0157fceacfcbe6971000b3 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Mon, 17 Jul 2017 18:10:28 +0200 Subject: [PATCH] Bring back id() to python wrapper. Fixes #241 --- src/ifcwrap/IfcParseWrapper.i | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ifcwrap/IfcParseWrapper.i b/src/ifcwrap/IfcParseWrapper.i index 8e9c3c3808..472cbc8c1e 100644 --- a/src/ifcwrap/IfcParseWrapper.i +++ b/src/ifcwrap/IfcParseWrapper.i @@ -104,6 +104,12 @@ private: } } } + + // id() is defined on IfcBaseEntity and not on IfcBaseClass, in order + // to expose it to the Python wrapper it is simply duplicated here. + int id() const { + return $self->entity->id(); + } bool is_a(const std::string& s) { return self->is(IfcSchema::Type::FromString(boost::to_upper_copy(s)));