/trunk/Examples/test-suite/smart_pointer_static.i
# · Swig · 24 lines · 20 code · 4 blank · 0 comment · 0 complexity · 5040c86db8b6bc679a1cc056094469d3 MD5 · raw file
- %module smart_pointer_static
- %inline %{
- class Foo2;
- class MyHandle_Foo2 {
- public:
- Foo2 * operator -> ();
- };
- class Foo2 {
- public:
- virtual ~Foo2() {}
- virtual int sum(int i, int j) { return i+j; }
- static int sum(int i, int j, int k);
- };
- %}
- %{
- int Foo2::sum(int i, int j, int k) {
- return i+j+k;
- }
- Foo2 * MyHandle_Foo2::operator -> () { return new Foo2(); }
- %}