mirror of https://github.com/swig/swig
more directors and default arg tests
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9271 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
2f3642ab6a
commit
17e3a149dc
|
@ -1,4 +1,8 @@
|
||||||
%module(directors="1") director_default
|
%module(directors="1") director_default
|
||||||
|
|
||||||
|
%warnfilter(SWIGWARN_TYPEMAP_THREAD_UNSAFE,SWIGWARN_TYPEMAP_DIRECTOROUT_PTR) DefaultsBase;
|
||||||
|
%warnfilter(SWIGWARN_TYPEMAP_THREAD_UNSAFE,SWIGWARN_TYPEMAP_DIRECTOROUT_PTR) DefaultsDerived;
|
||||||
|
|
||||||
%{
|
%{
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
@ -42,3 +46,21 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
%feature("director") DefaultsBase;
|
||||||
|
%feature("director") DefaultsDerived;
|
||||||
|
|
||||||
|
%inline %{
|
||||||
|
typedef int* IntegerPtr;
|
||||||
|
typedef double Double;
|
||||||
|
|
||||||
|
struct DefaultsBase {
|
||||||
|
virtual IntegerPtr defaultargs(double d, int * a = 0) = 0;
|
||||||
|
virtual ~DefaultsBase() {}
|
||||||
|
};
|
||||||
|
|
||||||
|
struct DefaultsDerived : DefaultsBase {
|
||||||
|
int * defaultargs(Double d, IntegerPtr a = 0) { return 0; }
|
||||||
|
};
|
||||||
|
%}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue