PageRenderTime 17ms CodeModel.GetById 16ms app.highlight 0ms RepoModel.GetById 0ms app.codeStats 0ms

/tags/rel-1-3-25/SWIG/Examples/test-suite/namespace_extend.i

#
Swig | 34 lines | 28 code | 6 blank | 0 comment | 0 complexity | 25ee9edde1db2302ffa5f1291d18b23c MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
 1%module namespace_extend
 2
 3%warnfilter(801) 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