mirror of https://github.com/swig/swig
Remove using directives from the generated C# code and fully qualify the use of all .NET framework types in order to minimize potential name collisions from input files defining types, namespace, etc with the same name as .NET framework members.
This commit is contained in:
parent
cb2df12630
commit
adb93980f2
|
@ -116,7 +116,7 @@ struct PrePost3 {
|
|||
// Check attributes in the typemaps
|
||||
%typemap(cstype, inattributes="[CustomInt]") int val "int"
|
||||
%typemap(csin, pre=" int tmp_$csinput = $csinput * 100;") int val "tmp_$csinput"
|
||||
%typemap(imtype, out="IntPtr/*overridden*/", outattributes="[CustomIntPtr]") CsinAttributes * "HandleRef/*overridden*/"
|
||||
%typemap(imtype, out="global::System.IntPtr/*overridden*/", outattributes="[CustomIntPtr]") CsinAttributes * "global::System.Runtime.InteropServices.HandleRef/*overridden*/"
|
||||
|
||||
%inline %{
|
||||
class CsinAttributes {
|
||||
|
@ -216,8 +216,8 @@ void subtractYears(CDate *pDate, int years) {
|
|||
%typemap(csvarout, excode=SWIGEXCODE2) CDate * %{
|
||||
/* csvarout typemap code */
|
||||
get {
|
||||
IntPtr cPtr = $imcall;
|
||||
CDate tempDate = (cPtr == IntPtr.Zero) ? null : new CDate(cPtr, $owner);$excode
|
||||
global::System.IntPtr cPtr = $imcall;
|
||||
CDate tempDate = (cPtr == global::System.IntPtr.Zero) ? null : new CDate(cPtr, $owner);$excode
|
||||
return new System.DateTime(tempDate.getYear(), tempDate.getMonth(), tempDate.getDay(),
|
||||
0, 0, 0);
|
||||
} %}
|
||||
|
|
|
@ -94,7 +94,7 @@ Number times12(const Number* num) {
|
|||
%typemap(csvarin, excode=SWIGEXCODE2) int %{
|
||||
set {
|
||||
if ($csinput < 0)
|
||||
throw new ApplicationException("number too small!");
|
||||
throw new global::System.ApplicationException("number too small!");
|
||||
$imcall;$excode
|
||||
} %}
|
||||
|
||||
|
|
|
@ -188,7 +188,7 @@ namespace Space {
|
|||
|
||||
#if defined(SWIGCSHARP)
|
||||
%typemap(cscode) Space::RenameMe %{
|
||||
public static NewName factory(String s) {
|
||||
public static NewName factory(System.String s) {
|
||||
//below should expand to:
|
||||
//return new NewName( new Name(s) );
|
||||
return new $typemap(cstype, Space::RenameMe)( new $typemap(cstype, Name)(s) );
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
|
||||
%typemap(ctype) CTYPE INPUT[] "CTYPE*"
|
||||
%typemap(cstype) CTYPE INPUT[] "CSTYPE[]"
|
||||
%typemap(imtype, inattributes="[In, MarshalAs(UnmanagedType.LPArray)]") CTYPE INPUT[] "CSTYPE[]"
|
||||
%typemap(imtype, inattributes="[global::System.Runtime.InteropServices.In, global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.LPArray)]") CTYPE INPUT[] "CSTYPE[]"
|
||||
%typemap(csin) CTYPE INPUT[] "$csinput"
|
||||
|
||||
%typemap(in) CTYPE INPUT[] "$1 = $input;"
|
||||
|
@ -68,7 +68,7 @@
|
|||
|
||||
%typemap(ctype) CTYPE OUTPUT[] "CTYPE*"
|
||||
%typemap(cstype) CTYPE OUTPUT[] "CSTYPE[]"
|
||||
%typemap(imtype, inattributes="[Out, MarshalAs(UnmanagedType.LPArray)]") CTYPE OUTPUT[] "CSTYPE[]"
|
||||
%typemap(imtype, inattributes="[global::System.Runtime.InteropServices.Out, global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.LPArray)]") CTYPE OUTPUT[] "CSTYPE[]"
|
||||
%typemap(csin) CTYPE OUTPUT[] "$csinput"
|
||||
|
||||
%typemap(in) CTYPE OUTPUT[] "$1 = $input;"
|
||||
|
@ -79,7 +79,7 @@
|
|||
|
||||
%typemap(ctype) CTYPE INOUT[] "CTYPE*"
|
||||
%typemap(cstype) CTYPE INOUT[] "CSTYPE[]"
|
||||
%typemap(imtype, inattributes="[In, Out, MarshalAs(UnmanagedType.LPArray)]") CTYPE INOUT[] "CSTYPE[]"
|
||||
%typemap(imtype, inattributes="[global::System.Runtime.InteropServices.In, global::System.Runtime.InteropServices.Out, global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.LPArray)]") CTYPE INOUT[] "CSTYPE[]"
|
||||
%typemap(csin) CTYPE INOUT[] "$csinput"
|
||||
|
||||
%typemap(in) CTYPE INOUT[] "$1 = $input;"
|
||||
|
@ -108,12 +108,12 @@ CSHARP_ARRAYS(double, double)
|
|||
%define CSHARP_ARRAYS_FIXED( CTYPE, CSTYPE )
|
||||
|
||||
%typemap(ctype) CTYPE FIXED[] "CTYPE*"
|
||||
%typemap(imtype) CTYPE FIXED[] "IntPtr"
|
||||
%typemap(imtype) CTYPE FIXED[] "global::System.IntPtr"
|
||||
%typemap(cstype) CTYPE FIXED[] "CSTYPE[]"
|
||||
%typemap(csin,
|
||||
pre= " fixed ( CSTYPE* swig_ptrTo_$csinput = $csinput ) {",
|
||||
terminator=" }")
|
||||
CTYPE FIXED[] "(IntPtr)swig_ptrTo_$csinput"
|
||||
CTYPE FIXED[] "(global::System.IntPtr)swig_ptrTo_$csinput"
|
||||
|
||||
%typemap(in) CTYPE FIXED[] "$1 = $input;"
|
||||
%typemap(freearg) CTYPE FIXED[] ""
|
||||
|
|
|
@ -207,11 +207,11 @@
|
|||
SWIG_INTRUSIVE_PTR_QNAMESPACE::intrusive_ptr< CONST TYPE > &,
|
||||
SWIG_INTRUSIVE_PTR_QNAMESPACE::intrusive_ptr< CONST TYPE > *,
|
||||
SWIG_INTRUSIVE_PTR_QNAMESPACE::intrusive_ptr< CONST TYPE > *& "void *"
|
||||
%typemap (imtype, out="IntPtr") SWIG_INTRUSIVE_PTR_QNAMESPACE::intrusive_ptr< CONST TYPE >,
|
||||
%typemap (imtype, out="global::System.IntPtr") SWIG_INTRUSIVE_PTR_QNAMESPACE::intrusive_ptr< CONST TYPE >,
|
||||
SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< CONST TYPE >,
|
||||
SWIG_INTRUSIVE_PTR_QNAMESPACE::intrusive_ptr< CONST TYPE > &,
|
||||
SWIG_INTRUSIVE_PTR_QNAMESPACE::intrusive_ptr< CONST TYPE > *,
|
||||
SWIG_INTRUSIVE_PTR_QNAMESPACE::intrusive_ptr< CONST TYPE > *& "HandleRef"
|
||||
SWIG_INTRUSIVE_PTR_QNAMESPACE::intrusive_ptr< CONST TYPE > *& "global::System.Runtime.InteropServices.HandleRef"
|
||||
%typemap (cstype) SWIG_INTRUSIVE_PTR_QNAMESPACE::intrusive_ptr< CONST TYPE >,
|
||||
SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< CONST TYPE >,
|
||||
SWIG_INTRUSIVE_PTR_QNAMESPACE::intrusive_ptr< CONST TYPE > &,
|
||||
|
@ -224,28 +224,28 @@
|
|||
SWIG_INTRUSIVE_PTR_QNAMESPACE::intrusive_ptr< CONST TYPE > *& "$typemap(cstype, TYPE).getCPtr($csinput)"
|
||||
|
||||
%typemap(csout, excode=SWIGEXCODE) SWIG_INTRUSIVE_PTR_QNAMESPACE::intrusive_ptr< CONST TYPE > {
|
||||
IntPtr cPtr = $imcall;
|
||||
$typemap(cstype, TYPE) ret = (cPtr == IntPtr.Zero) ? null : new $typemap(cstype, TYPE)(cPtr, true);$excode
|
||||
global::System.IntPtr cPtr = $imcall;
|
||||
$typemap(cstype, TYPE) ret = (cPtr == global::System.IntPtr.Zero) ? null : new $typemap(cstype, TYPE)(cPtr, true);$excode
|
||||
return ret;
|
||||
}
|
||||
%typemap(csout, excode=SWIGEXCODE) SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< CONST TYPE > {
|
||||
IntPtr cPtr = $imcall;
|
||||
$typemap(cstype, TYPE) ret = (cPtr == IntPtr.Zero) ? null : new $typemap(cstype, TYPE)(cPtr, true);$excode
|
||||
global::System.IntPtr cPtr = $imcall;
|
||||
$typemap(cstype, TYPE) ret = (cPtr == global::System.IntPtr.Zero) ? null : new $typemap(cstype, TYPE)(cPtr, true);$excode
|
||||
return ret;
|
||||
}
|
||||
%typemap(csout, excode=SWIGEXCODE) SWIG_INTRUSIVE_PTR_QNAMESPACE::intrusive_ptr< CONST TYPE > & {
|
||||
IntPtr cPtr = $imcall;
|
||||
$typemap(cstype, TYPE) ret = (cPtr == IntPtr.Zero) ? null : new $typemap(cstype, TYPE)(cPtr, true);$excode
|
||||
global::System.IntPtr cPtr = $imcall;
|
||||
$typemap(cstype, TYPE) ret = (cPtr == global::System.IntPtr.Zero) ? null : new $typemap(cstype, TYPE)(cPtr, true);$excode
|
||||
return ret;
|
||||
}
|
||||
%typemap(csout, excode=SWIGEXCODE) SWIG_INTRUSIVE_PTR_QNAMESPACE::intrusive_ptr< CONST TYPE > * {
|
||||
IntPtr cPtr = $imcall;
|
||||
$typemap(cstype, TYPE) ret = (cPtr == IntPtr.Zero) ? null : new $typemap(cstype, TYPE)(cPtr, true);$excode
|
||||
global::System.IntPtr cPtr = $imcall;
|
||||
$typemap(cstype, TYPE) ret = (cPtr == global::System.IntPtr.Zero) ? null : new $typemap(cstype, TYPE)(cPtr, true);$excode
|
||||
return ret;
|
||||
}
|
||||
%typemap(csout, excode=SWIGEXCODE) SWIG_INTRUSIVE_PTR_QNAMESPACE::intrusive_ptr< CONST TYPE > *& {
|
||||
IntPtr cPtr = $imcall;
|
||||
$typemap(cstype, TYPE) ret = (cPtr == IntPtr.Zero) ? null : new $typemap(cstype, TYPE)(cPtr, true);$excode
|
||||
global::System.IntPtr cPtr = $imcall;
|
||||
$typemap(cstype, TYPE) ret = (cPtr == global::System.IntPtr.Zero) ? null : new $typemap(cstype, TYPE)(cPtr, true);$excode
|
||||
return ret;
|
||||
}
|
||||
%typemap(csvarout, excode=SWIGEXCODE2) SWIG_INTRUSIVE_PTR_QNAMESPACE::intrusive_ptr< CONST TYPE > %{
|
||||
|
@ -274,76 +274,76 @@
|
|||
return ret;
|
||||
}
|
||||
%typemap(csout, excode=SWIGEXCODE) CONST TYPE * {
|
||||
IntPtr cPtr = $imcall;
|
||||
$typemap(cstype, TYPE) ret = (cPtr == IntPtr.Zero) ? null : new $typemap(cstype, TYPE)(cPtr, true);$excode
|
||||
global::System.IntPtr cPtr = $imcall;
|
||||
$typemap(cstype, TYPE) ret = (cPtr == global::System.IntPtr.Zero) ? null : new $typemap(cstype, TYPE)(cPtr, true);$excode
|
||||
return ret;
|
||||
}
|
||||
%typemap(csout, excode=SWIGEXCODE) TYPE *CONST& {
|
||||
IntPtr cPtr = $imcall;
|
||||
$typemap(cstype, TYPE) ret = (cPtr == IntPtr.Zero) ? null : new $typemap(cstype, TYPE)(cPtr, true);$excode
|
||||
global::System.IntPtr cPtr = $imcall;
|
||||
$typemap(cstype, TYPE) ret = (cPtr == global::System.IntPtr.Zero) ? null : new $typemap(cstype, TYPE)(cPtr, true);$excode
|
||||
return ret;
|
||||
}
|
||||
|
||||
// Base proxy classes
|
||||
%typemap(csbody) TYPE %{
|
||||
private HandleRef swigCPtr;
|
||||
private global::System.Runtime.InteropServices.HandleRef swigCPtr;
|
||||
private bool swigCMemOwnBase;
|
||||
|
||||
PTRCTOR_VISIBILITY $csclassname(IntPtr cPtr, bool cMemoryOwn) {
|
||||
PTRCTOR_VISIBILITY $csclassname(global::System.IntPtr cPtr, bool cMemoryOwn) {
|
||||
swigCMemOwnBase = cMemoryOwn;
|
||||
swigCPtr = new HandleRef(this, cPtr);
|
||||
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
|
||||
}
|
||||
|
||||
CPTR_VISIBILITY static HandleRef getCPtr($csclassname obj) {
|
||||
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
|
||||
CPTR_VISIBILITY static global::System.Runtime.InteropServices.HandleRef getCPtr($csclassname obj) {
|
||||
return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
|
||||
}
|
||||
%}
|
||||
|
||||
// Derived proxy classes
|
||||
%typemap(csbody_derived) TYPE %{
|
||||
private HandleRef swigCPtr;
|
||||
private global::System.Runtime.InteropServices.HandleRef swigCPtr;
|
||||
private bool swigCMemOwnDerived;
|
||||
|
||||
PTRCTOR_VISIBILITY $csclassname(IntPtr cPtr, bool cMemoryOwn) : base($imclassname.$csclazznameSWIGSmartPtrUpcast(cPtr), true) {
|
||||
PTRCTOR_VISIBILITY $csclassname(global::System.IntPtr cPtr, bool cMemoryOwn) : base($imclassname.$csclazznameSWIGSmartPtrUpcast(cPtr), true) {
|
||||
swigCMemOwnDerived = cMemoryOwn;
|
||||
swigCPtr = new HandleRef(this, cPtr);
|
||||
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
|
||||
}
|
||||
|
||||
CPTR_VISIBILITY static HandleRef getCPtr($csclassname obj) {
|
||||
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
|
||||
CPTR_VISIBILITY static global::System.Runtime.InteropServices.HandleRef getCPtr($csclassname obj) {
|
||||
return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
|
||||
}
|
||||
%}
|
||||
|
||||
%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") TYPE {
|
||||
lock(this) {
|
||||
if (swigCPtr.Handle != IntPtr.Zero) {
|
||||
if (swigCPtr.Handle != global::System.IntPtr.Zero) {
|
||||
if (swigCMemOwnBase) {
|
||||
swigCMemOwnBase = false;
|
||||
$imcall;
|
||||
}
|
||||
swigCPtr = new HandleRef(null, IntPtr.Zero);
|
||||
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
|
||||
}
|
||||
GC.SuppressFinalize(this);
|
||||
global::System.GC.SuppressFinalize(this);
|
||||
}
|
||||
}
|
||||
|
||||
%typemap(csdestruct_derived, methodname="Dispose", methodmodifiers="public") TYPE {
|
||||
lock(this) {
|
||||
if (swigCPtr.Handle != IntPtr.Zero) {
|
||||
if (swigCPtr.Handle != global::System.IntPtr.Zero) {
|
||||
if (swigCMemOwnDerived) {
|
||||
swigCMemOwnDerived = false;
|
||||
$imcall;
|
||||
}
|
||||
swigCPtr = new HandleRef(null, IntPtr.Zero);
|
||||
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
|
||||
}
|
||||
GC.SuppressFinalize(this);
|
||||
global::System.GC.SuppressFinalize(this);
|
||||
base.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
// CONST version needed ???? also for C#
|
||||
%typemap(imtype, nopgcpp="1") SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< TYPE > swigSharedPtrUpcast "HandleRef"
|
||||
%typemap(imtype, nopgcpp="1") SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< CONST TYPE > swigSharedPtrUpcast "HandleRef"
|
||||
%typemap(imtype, nopgcpp="1") SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< TYPE > swigSharedPtrUpcast "global::System.Runtime.InteropServices.HandleRef"
|
||||
%typemap(imtype, nopgcpp="1") SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< CONST TYPE > swigSharedPtrUpcast "global::System.Runtime.InteropServices.HandleRef"
|
||||
|
||||
|
||||
%template() SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< CONST TYPE >;
|
||||
|
@ -424,8 +424,8 @@
|
|||
%typemap (cstype) SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< CONST TYPE > "$typemap(cstype, TYPE)"
|
||||
%typemap (csin) SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< CONST TYPE > "$typemap(cstype, TYPE).getCPtr($csinput)"
|
||||
%typemap(csout, excode=SWIGEXCODE) SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< CONST TYPE > {
|
||||
IntPtr cPtr = $imcall;
|
||||
return (cPtr == IntPtr.Zero) ? null : new $typemap(cstype, TYPE)(cPtr, true);
|
||||
global::System.IntPtr cPtr = $imcall;
|
||||
return (cPtr == global::System.IntPtr.Zero) ? null : new $typemap(cstype, TYPE)(cPtr, true);
|
||||
}
|
||||
|
||||
%typemap(csout, excode=SWIGEXCODE) CONST TYPE {
|
||||
|
@ -435,75 +435,75 @@
|
|||
return new $typemap(cstype, TYPE)($imcall, true);
|
||||
}
|
||||
%typemap(csout, excode=SWIGEXCODE) CONST TYPE * {
|
||||
IntPtr cPtr = $imcall;
|
||||
return (cPtr == IntPtr.Zero) ? null : new $typemap(cstype, TYPE)(cPtr, true);
|
||||
global::System.IntPtr cPtr = $imcall;
|
||||
return (cPtr == global::System.IntPtr.Zero) ? null : new $typemap(cstype, TYPE)(cPtr, true);
|
||||
}
|
||||
%typemap(csout, excode=SWIGEXCODE) TYPE *CONST& {
|
||||
IntPtr cPtr = $imcall;
|
||||
return (cPtr == IntPtr.Zero) ? null : new $typemap(cstype, TYPE)(cPtr, true);
|
||||
global::System.IntPtr cPtr = $imcall;
|
||||
return (cPtr == global::System.IntPtr.Zero) ? null : new $typemap(cstype, TYPE)(cPtr, true);
|
||||
}
|
||||
|
||||
// Base proxy classes
|
||||
%typemap(csbody) TYPE %{
|
||||
private HandleRef swigCPtr;
|
||||
private global::System.Runtime.InteropServices.HandleRef swigCPtr;
|
||||
private bool swigCMemOwnBase;
|
||||
|
||||
PTRCTOR_VISIBILITY $csclassname(IntPtr cPtr, bool cMemoryOwn) {
|
||||
PTRCTOR_VISIBILITY $csclassname(global::System.IntPtr cPtr, bool cMemoryOwn) {
|
||||
swigCMemOwnBase = cMemoryOwn;
|
||||
swigCPtr = new HandleRef(this, cPtr);
|
||||
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
|
||||
}
|
||||
|
||||
CPTR_VISIBILITY static HandleRef getCPtr($csclassname obj) {
|
||||
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
|
||||
CPTR_VISIBILITY static global::System.Runtime.InteropServices.HandleRef getCPtr($csclassname obj) {
|
||||
return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
|
||||
}
|
||||
%}
|
||||
|
||||
// Derived proxy classes
|
||||
%typemap(csbody_derived) TYPE %{
|
||||
private HandleRef swigCPtr;
|
||||
private global::System.Runtime.InteropServices.HandleRef swigCPtr;
|
||||
private bool swigCMemOwnDerived;
|
||||
|
||||
PTRCTOR_VISIBILITY $csclassname(IntPtr cPtr, bool cMemoryOwn) : base($imclassname.$csclazznameSWIGSmartPtrUpcast(cPtr), true) {
|
||||
PTRCTOR_VISIBILITY $csclassname(global::System.IntPtr cPtr, bool cMemoryOwn) : base($imclassname.$csclazznameSWIGSmartPtrUpcast(cPtr), true) {
|
||||
swigCMemOwnDerived = cMemoryOwn;
|
||||
swigCPtr = new HandleRef(this, cPtr);
|
||||
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
|
||||
}
|
||||
|
||||
CPTR_VISIBILITY static HandleRef getCPtr($csclassname obj) {
|
||||
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
|
||||
CPTR_VISIBILITY static global::System.Runtime.InteropServices.HandleRef getCPtr($csclassname obj) {
|
||||
return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
|
||||
}
|
||||
%}
|
||||
|
||||
%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") TYPE {
|
||||
lock(this) {
|
||||
if (swigCPtr.Handle != IntPtr.Zero) {
|
||||
if (swigCPtr.Handle != global::System.IntPtr.Zero) {
|
||||
if (swigCMemOwnBase) {
|
||||
swigCMemOwnBase = false;
|
||||
$imcall;
|
||||
}
|
||||
swigCPtr = new HandleRef(null, IntPtr.Zero);
|
||||
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
|
||||
}
|
||||
GC.SuppressFinalize(this);
|
||||
global::System.GC.SuppressFinalize(this);
|
||||
}
|
||||
}
|
||||
|
||||
%typemap(csdestruct_derived, methodname="Dispose", methodmodifiers="public") TYPE {
|
||||
lock(this) {
|
||||
if (swigCPtr.Handle != IntPtr.Zero) {
|
||||
if (swigCPtr.Handle != global::System.IntPtr.Zero) {
|
||||
if (swigCMemOwnDerived) {
|
||||
swigCMemOwnDerived = false;
|
||||
$imcall;
|
||||
}
|
||||
swigCPtr = new HandleRef(null, IntPtr.Zero);
|
||||
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
|
||||
}
|
||||
GC.SuppressFinalize(this);
|
||||
global::System.GC.SuppressFinalize(this);
|
||||
base.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// CONST version needed ???? also for C#
|
||||
%typemap(imtype, nopgcpp="1") SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< TYPE > swigSharedPtrUpcast "HandleRef"
|
||||
%typemap(imtype, nopgcpp="1") SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< CONST TYPE > swigSharedPtrUpcast "HandleRef"
|
||||
%typemap(imtype, nopgcpp="1") SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< TYPE > swigSharedPtrUpcast "global::System.Runtime.InteropServices.HandleRef"
|
||||
%typemap(imtype, nopgcpp="1") SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< CONST TYPE > swigSharedPtrUpcast "global::System.Runtime.InteropServices.HandleRef"
|
||||
|
||||
|
||||
%template() SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< CONST TYPE >;
|
||||
|
|
|
@ -95,10 +95,10 @@
|
|||
SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< CONST TYPE > &,
|
||||
SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< CONST TYPE > *,
|
||||
SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< CONST TYPE > *& "void *"
|
||||
%typemap (imtype, out="IntPtr") SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< CONST TYPE >,
|
||||
%typemap (imtype, out="global::System.IntPtr") SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< CONST TYPE >,
|
||||
SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< CONST TYPE > &,
|
||||
SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< CONST TYPE > *,
|
||||
SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< CONST TYPE > *& "HandleRef"
|
||||
SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< CONST TYPE > *& "global::System.Runtime.InteropServices.HandleRef"
|
||||
%typemap (cstype) SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< CONST TYPE >,
|
||||
SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< CONST TYPE > &,
|
||||
SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< CONST TYPE > *,
|
||||
|
@ -110,23 +110,23 @@
|
|||
SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< CONST TYPE > *& "$typemap(cstype, TYPE).getCPtr($csinput)"
|
||||
|
||||
%typemap(csout, excode=SWIGEXCODE) SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< CONST TYPE > {
|
||||
IntPtr cPtr = $imcall;
|
||||
$typemap(cstype, TYPE) ret = (cPtr == IntPtr.Zero) ? null : new $typemap(cstype, TYPE)(cPtr, true);$excode
|
||||
global::System.IntPtr cPtr = $imcall;
|
||||
$typemap(cstype, TYPE) ret = (cPtr == global::System.IntPtr.Zero) ? null : new $typemap(cstype, TYPE)(cPtr, true);$excode
|
||||
return ret;
|
||||
}
|
||||
%typemap(csout, excode=SWIGEXCODE) SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< CONST TYPE > & {
|
||||
IntPtr cPtr = $imcall;
|
||||
$typemap(cstype, TYPE) ret = (cPtr == IntPtr.Zero) ? null : new $typemap(cstype, TYPE)(cPtr, true);$excode
|
||||
global::System.IntPtr cPtr = $imcall;
|
||||
$typemap(cstype, TYPE) ret = (cPtr == global::System.IntPtr.Zero) ? null : new $typemap(cstype, TYPE)(cPtr, true);$excode
|
||||
return ret;
|
||||
}
|
||||
%typemap(csout, excode=SWIGEXCODE) SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< CONST TYPE > * {
|
||||
IntPtr cPtr = $imcall;
|
||||
$typemap(cstype, TYPE) ret = (cPtr == IntPtr.Zero) ? null : new $typemap(cstype, TYPE)(cPtr, true);$excode
|
||||
global::System.IntPtr cPtr = $imcall;
|
||||
$typemap(cstype, TYPE) ret = (cPtr == global::System.IntPtr.Zero) ? null : new $typemap(cstype, TYPE)(cPtr, true);$excode
|
||||
return ret;
|
||||
}
|
||||
%typemap(csout, excode=SWIGEXCODE) SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< CONST TYPE > *& {
|
||||
IntPtr cPtr = $imcall;
|
||||
$typemap(cstype, TYPE) ret = (cPtr == IntPtr.Zero) ? null : new $typemap(cstype, TYPE)(cPtr, true);$excode
|
||||
global::System.IntPtr cPtr = $imcall;
|
||||
$typemap(cstype, TYPE) ret = (cPtr == global::System.IntPtr.Zero) ? null : new $typemap(cstype, TYPE)(cPtr, true);$excode
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -140,13 +140,13 @@
|
|||
return ret;
|
||||
}
|
||||
%typemap(csout, excode=SWIGEXCODE) CONST TYPE * {
|
||||
IntPtr cPtr = $imcall;
|
||||
$typemap(cstype, TYPE) ret = (cPtr == IntPtr.Zero) ? null : new $typemap(cstype, TYPE)(cPtr, true);$excode
|
||||
global::System.IntPtr cPtr = $imcall;
|
||||
$typemap(cstype, TYPE) ret = (cPtr == global::System.IntPtr.Zero) ? null : new $typemap(cstype, TYPE)(cPtr, true);$excode
|
||||
return ret;
|
||||
}
|
||||
%typemap(csout, excode=SWIGEXCODE) TYPE *CONST& {
|
||||
IntPtr cPtr = $imcall;
|
||||
$typemap(cstype, TYPE) ret = (cPtr == IntPtr.Zero) ? null : new $typemap(cstype, TYPE)(cPtr, true);$excode
|
||||
global::System.IntPtr cPtr = $imcall;
|
||||
$typemap(cstype, TYPE) ret = (cPtr == global::System.IntPtr.Zero) ? null : new $typemap(cstype, TYPE)(cPtr, true);$excode
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -157,78 +157,78 @@
|
|||
} %}
|
||||
%typemap(csvarout, excode=SWIGEXCODE2) CONST TYPE * %{
|
||||
get {
|
||||
IntPtr cPtr = $imcall;
|
||||
$csclassname ret = (cPtr == IntPtr.Zero) ? null : new $csclassname(cPtr, true);$excode
|
||||
global::System.IntPtr cPtr = $imcall;
|
||||
$csclassname ret = (cPtr == global::System.IntPtr.Zero) ? null : new $csclassname(cPtr, true);$excode
|
||||
return ret;
|
||||
} %}
|
||||
|
||||
%typemap(csvarout, excode=SWIGEXCODE2) SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< CONST TYPE > & %{
|
||||
get {
|
||||
IntPtr cPtr = $imcall;
|
||||
$typemap(cstype, TYPE) ret = (cPtr == IntPtr.Zero) ? null : new $typemap(cstype, TYPE)(cPtr, true);$excode
|
||||
global::System.IntPtr cPtr = $imcall;
|
||||
$typemap(cstype, TYPE) ret = (cPtr == global::System.IntPtr.Zero) ? null : new $typemap(cstype, TYPE)(cPtr, true);$excode
|
||||
return ret;
|
||||
} %}
|
||||
%typemap(csvarout, excode=SWIGEXCODE2) SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< CONST TYPE > * %{
|
||||
get {
|
||||
IntPtr cPtr = $imcall;
|
||||
$typemap(cstype, TYPE) ret = (cPtr == IntPtr.Zero) ? null : new $typemap(cstype, TYPE)(cPtr, true);$excode
|
||||
global::System.IntPtr cPtr = $imcall;
|
||||
$typemap(cstype, TYPE) ret = (cPtr == global::System.IntPtr.Zero) ? null : new $typemap(cstype, TYPE)(cPtr, true);$excode
|
||||
return ret;
|
||||
} %}
|
||||
|
||||
|
||||
// Proxy classes (base classes, ie, not derived classes)
|
||||
%typemap(csbody) TYPE %{
|
||||
private HandleRef swigCPtr;
|
||||
private global::System.Runtime.InteropServices.HandleRef swigCPtr;
|
||||
private bool swigCMemOwnBase;
|
||||
|
||||
PTRCTOR_VISIBILITY $csclassname(IntPtr cPtr, bool cMemoryOwn) {
|
||||
PTRCTOR_VISIBILITY $csclassname(global::System.IntPtr cPtr, bool cMemoryOwn) {
|
||||
swigCMemOwnBase = cMemoryOwn;
|
||||
swigCPtr = new HandleRef(this, cPtr);
|
||||
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
|
||||
}
|
||||
|
||||
CPTR_VISIBILITY static HandleRef getCPtr($csclassname obj) {
|
||||
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
|
||||
CPTR_VISIBILITY static global::System.Runtime.InteropServices.HandleRef getCPtr($csclassname obj) {
|
||||
return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
|
||||
}
|
||||
%}
|
||||
|
||||
// Derived proxy classes
|
||||
%typemap(csbody_derived) TYPE %{
|
||||
private HandleRef swigCPtr;
|
||||
private global::System.Runtime.InteropServices.HandleRef swigCPtr;
|
||||
private bool swigCMemOwnDerived;
|
||||
|
||||
PTRCTOR_VISIBILITY $csclassname(IntPtr cPtr, bool cMemoryOwn) : base($imclassname.$csclazznameSWIGSmartPtrUpcast(cPtr), true) {
|
||||
PTRCTOR_VISIBILITY $csclassname(global::System.IntPtr cPtr, bool cMemoryOwn) : base($imclassname.$csclazznameSWIGSmartPtrUpcast(cPtr), true) {
|
||||
swigCMemOwnDerived = cMemoryOwn;
|
||||
swigCPtr = new HandleRef(this, cPtr);
|
||||
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
|
||||
}
|
||||
|
||||
CPTR_VISIBILITY static HandleRef getCPtr($csclassname obj) {
|
||||
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
|
||||
CPTR_VISIBILITY static global::System.Runtime.InteropServices.HandleRef getCPtr($csclassname obj) {
|
||||
return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
|
||||
}
|
||||
%}
|
||||
|
||||
%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") TYPE {
|
||||
lock(this) {
|
||||
if (swigCPtr.Handle != IntPtr.Zero) {
|
||||
if (swigCPtr.Handle != global::System.IntPtr.Zero) {
|
||||
if (swigCMemOwnBase) {
|
||||
swigCMemOwnBase = false;
|
||||
$imcall;
|
||||
}
|
||||
swigCPtr = new HandleRef(null, IntPtr.Zero);
|
||||
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
|
||||
}
|
||||
GC.SuppressFinalize(this);
|
||||
global::System.GC.SuppressFinalize(this);
|
||||
}
|
||||
}
|
||||
|
||||
%typemap(csdestruct_derived, methodname="Dispose", methodmodifiers="public") TYPE {
|
||||
lock(this) {
|
||||
if (swigCPtr.Handle != IntPtr.Zero) {
|
||||
if (swigCPtr.Handle != global::System.IntPtr.Zero) {
|
||||
if (swigCMemOwnDerived) {
|
||||
swigCMemOwnDerived = false;
|
||||
$imcall;
|
||||
}
|
||||
swigCPtr = new HandleRef(null, IntPtr.Zero);
|
||||
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
|
||||
}
|
||||
GC.SuppressFinalize(this);
|
||||
global::System.GC.SuppressFinalize(this);
|
||||
base.Dispose();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -110,23 +110,23 @@ SWIGINTERN const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
|
|||
|
||||
/* Non primitive types */
|
||||
%typemap(ctype) SWIGTYPE "void *"
|
||||
%typemap(imtype, out="IntPtr") SWIGTYPE "HandleRef"
|
||||
%typemap(imtype, out="global::System.IntPtr") SWIGTYPE "global::System.Runtime.InteropServices.HandleRef"
|
||||
%typemap(cstype) SWIGTYPE "$&csclassname"
|
||||
|
||||
%typemap(ctype) SWIGTYPE [] "void *"
|
||||
%typemap(imtype, out="IntPtr") SWIGTYPE [] "HandleRef"
|
||||
%typemap(imtype, out="global::System.IntPtr") SWIGTYPE [] "global::System.Runtime.InteropServices.HandleRef"
|
||||
%typemap(cstype) SWIGTYPE [] "$csclassname"
|
||||
|
||||
%typemap(ctype) SWIGTYPE * "void *"
|
||||
%typemap(imtype, out="IntPtr") SWIGTYPE * "HandleRef"
|
||||
%typemap(imtype, out="global::System.IntPtr") SWIGTYPE * "global::System.Runtime.InteropServices.HandleRef"
|
||||
%typemap(cstype) SWIGTYPE * "$csclassname"
|
||||
|
||||
%typemap(ctype) SWIGTYPE & "void *"
|
||||
%typemap(imtype, out="IntPtr") SWIGTYPE & "HandleRef"
|
||||
%typemap(imtype, out="global::System.IntPtr") SWIGTYPE & "global::System.Runtime.InteropServices.HandleRef"
|
||||
%typemap(cstype) SWIGTYPE & "$csclassname"
|
||||
|
||||
%typemap(ctype) SWIGTYPE && "void *"
|
||||
%typemap(imtype, out="IntPtr") SWIGTYPE && "HandleRef"
|
||||
%typemap(imtype, out="global::System.IntPtr") SWIGTYPE && "global::System.Runtime.InteropServices.HandleRef"
|
||||
%typemap(cstype) SWIGTYPE && "$csclassname"
|
||||
|
||||
/* pointer to a class member */
|
||||
|
@ -447,7 +447,7 @@ SWIGINTERN const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
|
|||
%typemap(directorin) SWIGTYPE &&
|
||||
%{ $input = ($1_ltype) &$1; %}
|
||||
|
||||
%typemap(csdirectorin) SWIGTYPE *, SWIGTYPE (CLASS::*) "($iminput == IntPtr.Zero) ? null : new $csclassname($iminput, false)"
|
||||
%typemap(csdirectorin) SWIGTYPE *, SWIGTYPE (CLASS::*) "($iminput == global::System.IntPtr.Zero) ? null : new $csclassname($iminput, false)"
|
||||
%typemap(csdirectorin) SWIGTYPE & "new $csclassname($iminput, false)"
|
||||
%typemap(csdirectorin) SWIGTYPE && "new $csclassname($iminput, false)"
|
||||
%typemap(csdirectorout) SWIGTYPE *, SWIGTYPE (CLASS::*), SWIGTYPE &, SWIGTYPE && "$csclassname.getCPtr($cscall).Handle"
|
||||
|
@ -683,8 +683,8 @@ SWIGINTERN const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
|
|||
return ret;
|
||||
}
|
||||
%typemap(csout, excode=SWIGEXCODE) SWIGTYPE *, SWIGTYPE [] {
|
||||
IntPtr cPtr = $imcall;
|
||||
$csclassname ret = (cPtr == IntPtr.Zero) ? null : new $csclassname(cPtr, $owner);$excode
|
||||
global::System.IntPtr cPtr = $imcall;
|
||||
$csclassname ret = (cPtr == global::System.IntPtr.Zero) ? null : new $csclassname(cPtr, $owner);$excode
|
||||
return ret;
|
||||
}
|
||||
%typemap(csout, excode=SWIGEXCODE) SWIGTYPE (CLASS::*) {
|
||||
|
@ -803,8 +803,8 @@ SWIGINTERN const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
|
|||
} %}
|
||||
%typemap(csvarout, excode=SWIGEXCODE2) SWIGTYPE *, SWIGTYPE [] %{
|
||||
get {
|
||||
IntPtr cPtr = $imcall;
|
||||
$csclassname ret = (cPtr == IntPtr.Zero) ? null : new $csclassname(cPtr, $owner);$excode
|
||||
global::System.IntPtr cPtr = $imcall;
|
||||
$csclassname ret = (cPtr == global::System.IntPtr.Zero) ? null : new $csclassname(cPtr, $owner);$excode
|
||||
return ret;
|
||||
} %}
|
||||
|
||||
|
@ -817,12 +817,12 @@ SWIGINTERN const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
|
|||
|
||||
/* Pointer reference typemaps */
|
||||
%typemap(ctype) SWIGTYPE *const& "void *"
|
||||
%typemap(imtype, out="IntPtr") SWIGTYPE *const& "HandleRef"
|
||||
%typemap(imtype, out="global::System.IntPtr") SWIGTYPE *const& "global::System.Runtime.InteropServices.HandleRef"
|
||||
%typemap(cstype) SWIGTYPE *const& "$*csclassname"
|
||||
%typemap(csin) SWIGTYPE *const& "$*csclassname.getCPtr($csinput)"
|
||||
%typemap(csout, excode=SWIGEXCODE) SWIGTYPE *const& {
|
||||
IntPtr cPtr = $imcall;
|
||||
$*csclassname ret = (cPtr == IntPtr.Zero) ? null : new $*csclassname(cPtr, $owner);$excode
|
||||
global::System.IntPtr cPtr = $imcall;
|
||||
$*csclassname ret = (cPtr == global::System.IntPtr.Zero) ? null : new $*csclassname(cPtr, $owner);$excode
|
||||
return ret;
|
||||
}
|
||||
%typemap(in) SWIGTYPE *const& ($*1_ltype temp = 0)
|
||||
|
@ -831,15 +831,15 @@ SWIGINTERN const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
|
|||
%typemap(out) SWIGTYPE *const&
|
||||
%{ $result = (void *)*$1; %}
|
||||
|
||||
/* Marshal C/C++ pointer to IntPtr */
|
||||
/* Marshal C/C++ pointer to global::System.IntPtr */
|
||||
%typemap(ctype) void *VOID_INT_PTR "void *"
|
||||
%typemap(imtype) void *VOID_INT_PTR "IntPtr"
|
||||
%typemap(cstype) void *VOID_INT_PTR "IntPtr"
|
||||
%typemap(imtype) void *VOID_INT_PTR "global::System.IntPtr"
|
||||
%typemap(cstype) void *VOID_INT_PTR "global::System.IntPtr"
|
||||
%typemap(in) void *VOID_INT_PTR %{ $1 = ($1_ltype)$input; %}
|
||||
%typemap(out) void *VOID_INT_PTR %{ $result = (void *)$1; %}
|
||||
%typemap(csin) void *VOID_INT_PTR "$csinput"
|
||||
%typemap(csout, excode=SWIGEXCODE) void *VOID_INT_PTR {
|
||||
IntPtr ret = $imcall;$excode
|
||||
global::System.IntPtr ret = $imcall;$excode
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -848,8 +848,7 @@ SWIGINTERN const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
|
|||
%typemap(csbase) SWIGTYPE, SWIGTYPE *, SWIGTYPE &, SWIGTYPE &&, SWIGTYPE [], SWIGTYPE (CLASS::*) ""
|
||||
%typemap(csclassmodifiers) SWIGTYPE, SWIGTYPE *, SWIGTYPE &, SWIGTYPE &&, SWIGTYPE [], SWIGTYPE (CLASS::*) "public class"
|
||||
%typemap(cscode) SWIGTYPE, SWIGTYPE *, SWIGTYPE &, SWIGTYPE &&, SWIGTYPE [], SWIGTYPE (CLASS::*) ""
|
||||
%typemap(csimports) SWIGTYPE, SWIGTYPE *, SWIGTYPE &, SWIGTYPE &&, SWIGTYPE [], SWIGTYPE (CLASS::*) "\nusing global::System;\nusing global::System.Runtime.InteropServices;\n"
|
||||
%typemap(csinterfaces) SWIGTYPE "IDisposable"
|
||||
%typemap(csinterfaces) SWIGTYPE "global::System.IDisposable"
|
||||
%typemap(csinterfaces) SWIGTYPE *, SWIGTYPE &, SWIGTYPE &&, SWIGTYPE [], SWIGTYPE (CLASS::*) ""
|
||||
%typemap(csinterfaces_derived) SWIGTYPE, SWIGTYPE *, SWIGTYPE &, SWIGTYPE &&, SWIGTYPE [], SWIGTYPE (CLASS::*) ""
|
||||
|
||||
|
@ -859,29 +858,29 @@ SWIGINTERN const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
|
|||
%define SWIG_CSBODY_PROXY(PTRCTOR_VISIBILITY, CPTR_VISIBILITY, TYPE...)
|
||||
// Proxy classes (base classes, ie, not derived classes)
|
||||
%typemap(csbody) TYPE %{
|
||||
private HandleRef swigCPtr;
|
||||
private global::System.Runtime.InteropServices.HandleRef swigCPtr;
|
||||
protected bool swigCMemOwn;
|
||||
|
||||
PTRCTOR_VISIBILITY $csclassname(IntPtr cPtr, bool cMemoryOwn) {
|
||||
PTRCTOR_VISIBILITY $csclassname(global::System.IntPtr cPtr, bool cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = new HandleRef(this, cPtr);
|
||||
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
|
||||
}
|
||||
|
||||
CPTR_VISIBILITY static HandleRef getCPtr($csclassname obj) {
|
||||
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
|
||||
CPTR_VISIBILITY static global::System.Runtime.InteropServices.HandleRef getCPtr($csclassname obj) {
|
||||
return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
|
||||
}
|
||||
%}
|
||||
|
||||
// Derived proxy classes
|
||||
%typemap(csbody_derived) TYPE %{
|
||||
private HandleRef swigCPtr;
|
||||
private global::System.Runtime.InteropServices.HandleRef swigCPtr;
|
||||
|
||||
PTRCTOR_VISIBILITY $csclassname(IntPtr cPtr, bool cMemoryOwn) : base($imclassname.$csclazznameSWIGUpcast(cPtr), cMemoryOwn) {
|
||||
swigCPtr = new HandleRef(this, cPtr);
|
||||
PTRCTOR_VISIBILITY $csclassname(global::System.IntPtr cPtr, bool cMemoryOwn) : base($imclassname.$csclazznameSWIGUpcast(cPtr), cMemoryOwn) {
|
||||
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
|
||||
}
|
||||
|
||||
CPTR_VISIBILITY static HandleRef getCPtr($csclassname obj) {
|
||||
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
|
||||
CPTR_VISIBILITY static global::System.Runtime.InteropServices.HandleRef getCPtr($csclassname obj) {
|
||||
return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
|
||||
}
|
||||
%}
|
||||
%enddef
|
||||
|
@ -889,18 +888,18 @@ SWIGINTERN const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
|
|||
%define SWIG_CSBODY_TYPEWRAPPER(PTRCTOR_VISIBILITY, DEFAULTCTOR_VISIBILITY, CPTR_VISIBILITY, TYPE...)
|
||||
// Typewrapper classes
|
||||
%typemap(csbody) TYPE *, TYPE &, TYPE &&, TYPE [] %{
|
||||
private HandleRef swigCPtr;
|
||||
private global::System.Runtime.InteropServices.HandleRef swigCPtr;
|
||||
|
||||
PTRCTOR_VISIBILITY $csclassname(IntPtr cPtr, bool futureUse) {
|
||||
swigCPtr = new HandleRef(this, cPtr);
|
||||
PTRCTOR_VISIBILITY $csclassname(global::System.IntPtr cPtr, bool futureUse) {
|
||||
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
|
||||
}
|
||||
|
||||
DEFAULTCTOR_VISIBILITY $csclassname() {
|
||||
swigCPtr = new HandleRef(null, IntPtr.Zero);
|
||||
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
|
||||
}
|
||||
|
||||
CPTR_VISIBILITY static HandleRef getCPtr($csclassname obj) {
|
||||
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
|
||||
CPTR_VISIBILITY static global::System.Runtime.InteropServices.HandleRef getCPtr($csclassname obj) {
|
||||
return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
|
||||
}
|
||||
%}
|
||||
|
||||
|
@ -938,27 +937,27 @@ SWIG_CSBODY_TYPEWRAPPER(internal, protected, internal, SWIGTYPE)
|
|||
|
||||
%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") SWIGTYPE {
|
||||
lock(this) {
|
||||
if (swigCPtr.Handle != IntPtr.Zero) {
|
||||
if (swigCPtr.Handle != global::System.IntPtr.Zero) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
$imcall;
|
||||
}
|
||||
swigCPtr = new HandleRef(null, IntPtr.Zero);
|
||||
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
|
||||
}
|
||||
GC.SuppressFinalize(this);
|
||||
global::System.GC.SuppressFinalize(this);
|
||||
}
|
||||
}
|
||||
|
||||
%typemap(csdestruct_derived, methodname="Dispose", methodmodifiers="public") SWIGTYPE {
|
||||
lock(this) {
|
||||
if (swigCPtr.Handle != IntPtr.Zero) {
|
||||
if (swigCPtr.Handle != global::System.IntPtr.Zero) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
$imcall;
|
||||
}
|
||||
swigCPtr = new HandleRef(null, IntPtr.Zero);
|
||||
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
|
||||
}
|
||||
GC.SuppressFinalize(this);
|
||||
global::System.GC.SuppressFinalize(this);
|
||||
base.Dispose();
|
||||
}
|
||||
}
|
||||
|
@ -981,16 +980,6 @@ SWIG_CSBODY_TYPEWRAPPER(internal, protected, internal, SWIGTYPE)
|
|||
%pragma(csharp) imclassclassmodifiers="class"
|
||||
%pragma(csharp) moduleclassmodifiers="public class"
|
||||
|
||||
%pragma(csharp) moduleimports=%{
|
||||
using global::System;
|
||||
using global::System.Runtime.InteropServices;
|
||||
%}
|
||||
|
||||
%pragma(csharp) imclassimports=%{
|
||||
using global::System;
|
||||
using global::System.Runtime.InteropServices;
|
||||
%}
|
||||
|
||||
/* Some ANSI C typemaps */
|
||||
|
||||
%apply unsigned long { size_t };
|
||||
|
@ -1015,19 +1004,19 @@ using global::System.Runtime.InteropServices;
|
|||
/*
|
||||
// Alternative char * typemaps.
|
||||
%pragma(csharp) imclasscode=%{
|
||||
public class SWIGStringMarshal : IDisposable {
|
||||
public readonly HandleRef swigCPtr;
|
||||
public class SWIGStringMarshal : global::System.IDisposable {
|
||||
public readonly global::System.Runtime.InteropServices.HandleRef swigCPtr;
|
||||
public SWIGStringMarshal(string str) {
|
||||
swigCPtr = new HandleRef(this, global::System.Runtime.InteropServices.Marshal.StringToHGlobalAnsi(str));
|
||||
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, global::System.Runtime.InteropServices.Marshal.StringToHGlobalAnsi(str));
|
||||
}
|
||||
public virtual void Dispose() {
|
||||
global::System.Runtime.InteropServices.Marshal.FreeHGlobal(swigCPtr.Handle);
|
||||
GC.SuppressFinalize(this);
|
||||
global::System.GC.SuppressFinalize(this);
|
||||
}
|
||||
}
|
||||
%}
|
||||
|
||||
%typemap(imtype, out="IntPtr") char *, char[ANY], char[] "HandleRef"
|
||||
%typemap(imtype, out="global::System.IntPtr") char *, char[ANY], char[] "global::System.Runtime.InteropServices.HandleRef"
|
||||
%typemap(out) char *, char[ANY], char[] %{ $result = $1; %}
|
||||
%typemap(csin) char *, char[ANY], char[] "new $imclassname.SWIGStringMarshal($csinput).swigCPtr"
|
||||
%typemap(csout, excode=SWIGEXCODE) char *, char[ANY], char[] {
|
||||
|
|
|
@ -149,7 +149,7 @@ SWIGEXPORT void SWIGSTDCALL SWIGRegisterExceptionArgumentCallbacks_$module(
|
|||
static ExceptionArgumentDelegate argumentNullDelegate = new ExceptionArgumentDelegate(SetPendingArgumentNullException);
|
||||
static ExceptionArgumentDelegate argumentOutOfRangeDelegate = new ExceptionArgumentDelegate(SetPendingArgumentOutOfRangeException);
|
||||
|
||||
[DllImport("$dllimport", EntryPoint="SWIGRegisterExceptionCallbacks_$module")]
|
||||
[global::System.Runtime.InteropServices.DllImport("$dllimport", EntryPoint="SWIGRegisterExceptionCallbacks_$module")]
|
||||
public static extern void SWIGRegisterExceptionCallbacks_$module(
|
||||
ExceptionDelegate applicationDelegate,
|
||||
ExceptionDelegate arithmeticDelegate,
|
||||
|
@ -163,7 +163,7 @@ SWIGEXPORT void SWIGSTDCALL SWIGRegisterExceptionArgumentCallbacks_$module(
|
|||
ExceptionDelegate overflowDelegate,
|
||||
ExceptionDelegate systemExceptionDelegate);
|
||||
|
||||
[DllImport("$dllimport", EntryPoint="SWIGRegisterExceptionArgumentCallbacks_$module")]
|
||||
[global::System.Runtime.InteropServices.DllImport("$dllimport", EntryPoint="SWIGRegisterExceptionArgumentCallbacks_$module")]
|
||||
public static extern void SWIGRegisterExceptionCallbacksArgument_$module(
|
||||
ExceptionArgumentDelegate argumentDelegate,
|
||||
ExceptionArgumentDelegate argumentNullDelegate,
|
||||
|
@ -207,12 +207,12 @@ SWIGEXPORT void SWIGSTDCALL SWIGRegisterExceptionArgumentCallbacks_$module(
|
|||
SWIGPendingException.Set(new global::System.ArgumentException(message, paramName, SWIGPendingException.Retrieve()));
|
||||
}
|
||||
static void SetPendingArgumentNullException(string message, string paramName) {
|
||||
Exception e = SWIGPendingException.Retrieve();
|
||||
global::System.Exception e = SWIGPendingException.Retrieve();
|
||||
if (e != null) message = message + " Inner Exception: " + e.Message;
|
||||
SWIGPendingException.Set(new global::System.ArgumentNullException(paramName, message));
|
||||
}
|
||||
static void SetPendingArgumentOutOfRangeException(string message, string paramName) {
|
||||
Exception e = SWIGPendingException.Retrieve();
|
||||
global::System.Exception e = SWIGPendingException.Retrieve();
|
||||
if (e != null) message = message + " Inner Exception: " + e.Message;
|
||||
SWIGPendingException.Set(new global::System.ArgumentOutOfRangeException(paramName, message));
|
||||
}
|
||||
|
@ -241,8 +241,8 @@ SWIGEXPORT void SWIGSTDCALL SWIGRegisterExceptionArgumentCallbacks_$module(
|
|||
protected static SWIGExceptionHelper swigExceptionHelper = new SWIGExceptionHelper();
|
||||
|
||||
public class SWIGPendingException {
|
||||
[ThreadStatic]
|
||||
private static Exception pendingException = null;
|
||||
[global::System.ThreadStatic]
|
||||
private static global::System.Exception pendingException = null;
|
||||
private static int numExceptionsPending = 0;
|
||||
|
||||
public static bool Pending {
|
||||
|
@ -255,17 +255,17 @@ SWIGEXPORT void SWIGSTDCALL SWIGRegisterExceptionArgumentCallbacks_$module(
|
|||
}
|
||||
}
|
||||
|
||||
public static void Set(Exception e) {
|
||||
public static void Set(global::System.Exception e) {
|
||||
if (pendingException != null)
|
||||
throw new ApplicationException("FATAL: An earlier pending exception from unmanaged code was missed and thus not thrown (" + pendingException.ToString() + ")", e);
|
||||
throw new global::System.ApplicationException("FATAL: An earlier pending exception from unmanaged code was missed and thus not thrown (" + pendingException.ToString() + ")", e);
|
||||
pendingException = e;
|
||||
lock(typeof($imclassname)) {
|
||||
numExceptionsPending++;
|
||||
}
|
||||
}
|
||||
|
||||
public static Exception Retrieve() {
|
||||
Exception e = null;
|
||||
public static global::System.Exception Retrieve() {
|
||||
global::System.Exception e = null;
|
||||
if (numExceptionsPending > 0) {
|
||||
if (pendingException != null) {
|
||||
e = pendingException;
|
||||
|
@ -294,7 +294,7 @@ static SWIG_CSharpStringHelperCallback SWIG_csharp_string_callback = NULL;
|
|||
public delegate string SWIGStringDelegate(string message);
|
||||
static SWIGStringDelegate stringDelegate = new SWIGStringDelegate(CreateString);
|
||||
|
||||
[DllImport("$dllimport", EntryPoint="SWIGRegisterStringCallback_$module")]
|
||||
[global::System.Runtime.InteropServices.DllImport("$dllimport", EntryPoint="SWIGRegisterStringCallback_$module")]
|
||||
public static extern void SWIGRegisterStringCallback_$module(SWIGStringDelegate stringDelegate);
|
||||
|
||||
static string CreateString(string cString) {
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
/* K is the C++ key type, T is the C++ value type */
|
||||
%define SWIG_STD_MAP_INTERNAL(K, T, C)
|
||||
|
||||
%typemap(csinterfaces) std::map< K, T, C > "IDisposable \n , global::System.Collections.Generic.IDictionary<$typemap(cstype, K), $typemap(cstype, T)>\n";
|
||||
%typemap(csinterfaces) std::map< K, T, C > "global::System.IDisposable \n , global::System.Collections.Generic.IDictionary<$typemap(cstype, K), $typemap(cstype, T)>\n";
|
||||
%typemap(cscode) std::map<K, T, C > %{
|
||||
|
||||
public $typemap(cstype, T) this[$typemap(cstype, K) key] {
|
||||
|
@ -65,7 +65,7 @@
|
|||
global::System.Collections.Generic.ICollection<$typemap(cstype, K)> keys = new global::System.Collections.Generic.List<$typemap(cstype, K)>();
|
||||
int size = this.Count;
|
||||
if (size > 0) {
|
||||
IntPtr iter = create_iterator_begin();
|
||||
global::System.IntPtr iter = create_iterator_begin();
|
||||
for (int i = 0; i < size; i++) {
|
||||
keys.Add(get_next_key(iter));
|
||||
}
|
||||
|
@ -111,13 +111,13 @@
|
|||
|
||||
public void CopyTo(global::System.Collections.Generic.KeyValuePair<$typemap(cstype, K), $typemap(cstype, T)>[] array, int arrayIndex) {
|
||||
if (array == null)
|
||||
throw new ArgumentNullException("array");
|
||||
throw new global::System.ArgumentNullException("array");
|
||||
if (arrayIndex < 0)
|
||||
throw new ArgumentOutOfRangeException("arrayIndex", "Value is less than zero");
|
||||
throw new global::System.ArgumentOutOfRangeException("arrayIndex", "Value is less than zero");
|
||||
if (array.Rank > 1)
|
||||
throw new ArgumentException("Multi dimensional array.", "array");
|
||||
throw new global::System.ArgumentException("Multi dimensional array.", "array");
|
||||
if (arrayIndex+this.Count > array.Length)
|
||||
throw new ArgumentException("Number of elements to copy is too large.");
|
||||
throw new global::System.ArgumentException("Number of elements to copy is too large.");
|
||||
|
||||
global::System.Collections.Generic.IList<$typemap(cstype, K)> keyList = new global::System.Collections.Generic.List<$typemap(cstype, K)>(this.Keys);
|
||||
for (int i = 0; i < keyList.Count; i++) {
|
||||
|
@ -164,11 +164,11 @@
|
|||
public global::System.Collections.Generic.KeyValuePair<$typemap(cstype, K), $typemap(cstype, T)> Current {
|
||||
get {
|
||||
if (currentIndex == -1)
|
||||
throw new InvalidOperationException("Enumeration not started.");
|
||||
throw new global::System.InvalidOperationException("Enumeration not started.");
|
||||
if (currentIndex > currentSize - 1)
|
||||
throw new InvalidOperationException("Enumeration finished.");
|
||||
throw new global::System.InvalidOperationException("Enumeration finished.");
|
||||
if (currentObject == null)
|
||||
throw new InvalidOperationException("Collection modified.");
|
||||
throw new global::System.InvalidOperationException("Collection modified.");
|
||||
return (global::System.Collections.Generic.KeyValuePair<$typemap(cstype, K), $typemap(cstype, T)>)currentObject;
|
||||
}
|
||||
}
|
||||
|
@ -197,7 +197,7 @@
|
|||
currentIndex = -1;
|
||||
currentObject = null;
|
||||
if (collectionRef.Count != currentSize) {
|
||||
throw new InvalidOperationException("Collection modified.");
|
||||
throw new global::System.InvalidOperationException("Collection modified.");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -24,11 +24,11 @@
|
|||
|
||||
// MACRO for use within the std::vector class body
|
||||
%define SWIG_STD_VECTOR_MINIMUM_INTERNAL(CSINTERFACE, CONST_REFERENCE, CTYPE...)
|
||||
%typemap(csinterfaces) std::vector< CTYPE > "IDisposable, global::System.Collections.IEnumerable\n , global::System.Collections.Generic.CSINTERFACE<$typemap(cstype, CTYPE)>\n";
|
||||
%typemap(csinterfaces) std::vector< CTYPE > "global::System.IDisposable, global::System.Collections.IEnumerable\n , global::System.Collections.Generic.CSINTERFACE<$typemap(cstype, CTYPE)>\n";
|
||||
%typemap(cscode) std::vector< CTYPE > %{
|
||||
public $csclassname(global::System.Collections.ICollection c) : this() {
|
||||
if (c == null)
|
||||
throw new ArgumentNullException("c");
|
||||
throw new global::System.ArgumentNullException("c");
|
||||
foreach ($typemap(cstype, CTYPE) element in c) {
|
||||
this.Add(element);
|
||||
}
|
||||
|
@ -61,7 +61,7 @@
|
|||
}
|
||||
set {
|
||||
if (value < size())
|
||||
throw new ArgumentOutOfRangeException("Capacity");
|
||||
throw new global::System.ArgumentOutOfRangeException("Capacity");
|
||||
reserve((uint)value);
|
||||
}
|
||||
}
|
||||
|
@ -91,17 +91,17 @@
|
|||
public void CopyTo(int index, $typemap(cstype, CTYPE)[] array, int arrayIndex, int count)
|
||||
{
|
||||
if (array == null)
|
||||
throw new ArgumentNullException("array");
|
||||
throw new global::System.ArgumentNullException("array");
|
||||
if (index < 0)
|
||||
throw new ArgumentOutOfRangeException("index", "Value is less than zero");
|
||||
throw new global::System.ArgumentOutOfRangeException("index", "Value is less than zero");
|
||||
if (arrayIndex < 0)
|
||||
throw new ArgumentOutOfRangeException("arrayIndex", "Value is less than zero");
|
||||
throw new global::System.ArgumentOutOfRangeException("arrayIndex", "Value is less than zero");
|
||||
if (count < 0)
|
||||
throw new ArgumentOutOfRangeException("count", "Value is less than zero");
|
||||
throw new global::System.ArgumentOutOfRangeException("count", "Value is less than zero");
|
||||
if (array.Rank > 1)
|
||||
throw new ArgumentException("Multi dimensional array.", "array");
|
||||
throw new global::System.ArgumentException("Multi dimensional array.", "array");
|
||||
if (index+count > this.Count || arrayIndex+count > array.Length)
|
||||
throw new ArgumentException("Number of elements to copy is too large.");
|
||||
throw new global::System.ArgumentException("Number of elements to copy is too large.");
|
||||
for (int i=0; i<count; i++)
|
||||
array.SetValue(getitemcopy(index+i), arrayIndex+i);
|
||||
}
|
||||
|
@ -142,11 +142,11 @@
|
|||
public $typemap(cstype, CTYPE) Current {
|
||||
get {
|
||||
if (currentIndex == -1)
|
||||
throw new InvalidOperationException("Enumeration not started.");
|
||||
throw new global::System.InvalidOperationException("Enumeration not started.");
|
||||
if (currentIndex > currentSize - 1)
|
||||
throw new InvalidOperationException("Enumeration finished.");
|
||||
throw new global::System.InvalidOperationException("Enumeration finished.");
|
||||
if (currentObject == null)
|
||||
throw new InvalidOperationException("Collection modified.");
|
||||
throw new global::System.InvalidOperationException("Collection modified.");
|
||||
return ($typemap(cstype, CTYPE))currentObject;
|
||||
}
|
||||
}
|
||||
|
@ -174,7 +174,7 @@
|
|||
currentIndex = -1;
|
||||
currentObject = null;
|
||||
if (collectionRef.Count != currentSize) {
|
||||
throw new InvalidOperationException("Collection modified.");
|
||||
throw new global::System.InvalidOperationException("Collection modified.");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ class wstring;
|
|||
|
||||
// wstring
|
||||
%typemap(ctype, out="void *") wstring "wchar_t *"
|
||||
%typemap(imtype, inattributes="[MarshalAs(UnmanagedType.LPWStr)]") wstring "string"
|
||||
%typemap(imtype, inattributes="[global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.LPWStr)]") wstring "string"
|
||||
%typemap(cstype) wstring "string"
|
||||
%typemap(csdirectorin) wstring "$iminput"
|
||||
%typemap(csdirectorout) wstring "$cscall"
|
||||
|
@ -60,7 +60,7 @@ class wstring;
|
|||
|
||||
// const wstring &
|
||||
%typemap(ctype, out="void *") const wstring & "wchar_t *"
|
||||
%typemap(imtype, inattributes="[MarshalAs(UnmanagedType.LPWStr)]") const wstring & "string"
|
||||
%typemap(imtype, inattributes="[global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.LPWStr)]") const wstring & "string"
|
||||
%typemap(cstype) const wstring & "string"
|
||||
|
||||
%typemap(csdirectorin) const wstring & "$iminput"
|
||||
|
|
|
@ -55,7 +55,7 @@ In C# you could then use it like this:
|
|||
|
||||
%define INPUT_TYPEMAP(TYPE, CTYPE, CSTYPE)
|
||||
%typemap(ctype, out="void *") TYPE *INPUT, TYPE &INPUT "CTYPE"
|
||||
%typemap(imtype, out="IntPtr") TYPE *INPUT, TYPE &INPUT "CSTYPE"
|
||||
%typemap(imtype, out="global::System.IntPtr") TYPE *INPUT, TYPE &INPUT "CSTYPE"
|
||||
%typemap(cstype, out="$csclassname") TYPE *INPUT, TYPE &INPUT "CSTYPE"
|
||||
%typemap(csin) TYPE *INPUT, TYPE &INPUT "$csinput"
|
||||
|
||||
|
@ -135,7 +135,7 @@ value returned in the second output parameter. In C# you would use it like this:
|
|||
|
||||
%define OUTPUT_TYPEMAP(TYPE, CTYPE, CSTYPE, TYPECHECKPRECEDENCE)
|
||||
%typemap(ctype, out="void *") TYPE *OUTPUT, TYPE &OUTPUT "CTYPE *"
|
||||
%typemap(imtype, out="IntPtr") TYPE *OUTPUT, TYPE &OUTPUT "out CSTYPE"
|
||||
%typemap(imtype, out="global::System.IntPtr") TYPE *OUTPUT, TYPE &OUTPUT "out CSTYPE"
|
||||
%typemap(cstype, out="$csclassname") TYPE *OUTPUT, TYPE &OUTPUT "out CSTYPE"
|
||||
%typemap(csin) TYPE *OUTPUT, TYPE &OUTPUT "out $csinput"
|
||||
|
||||
|
@ -224,7 +224,7 @@ of the function return value.
|
|||
|
||||
%define INOUT_TYPEMAP(TYPE, CTYPE, CSTYPE, TYPECHECKPRECEDENCE)
|
||||
%typemap(ctype, out="void *") TYPE *INOUT, TYPE &INOUT "CTYPE *"
|
||||
%typemap(imtype, out="IntPtr") TYPE *INOUT, TYPE &INOUT "ref CSTYPE"
|
||||
%typemap(imtype, out="global::System.IntPtr") TYPE *INOUT, TYPE &INOUT "ref CSTYPE"
|
||||
%typemap(cstype, out="$csclassname") TYPE *INOUT, TYPE &INOUT "ref CSTYPE"
|
||||
%typemap(csin) TYPE *INOUT, TYPE &INOUT "ref $csinput"
|
||||
|
||||
|
|
|
@ -20,13 +20,13 @@ static SWIG_CSharpWStringHelperCallback SWIG_csharp_wstring_callback = NULL;
|
|||
%pragma(csharp) imclasscode=%{
|
||||
protected class SWIGWStringHelper {
|
||||
|
||||
public delegate string SWIGWStringDelegate(IntPtr message);
|
||||
public delegate string SWIGWStringDelegate(global::System.IntPtr message);
|
||||
static SWIGWStringDelegate wstringDelegate = new SWIGWStringDelegate(CreateWString);
|
||||
|
||||
[DllImport("$dllimport", EntryPoint="SWIGRegisterWStringCallback_$module")]
|
||||
[global::System.Runtime.InteropServices.DllImport("$dllimport", EntryPoint="SWIGRegisterWStringCallback_$module")]
|
||||
public static extern void SWIGRegisterWStringCallback_$module(SWIGWStringDelegate wstringDelegate);
|
||||
|
||||
static string CreateWString([MarshalAs(UnmanagedType.LPWStr)]IntPtr cString) {
|
||||
static string CreateWString([global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.LPWStr)]global::System.IntPtr cString) {
|
||||
return global::System.Runtime.InteropServices.Marshal.PtrToStringUni(cString);
|
||||
}
|
||||
|
||||
|
@ -77,7 +77,7 @@ SWIGEXPORT void SWIGSTDCALL SWIGRegisterWStringCallback_$module(SWIG_CSharpWStri
|
|||
|
||||
// wchar_t *
|
||||
%typemap(ctype) wchar_t * "wchar_t *"
|
||||
%typemap(imtype, inattributes="[MarshalAs(UnmanagedType.LPWStr)]", out="IntPtr" ) wchar_t * "string"
|
||||
%typemap(imtype, inattributes="[global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.LPWStr)]", out="global::System.IntPtr" ) wchar_t * "string"
|
||||
%typemap(cstype) wchar_t * "string"
|
||||
|
||||
%typemap(csin) wchar_t * "$csinput"
|
||||
|
|
|
@ -776,7 +776,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
Printv(imclass_class_code, "\n [DllImport(\"", dllimport, "\", EntryPoint=\"", wname, "\")]\n", NIL);
|
||||
Printv(imclass_class_code, "\n [global::System.Runtime.InteropServices.DllImport(\"", dllimport, "\", EntryPoint=\"", wname, "\")]\n", NIL);
|
||||
|
||||
if (im_outattributes)
|
||||
Printf(imclass_class_code, " %s\n", im_outattributes);
|
||||
|
@ -1699,7 +1699,7 @@ public:
|
|||
if (*Char(destructor_call))
|
||||
Replaceall(destruct, "$imcall", destructor_call);
|
||||
else
|
||||
Replaceall(destruct, "$imcall", "throw new MethodAccessException(\"C++ destructor does not have public access\")");
|
||||
Replaceall(destruct, "$imcall", "throw new global::System.MethodAccessException(\"C++ destructor does not have public access\")");
|
||||
if (*Char(destruct))
|
||||
Printv(proxy_class_def, "\n ", destruct_methodmodifiers, " ", derived ? "override" : "virtual", " void ", destruct_methodname, "() ", destruct, "\n",
|
||||
NIL);
|
||||
|
@ -1732,7 +1732,7 @@ public:
|
|||
if (first_class_dmethod < curr_class_dmethod) {
|
||||
// Only emit if there is at least one director method
|
||||
Printf(proxy_class_code, "\n");
|
||||
Printf(proxy_class_code, " private bool SwigDerivedClassHasMethod(string methodName, Type[] methodTypes) {\n");
|
||||
Printf(proxy_class_code, " private bool SwigDerivedClassHasMethod(string methodName, global::System.Type[] methodTypes) {\n");
|
||||
Printf(proxy_class_code,
|
||||
" global::System.Reflection.MethodInfo methodInfo = this.GetType().GetMethod(methodName, global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, methodTypes, null);\n");
|
||||
Printf(proxy_class_code, " bool hasDerivedMethod = methodInfo.DeclaringType.IsSubclassOf(typeof(%s));\n", proxy_class_name);
|
||||
|
@ -1798,8 +1798,8 @@ public:
|
|||
String *upcast_method = Swig_name_member(getNSpace(), proxy_class_name, smartptr != 0 ? "SWIGSmartPtrUpcast" : "SWIGUpcast");
|
||||
String *wname = Swig_name_wrapper(upcast_method);
|
||||
|
||||
Printv(imclass_cppcasts_code, "\n [DllImport(\"", dllimport, "\", EntryPoint=\"", wname, "\")]\n", NIL);
|
||||
Printf(imclass_cppcasts_code, " public static extern IntPtr %s(IntPtr jarg1);\n", upcast_method);
|
||||
Printv(imclass_cppcasts_code, "\n [global::System.Runtime.InteropServices.DllImport(\"", dllimport, "\", EntryPoint=\"", wname, "\")]\n", NIL);
|
||||
Printf(imclass_cppcasts_code, " public static extern global::System.IntPtr %s(global::System.IntPtr jarg1);\n", upcast_method);
|
||||
|
||||
Replaceall(imclass_cppcasts_code, "$csclassname", proxy_class_name);
|
||||
|
||||
|
@ -3387,8 +3387,8 @@ public:
|
|||
if (nspace)
|
||||
Insert(qualified_classname, 0, NewStringf("%s.", nspace));
|
||||
|
||||
Printv(imclass_class_code, "\n [DllImport(\"", dllimport, "\", EntryPoint=\"", wname, "\")]\n", NIL);
|
||||
Printf(imclass_class_code, " public static extern void %s(HandleRef jarg1", swig_director_connect);
|
||||
Printv(imclass_class_code, "\n [global::System.Runtime.InteropServices.DllImport(\"", dllimport, "\", EntryPoint=\"", wname, "\")]\n", NIL);
|
||||
Printf(imclass_class_code, " public static extern void %s(global::System.Runtime.InteropServices.HandleRef jarg1", swig_director_connect);
|
||||
|
||||
Wrapper *code_wrap = NewWrapper();
|
||||
Printf(code_wrap->def, "SWIGEXPORT void SWIGSTDCALL %s(void *objarg", wname);
|
||||
|
@ -3917,7 +3917,7 @@ public:
|
|||
|
||||
Printf(director_delegate_definitions, " SwigDelegate%s_%s(%s);\n", classname, methid, delegate_parms);
|
||||
Printf(director_delegate_instances, " private SwigDelegate%s_%s swigDelegate%s;\n", classname, methid, methid);
|
||||
Printf(director_method_types, " private static Type[] swigMethodTypes%s = new Type[] { %s };\n", methid, proxy_method_types);
|
||||
Printf(director_method_types, " private static global::System.Type[] swigMethodTypes%s = new global::System.Type[] { %s };\n", methid, proxy_method_types);
|
||||
Printf(director_connect_parms, "SwigDirector%s%s delegate%s", classname, methid, methid);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue