/trunk/Examples/test-suite/smart_pointer_typedef.i
Swig | 21 lines | 16 code | 5 blank | 0 comment | 0 complexity | 774d10c28cf4d6ec50c67152db9aab49 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
- %module smart_pointer_typedef
- %inline %{
- struct Foo {
- int x;
- int getx() { return x; }
- };
- typedef Foo *FooPtr;
- class Bar {
- Foo *f;
- public:
- Bar(Foo *f) : f(f) { }
- FooPtr operator->() {
- return f;
- }
- };
- %}