Added special cases to the test-suite as required for D.

This is a part of the pending merge of the D module.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12298 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
David Nadlinger 2010-11-18 00:17:37 +00:00
commit a355d2d46a
29 changed files with 137 additions and 39 deletions

View file

@ -1,16 +1,18 @@
%module minherit2
// A multiple inheritance example, mainly for Java and C#.
// The example shows how it is possible to turn C++ abstract base classes into Java/C# interface.
// A multiple inheritance example, mainly for Java, C# and D.
// The example shows how it is possible to turn C++ abstract base classes into
// Java/C#/D interfaces.
// In the future, all this trouble might be more automated.
%warnfilter(SWIGWARN_JAVA_MULTIPLE_INHERITANCE,
SWIGWARN_CSHARP_MULTIPLE_INHERITANCE,
SWIGWARN_D_MULTIPLE_INHERITANCE,
SWIGWARN_RUBY_MULTIPLE_INHERITANCE,
SWIGWARN_PHP_MULTIPLE_INHERITANCE) RemoteMpe;
#if defined(SWIGJAVA) || defined(SWIGCSHARP)
#if defined(SWIGJAVA) || defined(SWIGCSHARP) || defined(SWIGD)
#if defined(SWIGCSHARP)
#define javaclassmodifiers csclassmodifiers
@ -22,6 +24,21 @@
#define javabase csbase
#endif
#if defined(SWIGD)
#define javaclassmodifiers dclassmodifiers
#define javabody dbody
#define javafinalize ddestructor
#define javadestruct ddispose
#define javaout dout
#define javainterfaces dinterfaces
#define javabase dbase
%typemap(dimports) RemoteMpe %{
$importtype(IRemoteSyncIO)
$importtype(IRemoteAsyncIO)
%}
#endif
// Modify multiple inherited base classes into inheriting interfaces
%typemap(javainterfaces) RemoteMpe "IRemoteSyncIO, IRemoteAsyncIO";
%typemap(javabase, replace="1") RemoteMpe "";
@ -51,6 +68,12 @@
// Features are inherited by derived classes, so override this
%csmethodmodifiers RemoteMpe::syncmethod "public"
%csmethodmodifiers RemoteMpe::asyncmethod "public"
#elif defined(SWIGD)
%dmethodmodifiers IRemoteSyncIO::syncmethod "";
%dmethodmodifiers IRemoteAsyncIO::asyncmethod "";
// Features are inherited by derived classes, so override this
%dmethodmodifiers RemoteMpe::syncmethod "public"
%dmethodmodifiers RemoteMpe::asyncmethod "public"
#endif
#endif