csgetcptr and csptrconstructormodifiers typemap replaced by the csbody/csbody_derived typemap
csclassmodifiers typemap now contains the class type git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5964 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
56211210f9
commit
77daf7e813
1 changed files with 49 additions and 5 deletions
|
|
@ -401,12 +401,56 @@ $1 = &temp; %}
|
||||||
|
|
||||||
/* Typemaps used for the generation of proxy and type wrapper class code */
|
/* Typemaps used for the generation of proxy and type wrapper class code */
|
||||||
%typemap(csbase) SWIGTYPE, SWIGTYPE *, SWIGTYPE &, SWIGTYPE [], SWIGTYPE (CLASS::*) ""
|
%typemap(csbase) SWIGTYPE, SWIGTYPE *, SWIGTYPE &, SWIGTYPE [], SWIGTYPE (CLASS::*) ""
|
||||||
%typemap(csclassmodifiers) SWIGTYPE, SWIGTYPE *, SWIGTYPE &, SWIGTYPE [], SWIGTYPE (CLASS::*) "public"
|
%typemap(csclassmodifiers) SWIGTYPE, SWIGTYPE *, SWIGTYPE &, SWIGTYPE [], SWIGTYPE (CLASS::*) "public class"
|
||||||
%typemap(cscode) SWIGTYPE, SWIGTYPE *, SWIGTYPE &, SWIGTYPE [], SWIGTYPE (CLASS::*) ""
|
%typemap(cscode) SWIGTYPE, SWIGTYPE *, SWIGTYPE &, SWIGTYPE [], SWIGTYPE (CLASS::*) ""
|
||||||
%typemap(csimports) SWIGTYPE, SWIGTYPE *, SWIGTYPE &, SWIGTYPE [], SWIGTYPE (CLASS::*) "\nusing System;\n"
|
%typemap(csimports) SWIGTYPE, SWIGTYPE *, SWIGTYPE &, SWIGTYPE [], SWIGTYPE (CLASS::*) "\nusing System;\n"
|
||||||
%typemap(csinterfaces) SWIGTYPE "IDisposable"
|
%typemap(csinterfaces) SWIGTYPE "IDisposable"
|
||||||
%typemap(csinterfaces_derived) SWIGTYPE *, SWIGTYPE &, SWIGTYPE [], SWIGTYPE (CLASS::*) ""
|
%typemap(csinterfaces_derived) SWIGTYPE *, SWIGTYPE &, SWIGTYPE [], SWIGTYPE (CLASS::*) ""
|
||||||
%typemap(csptrconstructormodifiers) SWIGTYPE, SWIGTYPE *, SWIGTYPE &, SWIGTYPE [], SWIGTYPE (CLASS::*) "internal"
|
|
||||||
|
// Proxy classes (base classes, ie, not derived classes)
|
||||||
|
%typemap(csbody) SWIGTYPE %{
|
||||||
|
private IntPtr swigCPtr;
|
||||||
|
protected bool swigCMemOwn;
|
||||||
|
|
||||||
|
internal $csclassname(IntPtr cPtr, bool cMemoryOwn) {
|
||||||
|
swigCMemOwn = cMemoryOwn;
|
||||||
|
swigCPtr = cPtr;
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static IntPtr getCPtr($csclassname obj) {
|
||||||
|
return (obj == null) ? IntPtr.Zero : obj.swigCPtr;
|
||||||
|
}
|
||||||
|
%}
|
||||||
|
|
||||||
|
// Derived proxy classes
|
||||||
|
%typemap(csbody_derived) SWIGTYPE %{
|
||||||
|
private IntPtr swigCPtr;
|
||||||
|
|
||||||
|
internal $csclassname(IntPtr cPtr, bool cMemoryOwn) : base($modulePINVOKE.$csclassnameUpcast(cPtr), cMemoryOwn) {
|
||||||
|
swigCPtr = cPtr;
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static IntPtr getCPtr($csclassname obj) {
|
||||||
|
return (obj == null) ? IntPtr.Zero : obj.swigCPtr;
|
||||||
|
}
|
||||||
|
%}
|
||||||
|
|
||||||
|
// Typewrapper classes
|
||||||
|
%typemap(csbody) SWIGTYPE *, SWIGTYPE &, SWIGTYPE [], SWIGTYPE (CLASS::*) %{
|
||||||
|
private IntPtr swigCPtr;
|
||||||
|
|
||||||
|
internal $csclassname(IntPtr cPtr, bool bFutureUse) {
|
||||||
|
swigCPtr = cPtr;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected $csclassname() {
|
||||||
|
swigCPtr = IntPtr.Zero;
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static IntPtr getCPtr($csclassname obj) {
|
||||||
|
return (obj == null) ? IntPtr.Zero : obj.swigCPtr;
|
||||||
|
}
|
||||||
|
%}
|
||||||
|
|
||||||
%typemap(csfinalize) SWIGTYPE %{
|
%typemap(csfinalize) SWIGTYPE %{
|
||||||
~$csclassname() {
|
~$csclassname() {
|
||||||
|
|
@ -434,9 +478,6 @@ $1 = &temp; %}
|
||||||
}
|
}
|
||||||
|
|
||||||
%typemap(csgetcptr) SWIGTYPE, SWIGTYPE *, SWIGTYPE &, SWIGTYPE [], SWIGTYPE (CLASS::*) %{
|
%typemap(csgetcptr) SWIGTYPE, SWIGTYPE *, SWIGTYPE &, SWIGTYPE [], SWIGTYPE (CLASS::*) %{
|
||||||
internal static IntPtr getCPtr($csclassname obj) {
|
|
||||||
return (obj == null) ? IntPtr.Zero : obj.swigCPtr;
|
|
||||||
}
|
|
||||||
%}
|
%}
|
||||||
|
|
||||||
/* C# specific directives */
|
/* C# specific directives */
|
||||||
|
|
@ -444,6 +485,9 @@ $1 = &temp; %}
|
||||||
#define %csenum(wrapapproach) %feature("cs:enum","wrapapproach")
|
#define %csenum(wrapapproach) %feature("cs:enum","wrapapproach")
|
||||||
#define %csmethodmodifiers %feature("cs:methodmodifiers")
|
#define %csmethodmodifiers %feature("cs:methodmodifiers")
|
||||||
|
|
||||||
|
%pragma(csharp) imclassclassmodifiers="class"
|
||||||
|
%pragma(csharp) moduleclassmodifiers="public class"
|
||||||
|
|
||||||
%pragma(csharp) moduleimports=%{
|
%pragma(csharp) moduleimports=%{
|
||||||
using System;
|
using System;
|
||||||
%}
|
%}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue