/trunk/Examples/test-suite/smart_pointer_typedef.i
# · Swig · 21 lines · 16 code · 5 blank · 0 comment · 0 complexity · 774d10c28cf4d6ec50c67152db9aab49 MD5 · raw file
- %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;
- }
- };
- %}