PageRenderTime 7ms CodeModel.GetById 2ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Examples/modula3/class/example.i

#
Swig | 32 lines | 15 code | 7 blank | 10 comment | 0 complexity | 56b284a791f461a25d970fbdd014c775 MD5 | raw file
 1/* File : example.i */
 2%module Example
 3
 4%{
 5#include "example.h"
 6%}
 7
 8%insert(m3makefile) %{template("../swig")
 9cxx_source("example_wrap")%}
10
11%typemap(m3rawinmode)    Shape *, Circle *, Square * ""
12%typemap(m3rawrettype)   Shape *, Circle *, Square * "$1_basetype"
13
14%typemap(m3wrapinmode)   Shape *, Circle *, Square * ""
15%typemap(m3wrapargraw)   Shape *, Circle *, Square * "self.cxxObj"
16
17%typemap(m3wrapretvar)   Circle *, Square * "cxxObj : ExampleRaw.$1_basetype;"
18%typemap(m3wrapretraw)   Circle *, Square * "cxxObj"
19%typemap(m3wrapretconv)  Circle *, Square * "NEW($1_basetype,cxxObj:=cxxObj)"
20%typemap(m3wraprettype)  Circle *, Square * "$1_basetype"
21
22/* Should work with and without renaming
23%rename(M3Shape) Shape;
24%rename(M3Circle) Circle;
25%rename(M3Square) Square;
26%typemap(m3wrapintype)   Shape *, Circle *, Square * "M3$1_basetype"
27%typemap(m3wraprettype)  Shape *, Circle *, Square * "M3$1_basetype"
28%typemap(m3wrapretconv)           Circle *, Square * "NEW(M3$1_basetype,cxxObj:=cxxObj)"
29*/
30
31/* Let's just grab the original header file here */
32%include "example.h"