mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
80 lines
2.8 KiB
OpenEdge ABL
80 lines
2.8 KiB
OpenEdge ABL
/********************************************************************************
|
|
* *
|
|
* This file is part of IfcOpenShell. *
|
|
* *
|
|
* IfcOpenShell is free software: you can redistribute it and/or modify *
|
|
* it under the terms of the Lesser GNU General Public License as published by *
|
|
* the Free Software Foundation, either version 3.0 of the License, or *
|
|
* (at your option) any later version. *
|
|
* *
|
|
* IfcOpenShell is distributed in the hope that it will be useful, *
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
* Lesser GNU General Public License for more details. *
|
|
* *
|
|
* You should have received a copy of the Lesser GNU General Public License *
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
|
* *
|
|
********************************************************************************/
|
|
|
|
%begin %{
|
|
#if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG)
|
|
/* https://github.com/swig/swig/issues/325 */
|
|
# include <basetsd.h>
|
|
# include <assert.h>
|
|
# include <ctype.h>
|
|
# include <errno.h>
|
|
# include <io.h>
|
|
# include <math.h>
|
|
# include <sal.h>
|
|
# include <stdarg.h>
|
|
# include <stddef.h>
|
|
# include <stdio.h>
|
|
# include <stdlib.h>
|
|
# include <string.h>
|
|
# include <sys/stat.h>
|
|
# include <time.h>
|
|
# include <wchar.h>
|
|
#endif
|
|
%}
|
|
|
|
%include "std_string.i"
|
|
%include "exception.i"
|
|
|
|
%exception {
|
|
try {
|
|
$action
|
|
} catch(const IfcParse::IfcAttributeOutOfRangeException& e) {
|
|
SWIG_exception(SWIG_IndexError, e.what());
|
|
} catch(const IfcParse::IfcException& e) {
|
|
SWIG_exception(SWIG_RuntimeError, e.what());
|
|
} catch(const std::runtime_error& e) {
|
|
SWIG_exception(SWIG_RuntimeError, e.what());
|
|
} catch(...) {
|
|
SWIG_exception(SWIG_RuntimeError, "An unknown error occurred");
|
|
}
|
|
}
|
|
|
|
%module ifcopenshell_wrapper %{
|
|
#include "../ifcgeom/IfcGeom.h"
|
|
#include "../ifcgeom/IfcGeomIterator.h"
|
|
|
|
#include "../ifcparse/IfcFile.h"
|
|
#include "../ifcparse/IfcLateBoundEntity.h"
|
|
|
|
#ifdef USE_IFC4
|
|
#include "../ifcparse/Ifc4-latebound.h"
|
|
#else
|
|
#include "../ifcparse/Ifc2x3-latebound.h"
|
|
#endif
|
|
%}
|
|
|
|
%include "utils/type_conversion.i"
|
|
|
|
%include "utils/typemaps_in.i"
|
|
|
|
%include "utils/typemaps_out.i"
|
|
|
|
%include "IfcGeomWrapper.i"
|
|
%include "IfcParseWrapper.i"
|