PageRenderTime 38ms CodeModel.GetById 14ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Examples/test-suite/smart_pointer_rename.i

#
Swig | 25 lines | 17 code | 8 blank | 0 comment | 0 complexity | 8548e4358fe70a35382b9af4dfb974d2 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. %module smart_pointer_rename
  2. %rename(ftest1) Foo::test(int);
  3. %rename(ftest2) Foo::test(int,int);
  4. %inline %{
  5. class Foo {
  6. public:
  7. int test(int) { return 1; }
  8. int test(int,int) { return 2; }
  9. };
  10. class Bar {
  11. Foo *f;
  12. public:
  13. Bar(Foo *_f) : f(_f) { }
  14. Foo *operator->() { return f; }
  15. int test() { return 3; }
  16. };
  17. %}