fix def args + director + constructors

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6689 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2004-11-08 05:31:27 +00:00
commit 41a0b2dd59
4 changed files with 97 additions and 11 deletions

View file

@ -28,3 +28,17 @@ public:
std::string GetMsg(std::string msg) { return Msg(msg); }
};
%inline %{
class Bar {
public:
Bar() {}
Bar(int i) {}
virtual ~Bar() {}
virtual std::string Msg(std::string msg = "default") { return "Bar-" + msg; }
std::string GetMsg() { return Msg(); }
std::string GetMsg(std::string msg) { return Msg(msg); }
};
%}

View file

@ -0,0 +1,19 @@
require 'director_default'
a = Director_default::Foo.new 1
a = Director_default::Foo.new
a.Msg
a.Msg "hello"
a.GetMsg
a.GetMsg "hello"
a = Director_default::Bar.new 1
a = Director_default::Bar.new
a.Msg
a.Msg "hello"
a.GetMsg
a.GetMsg "hello"