PageRenderTime 53ms CodeModel.GetById 26ms app.highlight 16ms RepoModel.GetById 1ms app.codeStats 0ms

/tags/ttn-post-libtool-1-4-3-upgrade/SWIG/Examples/test-suite/using_extend.i

#
Swig | 37 lines | 29 code | 8 blank | 0 comment | 0 complexity | ab5c4edb1d80e010ddc6fc5a6d059c66 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
 1%module using_extend
 2
 3%warnfilter(802, 813) FooBar;   // Ruby, Java multiple inheritance
 4
 5%extend Foo {
 6     int blah(int x, int y) {
 7        return x+y;
 8     }
 9};
10
11%extend Bar {
12     double blah(double x, double y) {
13        return x+y;
14     }
15};
16
17%inline %{
18class Foo {
19public:
20     int blah(int x) { return x; }
21     char *blah(char *x) { return x; }
22};
23
24class Bar {
25public:
26     double blah(double x) { return x; }
27};
28
29class FooBar : public Foo, public Bar {
30public:
31     using Foo::blah;
32     using Bar::blah;
33     char *blah(char *x) { return x; }
34};
35
36%}
37