summaryrefslogtreecommitdiff
path: root/Examples/test-suite/director_basic.i
diff options
context:
space:
mode:
authorMarcelo Matus <mmatus@acms.arizona.edu>2004-10-18 02:08:55 +0000
committerMarcelo Matus <mmatus@acms.arizona.edu>2004-10-18 02:08:55 +0000
commit50b87f398b003c22e9eee15025376378ced4b3c2 (patch)
tree77a29e602fdebf61ed30ae1ccacd27f330b916e4 /Examples/test-suite/director_basic.i
parentf9974297d67a4b59e5bb52c832e87c0e93c18426 (diff)
downloadswig-50b87f398b003c22e9eee15025376378ced4b3c2.tar.gz
more examples, and fixes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6432 626c5289-ae23-0410-ae9c-e8d60b6d4f22
Diffstat (limited to 'Examples/test-suite/director_basic.i')
-rw-r--r--Examples/test-suite/director_basic.i19
1 files changed, 16 insertions, 3 deletions
diff --git a/Examples/test-suite/director_basic.i b/Examples/test-suite/director_basic.i
index 5393dd7d2..6d435e0c6 100644
--- a/Examples/test-suite/director_basic.i
+++ b/Examples/test-suite/director_basic.i
@@ -15,6 +15,7 @@ public:
%feature("director") Foo;
+
class Foo {
public:
virtual ~Foo() {}
@@ -25,7 +26,12 @@ public:
%{
#include <complex>
%}
-%feature("director") A;
+%feature("director");
+
+// basic renaming
+%rename(rg) A::gg;
+%feature("nodirector") hi::A1::gg;
+
%inline %{
struct A{
@@ -34,11 +40,18 @@ struct A{
virtual ~A() {}
virtual int f(int i=0) {return i;}
+ virtual int gg(int i=0) {return i;}
};
-struct A1 : public A{
+namespace hi {
+
+ struct A1 : public A{
A1(std::complex<int> i, double d=0.0) : A(i, d) {}
A1(int i, bool j=false) : A(i, j) {}
-};
+
+ virtual int ff(int i = 0) {return i;}
+ };
+}
+
%}