PageRenderTime 33ms CodeModel.GetById 24ms app.highlight 8ms RepoModel.GetById 0ms app.codeStats 0ms

/tags/rel-1.3.35/Examples/test-suite/smart_pointer_const.i

#
Swig | 19 lines | 15 code | 4 blank | 0 comment | 0 complexity | e7e2e22d3af02d30da04e031ad19b606 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
 1%module smart_pointer_const
 2
 3%inline %{
 4struct Foo {
 5   int x;
 6   int getx() const { return x; }
 7};
 8
 9class Bar {
10   Foo *f;
11public:
12   Bar(Foo *f) : f(f) { }
13   Foo *operator->() {
14      return f;
15   }
16};
17%}
18
19