Moved to Ruby directory.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7525 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
c8a76f8587
commit
87bc2e3a5c
1 changed files with 0 additions and 44 deletions
|
|
@ -1,44 +0,0 @@
|
||||||
%module(directors="1") track_objects_directors
|
|
||||||
|
|
||||||
%{
|
|
||||||
#include <string>
|
|
||||||
%}
|
|
||||||
|
|
||||||
%include "std_string.i";
|
|
||||||
%feature("director") Foo;
|
|
||||||
|
|
||||||
%trackobjects;
|
|
||||||
|
|
||||||
%inline %{
|
|
||||||
|
|
||||||
class Foo {
|
|
||||||
public:
|
|
||||||
Foo() {}
|
|
||||||
virtual ~Foo() {}
|
|
||||||
virtual std::string ping()
|
|
||||||
{
|
|
||||||
return "Foo::ping()";
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual std::string pong()
|
|
||||||
{
|
|
||||||
return "Foo::pong();" + ping();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
class Container {
|
|
||||||
Foo* foo_;
|
|
||||||
public:
|
|
||||||
Foo* get_foo()
|
|
||||||
{
|
|
||||||
return foo_;
|
|
||||||
}
|
|
||||||
|
|
||||||
void set_foo(Foo *foo)
|
|
||||||
{
|
|
||||||
foo_ = foo;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
%}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue