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/SWIG@5510 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
65a0e91dc2
commit
634b973f31
11 changed files with 154 additions and 41 deletions
|
|
@ -1,4 +1,4 @@
|
|||
%module(directors="1") director_protected
|
||||
%module(directors="1",dirprot="1") director_protected
|
||||
|
||||
%{
|
||||
#include <string>
|
||||
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
%newobject *::create();
|
||||
|
||||
%inline %{
|
||||
%inline {
|
||||
class Foo {
|
||||
public:
|
||||
virtual ~Foo() {}
|
||||
|
|
@ -20,7 +20,15 @@ public:
|
|||
return "Foo::pong();" + ping();
|
||||
}
|
||||
protected:
|
||||
|
||||
#if defined(SWIGPYTHON) || defined(SWIGRUBY) \
|
||||
|| defined(SWIGJAVA) || defined(SWIGOCAML)
|
||||
virtual std::string ping() = 0;
|
||||
#else
|
||||
virtual std::string ping() { return "";};
|
||||
#endif
|
||||
|
||||
void hellom() {}
|
||||
};
|
||||
|
||||
class Bar : public Foo
|
||||
|
|
@ -43,8 +51,9 @@ protected:
|
|||
};
|
||||
|
||||
int hi;
|
||||
void him() {}
|
||||
};
|
||||
|
||||
|
||||
%}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue