@@ -29,6 +29,13 @@ private:
2929%ignore IfcParse::IfcFile::schema;
3030%ignore IfcParse::IfcFile::begin;
3131%ignore IfcParse::IfcFile::end;
32+ %ignore IfcParse::IfcFile::types_begin;
33+ %ignore IfcParse::IfcFile::types_end;
34+ %ignore IfcParse::IfcFile::internal_guid_map;
35+ %ignore IfcParse::IfcFile::storage_;
36+
37+ %ignore in_memory_file_storage;
38+ %ignore rocks_db_file_storage;
3239
3340%ignore parse_context;
3441
@@ -154,7 +161,7 @@ static IfcUtil::ArgumentType helper_fn_attribute_type(const IfcUtil::IfcBaseClas
154161 std::vector<unsigned > entity_names () const {
155162 std::vector<unsigned > keys;
156163 keys.reserve (std::distance ($self->begin (), $self->end ()));
157- for (IfcParse::IfcFile:: entity_by_id_t ::const_iterator it = $self->begin (); it != $self->end (); ++ it) {
164+ for (auto it = $self->begin (); it != $self->end (); ++ it) {
158165 keys.push_back (it->first );
159166 }
160167 return keys;
@@ -286,15 +293,15 @@ static IfcUtil::ArgumentType helper_fn_attribute_type(const IfcUtil::IfcBaseClas
286293 }
287294
288295 AttributeValue get_argument (unsigned i) {
289- return $self->data (). get_attribute_value (i);
296+ return $self->get_attribute_value (i);
290297 }
291298
292299 AttributeValue get_argument (const std::string& a) {
293300 auto i = $self->declaration ().as_entity ()->attribute_index (a);
294301 if (i == -1 ) {
295302 throw std::runtime_error (" Attribute '" + a + " ' not found on entity named " + $self->declaration ().name ());
296303 }
297- return $self->data (). get_attribute_value ((unsigned )i);
304+ return $self->get_attribute_value ((unsigned )i);
298305 }
299306
300307 bool __eq__ (IfcUtil::IfcBaseClass* other) const {
@@ -595,7 +602,7 @@ static IfcUtil::ArgumentType helper_fn_attribute_type(const IfcUtil::IfcBaseClas
595602 IfcUtil::IfcBaseClass* new_IfcBaseClass (const std::string& schema_identifier, const std::string& name) {
596603 const IfcParse::schema_definition* schema = IfcParse::schema_by_name (schema_identifier);
597604 const IfcParse::declaration* decl = schema->declaration_by_name (name);
598- IfcEntityInstanceData data (storage_t (decl->as_entity () ? decl->as_entity ()->attribute_count () : 1 ));
605+ IfcEntityInstanceData data (in_memory_attribute_storage (decl->as_entity () ? decl->as_entity ()->attribute_count () : 1 ));
599606 auto inst = schema->instantiate (decl, std::move (data));
600607 if (auto entinst = inst->as <IfcUtil::IfcBaseEntity>()) {
601608 entinst->populate_derived ();
@@ -763,8 +770,8 @@ static IfcUtil::ArgumentType helper_fn_attribute_type(const IfcUtil::IfcBaseClas
763770
764771 // @todo refactor this to remove duplication with the typemap.
765772 // except this is calls the above function in case of instances.
766- PyObject* convert_cpp_attribute_to_python (AttributeValue arg , bool include_identifier = true ) {
767- return arg. array_ -> apply_visitor ([include_identifier](auto & v){
773+ PyObject* convert_cpp_attribute_to_python (IfcUtil::IfcBaseClass* instance, size_t attribute_index , bool include_identifier = true ) {
774+ return instance-> get_attribute_value (attribute_index). apply_visitor ([include_identifier](const auto & v){
768775 using U = std::decay_t <decltype (v)>;
769776 if constexpr (is_std_vector_v<U>) {
770777 return pythonize_vector (v);
@@ -802,7 +809,7 @@ static IfcUtil::ArgumentType helper_fn_attribute_type(const IfcUtil::IfcBaseClas
802809 } else {
803810 return pythonize (v);
804811 }
805- }, arg. index_ );
812+ });
806813 }
807814%}
808815%inline %{
@@ -819,7 +826,7 @@ static IfcUtil::ArgumentType helper_fn_attribute_type(const IfcUtil::IfcBaseClas
819826 auto attr_type = *dit
820827 ? IfcUtil::Argument_DERIVED
821828 : IfcUtil::from_parameter_type ((*it)->type_of_attribute ());
822- auto value_cpp = v->data (). get_attribute_value (std::distance (attrs.begin (), it));
829+ auto value_cpp = v->get_attribute_value (std::distance (attrs.begin (), it));
823830 auto value_py = convert_cpp_attribute_to_python (value_cpp, include_identifier);
824831 PyDict_SetItem (d, name_py, value_py);
825832 Py_DECREF (name_py);
@@ -836,7 +843,7 @@ static IfcUtil::ArgumentType helper_fn_attribute_type(const IfcUtil::IfcBaseClas
836843 } else {
837844 const std::string& name_cpp = " wrappedValue" ;
838845 auto name_py = pythonize (name_cpp);
839- auto value_cpp = v->data (). get_attribute_value (0 );
846+ auto value_cpp = v->get_attribute_value (0 );
840847 auto value_py = convert_cpp_attribute_to_python (value_cpp, include_identifier);
841848 PyDict_SetItem (d, name_py, value_py);
842849 Py_DECREF (name_py);
0 commit comments