The dirprot feature is now disabled by default. Added dirprot option and ruby runtime examples.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5510 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
d25b087a5a
commit
86edc68494
11 changed files with 154 additions and 41 deletions
34
SWIG/Examples/test-suite/ruby/director_nested_runme.rb
Normal file
34
SWIG/Examples/test-suite/ruby/director_nested_runme.rb
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
require 'director_nested'
|
||||
|
||||
class A < Director_nested::FooBar_int
|
||||
def do_step
|
||||
"A::do_step;"
|
||||
end
|
||||
|
||||
def get_value
|
||||
"A::get_value"
|
||||
end
|
||||
end
|
||||
|
||||
a = A.new
|
||||
|
||||
raise RuntimeError if a.step != "Bar::step;Foo::advance;Bar::do_advance;A::do_step;"
|
||||
|
||||
|
||||
class B < Director_nested::FooBar_int
|
||||
def do_advance
|
||||
"B::do_advance;" + do_step
|
||||
end
|
||||
|
||||
def do_step
|
||||
"B::do_step;"
|
||||
end
|
||||
|
||||
def get_value
|
||||
"B::get_value"
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
b = B.new
|
||||
raise RuntimeError if b.step != "Bar::step;Foo::advance;B::do_advance;B::do_step;"
|
||||
13
SWIG/Examples/test-suite/ruby/director_protected_runme.rb
Normal file
13
SWIG/Examples/test-suite/ruby/director_protected_runme.rb
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
require 'director_protected'
|
||||
|
||||
class FooBar < Director_protected::Bar
|
||||
def ping
|
||||
"FooBar::ping();"
|
||||
end
|
||||
end
|
||||
|
||||
b = Director_protected::Bar.new
|
||||
fb = FooBar.new
|
||||
|
||||
raise RuntimeError if b.pong != "Bar::pong();Foo::pong();Bar::ping();"
|
||||
raise RuntimeError if fb.pong != "Bar::pong();Foo::pong();FooBar::ping();"
|
||||
Loading…
Add table
Add a link
Reference in a new issue