Add parse_ifcxml to ifcopenshell_wrapper

This commit is contained in:
Thomas Krijnen
2020-04-11 14:13:19 +02:00
parent c93a4b6808
commit 42fedf81c4
+5
View File
@@ -521,6 +521,7 @@ static IfcUtil::ArgumentType helper_fn_attribute_type(const IfcUtil::IfcBaseClas
// The IfcFile* returned by open() is to be freed by SWIG/Python
%newobject open;
%newobject read;
%newobject parse_ifcxml;
%inline %{
IfcParse::IfcFile* open(const std::string& fn) {
@@ -528,6 +529,10 @@ static IfcUtil::ArgumentType helper_fn_attribute_type(const IfcUtil::IfcBaseClas
return f;
}
IfcParse::IfcFile* parse_ifcxml(const std::string& fn) {
return IfcParse::parse_ifcxml(fn);
}
IfcParse::IfcFile* read(const std::string& data) {
char* copiedData = new char[data.length()];
memcpy(copiedData, data.c_str(), data.length());