Director %ignore test case
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9316 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
5000f2c0a2
commit
9b8fd2ff04
3 changed files with 87 additions and 0 deletions
|
|
@ -128,6 +128,7 @@ CPP_TEST_CASES += \
|
||||||
director_exception \
|
director_exception \
|
||||||
director_frob \
|
director_frob \
|
||||||
director_finalizer \
|
director_finalizer \
|
||||||
|
director_ignore \
|
||||||
director_namespace_clash \
|
director_namespace_clash \
|
||||||
director_nested \
|
director_nested \
|
||||||
director_primitives \
|
director_primitives \
|
||||||
|
|
|
||||||
34
SWIG/Examples/test-suite/csharp/director_ignore_runme.cs
Normal file
34
SWIG/Examples/test-suite/csharp/director_ignore_runme.cs
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace director_ignoreNamespace {
|
||||||
|
|
||||||
|
public class runme
|
||||||
|
{
|
||||||
|
static void Main()
|
||||||
|
{
|
||||||
|
runme r = new runme();
|
||||||
|
r.run();
|
||||||
|
}
|
||||||
|
|
||||||
|
void run()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class DIgnoresDerived : DIgnores
|
||||||
|
{
|
||||||
|
public DIgnoresDerived() : base()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
// These will give a warning if the %ignore is not working
|
||||||
|
public virtual void OverloadedMethod(int n, int xoffset, int yoffset) {}
|
||||||
|
public virtual void OverloadedMethod(int n, int xoffset) {}
|
||||||
|
public virtual void OverloadedMethod(int n) {}
|
||||||
|
|
||||||
|
public virtual void ProtectedMethod(int n, int xoffset, int yoffset) {}
|
||||||
|
public virtual void ProtectedMethod(int n, int xoffset) {}
|
||||||
|
public virtual void ProtectedMethod(int n) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
52
SWIG/Examples/test-suite/director_ignore.i
Executable file
52
SWIG/Examples/test-suite/director_ignore.i
Executable file
|
|
@ -0,0 +1,52 @@
|
||||||
|
%module(directors="1") director_ignore
|
||||||
|
|
||||||
|
%include "std_string.i"
|
||||||
|
|
||||||
|
%feature("director");
|
||||||
|
|
||||||
|
%ignore OverloadedMethod(int n, int xoffset = 0, int yoffset = 0);
|
||||||
|
%ignore ProtectedMethod(int n, int xoffset = 0, int yoffset = 0);
|
||||||
|
%ignore DIgnoreConstructor(bool b);
|
||||||
|
%ignore DIgnoreOnlyConstructor(bool b);
|
||||||
|
|
||||||
|
%inline %{
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
class DIgnores
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual ~DIgnores() {}
|
||||||
|
virtual void OverloadedMethod(int n, int xoffset = 0, int yoffset = 0) {}
|
||||||
|
virtual void OverloadedMethod(bool b) {}
|
||||||
|
protected:
|
||||||
|
virtual void ProtectedMethod(int n, int xoffset = 0, int yoffset = 0) {}
|
||||||
|
};
|
||||||
|
|
||||||
|
class DIgnoreConstructor
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual ~DIgnoreConstructor() {}
|
||||||
|
DIgnoreConstructor(std::string s, int i) {}
|
||||||
|
DIgnoreConstructor(bool b) {}
|
||||||
|
};
|
||||||
|
|
||||||
|
class DIgnoreOnlyConstructor
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual ~DIgnoreOnlyConstructor() {}
|
||||||
|
DIgnoreOnlyConstructor(bool b) {}
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
class DAbstractIgnores
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual ~DAbstractIgnores() {}
|
||||||
|
virtual void OverloadedMethod(int n, int xoffset = 0, int yoffset = 0) = 0;
|
||||||
|
virtual void OverloadedMethod(bool b) = 0;
|
||||||
|
};
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
%}
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue