/tags/rel-1-3-25/SWIG/Examples/test-suite/smart_pointer_simple.i
Swig | 19 lines | 15 code | 4 blank | 0 comment | 0 complexity | 11f0a2c0b4a25ec4b65b9b5fbf9851ad MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
- %module smart_pointer_simple
- %inline %{
- struct Foo {
- int x;
- int getx() { return x; }
- };
- class Bar {
- Foo *f;
- public:
- Bar(Foo *f) : f(f) { }
- Foo *operator->() {
- return f;
- }
- };
- %}