/tags/rel-1.3.35/Examples/test-suite/namespace_extend.i
Swig | 34 lines | 28 code | 6 blank | 0 comment | 0 complexity | 73d4c6d9384ddd4a44c14ee379074848 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
1%module namespace_extend
2
3%warnfilter(SWIGWARN_RUBY_WRONG_NAME) bar; /* Ruby, wrong class name */
4
5%{
6namespace foo {
7 class bar {
8 public:
9 };
10}
11foo::bar *new_foo_bar() {
12 return new foo::bar;
13}
14void delete_foo_bar(foo::bar *self) {
15 delete self;
16}
17int foo_bar_blah(foo::bar *self, int x) {
18 return x;
19}
20%}
21
22namespace foo {
23 class bar {
24 public:
25 %extend {
26 bar();
27 ~bar();
28 int blah(int x);
29 };
30 };
31}
32
33
34