Files
cpp-thirdparty/winx64/bin/swig-3.0.12/Examples/modula3/reference/example.i
Bassem Girgis 81b4b9e273 Initial commit
2018-12-20 17:34:07 -06:00

33 lines
710 B
OpenEdge ABL

/* File : example.i */
/* This file has a few "typical" uses of C++ references. */
%module Example
%{
#include "example.h"
%}
%pragma(modula3) unsafe="1";
%insert(m3wrapintf) %{FROM ExampleRaw IMPORT Vector, VectorArray;%}
%insert(m3wrapimpl) %{FROM ExampleRaw IMPORT Vector, VectorArray;%}
%typemap(m3wrapretvar) Vector %{vec: UNTRACED REF Vector;%}
%typemap(m3wrapretraw) Vector %{vec%}
%typemap(m3wrapretconv) Vector %{vec^%}
/* This helper function calls an overloaded operator */
%inline %{
Vector addv(const Vector &a, const Vector &b) {
return a+b;
}
%}
%rename(Vector_Clear) Vector::Vector();
%rename(Add) Vector::operator+;
%rename(GetItem) VectorArray::operator[];
%include "example.h"