/tags/rel-1.3.35/Examples/test-suite/smart_pointer_const.i

# · Swig · 19 lines · 15 code · 4 blank · 0 comment · 0 complexity · e7e2e22d3af02d30da04e031ad19b606 MD5 · raw file

  1. %module smart_pointer_const
  2. %inline %{
  3. struct Foo {
  4. int x;
  5. int getx() const { return x; }
  6. };
  7. class Bar {
  8. Foo *f;
  9. public:
  10. Bar(Foo *f) : f(f) { }
  11. Foo *operator->() {
  12. return f;
  13. }
  14. };
  15. %}