PageRenderTime 38ms CodeModel.GetById 13ms RepoModel.GetById 0ms app.codeStats 0ms

/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
  1. %module smart_pointer_typedef
  2. %inline %{
  3. struct Foo {
  4. int x;
  5. int getx() { return x; }
  6. };
  7. typedef Foo *FooPtr;
  8. class Bar {
  9. Foo *f;
  10. public:
  11. Bar(Foo *f) : f(f) { }
  12. FooPtr operator->() {
  13. return f;
  14. }
  15. };
  16. %}