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:
parent
46dea78d93
commit
41a0b2dd59
4 changed files with 97 additions and 11 deletions
|
|
@ -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); }
|
||||
};
|
||||
|
||||
%}
|
||||
|
|
|
|||
19
Examples/test-suite/ruby/director_default_runme.rb
Normal file
19
Examples/test-suite/ruby/director_default_runme.rb
Normal 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"
|
||||
Loading…
Add table
Add a link
Reference in a new issue