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

# · Swig · 24 lines · 20 code · 4 blank · 0 comment · 0 complexity · 5040c86db8b6bc679a1cc056094469d3 MD5 · raw file

  1. %module smart_pointer_static
  2. %inline %{
  3. class Foo2;
  4. class MyHandle_Foo2 {
  5. public:
  6. Foo2 * operator -> ();
  7. };
  8. class Foo2 {
  9. public:
  10. virtual ~Foo2() {}
  11. virtual int sum(int i, int j) { return i+j; }
  12. static int sum(int i, int j, int k);
  13. };
  14. %}
  15. %{
  16. int Foo2::sum(int i, int j, int k) {
  17. return i+j+k;
  18. }
  19. Foo2 * MyHandle_Foo2::operator -> () { return new Foo2(); }
  20. %}