Merge branch 'master' into doxygen
Merge with ~3.0.1 sources from master.
This commit is contained in:
commit
1ebd2334b8
1593 changed files with 51732 additions and 28076 deletions
|
|
@ -60,7 +60,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;"
|
||||
|
|
@ -71,7 +71,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;"
|
||||
|
|
@ -82,7 +82,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;"
|
||||
|
|
@ -111,12 +111,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[] ""
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@
|
|||
#endif
|
||||
%}
|
||||
|
||||
%typemap(in) SWIG_INTRUSIVE_PTR_QNAMESPACE::intrusive_ptr< CONST TYPE > ($&1_type argp, SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< CONST TYPE > * smartarg) %{
|
||||
%typemap(in) SWIG_INTRUSIVE_PTR_QNAMESPACE::intrusive_ptr< CONST TYPE > (SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< CONST TYPE > * smartarg) %{
|
||||
// intrusive_ptr by value
|
||||
smartarg = *(SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< CONST TYPE >**)&$input;
|
||||
if (smartarg) {
|
||||
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,16 +11,34 @@
|
|||
* The imtype typemap contains the C# type used in the intermediary class.
|
||||
* The cstype typemap contains the C# type used in the C# proxy classes, type wrapper classes and module class. */
|
||||
|
||||
/* SWIG 3 no longer inserts using directives into generated C# code. For backwards compatibility, the SWIG2_CSHARP
|
||||
macro can be defined to have SWIG 3 generate using directives similar to those generated by SWIG 2. */
|
||||
#ifdef SWIG2_CSHARP
|
||||
|
||||
%typemap(csimports) SWIGTYPE, SWIGTYPE *, SWIGTYPE &, SWIGTYPE &&, SWIGTYPE [], SWIGTYPE (CLASS::*) "\nusing global::System;\nusing global::System.Runtime.InteropServices;\n"
|
||||
|
||||
%pragma(csharp) moduleimports=%{
|
||||
using global::System;
|
||||
using global::System.Runtime.InteropServices;
|
||||
%}
|
||||
|
||||
%pragma(csharp) imclassimports=%{
|
||||
using global::System;
|
||||
using global::System.Runtime.InteropServices;
|
||||
%}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* Fragments */
|
||||
%fragment("SWIG_PackData", "header") {
|
||||
/* Pack binary data into a string */
|
||||
SWIGINTERN char * SWIG_PackData(char *c, void *ptr, size_t sz) {
|
||||
static const char hex[17] = "0123456789abcdef";
|
||||
register const unsigned char *u = (unsigned char *) ptr;
|
||||
register const unsigned char *eu = u + sz;
|
||||
const unsigned char *u = (unsigned char *) ptr;
|
||||
const unsigned char *eu = u + sz;
|
||||
for (; u != eu; ++u) {
|
||||
register unsigned char uu = *u;
|
||||
unsigned char uu = *u;
|
||||
*(c++) = hex[(uu & 0xf0) >> 4];
|
||||
*(c++) = hex[uu & 0xf];
|
||||
}
|
||||
|
|
@ -31,11 +49,11 @@ SWIGINTERN char * SWIG_PackData(char *c, void *ptr, size_t sz) {
|
|||
%fragment("SWIG_UnPackData", "header") {
|
||||
/* Unpack binary data from a string */
|
||||
SWIGINTERN const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
|
||||
register unsigned char *u = (unsigned char *) ptr;
|
||||
register const unsigned char *eu = u + sz;
|
||||
unsigned char *u = (unsigned char *) ptr;
|
||||
const unsigned char *eu = u + sz;
|
||||
for (; u != eu; ++u) {
|
||||
register char d = *(c++);
|
||||
register unsigned char uu;
|
||||
char d = *(c++);
|
||||
unsigned char uu;
|
||||
if ((d >= '0') && (d <= '9'))
|
||||
uu = ((d - '0') << 4);
|
||||
else if ((d >= 'a') && (d <= 'f'))
|
||||
|
|
@ -110,21 +128,25 @@ 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="global::System.IntPtr") SWIGTYPE && "global::System.Runtime.InteropServices.HandleRef"
|
||||
%typemap(cstype) SWIGTYPE && "$csclassname"
|
||||
|
||||
/* pointer to a class member */
|
||||
%typemap(ctype) SWIGTYPE (CLASS::*) "char *"
|
||||
%typemap(imtype) SWIGTYPE (CLASS::*) "string"
|
||||
|
|
@ -291,6 +313,7 @@ SWIGINTERN const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
|
|||
const long &,
|
||||
const unsigned long &,
|
||||
const long long &,
|
||||
const unsigned long long &,
|
||||
const float &,
|
||||
const double &
|
||||
%{ static $*1_ltype temp;
|
||||
|
|
@ -308,6 +331,7 @@ SWIGINTERN const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
|
|||
%typemap(directorin) const long & "$input = $1;"
|
||||
%typemap(directorin) const unsigned long & "$input = $1;"
|
||||
%typemap(directorin) const long long & "$input = $1;"
|
||||
%typemap(directorin) const unsigned long long & "$input = $1;"
|
||||
%typemap(directorin) const float & "$input = $1;"
|
||||
%typemap(directorin) const double & "$input = $1;"
|
||||
|
||||
|
|
@ -321,6 +345,7 @@ SWIGINTERN const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
|
|||
const long & ($*1_ltype temp),
|
||||
const unsigned long & ($*1_ltype temp),
|
||||
const long long & ($*1_ltype temp),
|
||||
const unsigned long long & ($*1_ltype temp),
|
||||
const float & ($*1_ltype temp),
|
||||
const double & ($*1_ltype temp)
|
||||
"$iminput"
|
||||
|
|
@ -335,6 +360,7 @@ SWIGINTERN const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
|
|||
const long & ($*1_ltype temp),
|
||||
const unsigned long & ($*1_ltype temp),
|
||||
const long long & ($*1_ltype temp),
|
||||
const unsigned long long & ($*1_ltype temp),
|
||||
const float & ($*1_ltype temp),
|
||||
const double & ($*1_ltype temp)
|
||||
"$cscall"
|
||||
|
|
@ -397,6 +423,11 @@ SWIGINTERN const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
|
|||
SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "$1_type type is null", 0);
|
||||
return $null;
|
||||
} %}
|
||||
%typemap(in, canthrow=1) SWIGTYPE && %{ $1 = ($1_ltype)$input;
|
||||
if (!$1) {
|
||||
SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "$1_type type is null", 0);
|
||||
return $null;
|
||||
} %}
|
||||
%typemap(out) SWIGTYPE * %{ $result = (void *)$1; %}
|
||||
%typemap(out, fragment="SWIG_PackData") SWIGTYPE (CLASS::*) %{
|
||||
char buf[128];
|
||||
|
|
@ -405,6 +436,7 @@ SWIGINTERN const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
|
|||
$result = SWIG_csharp_string_callback(buf);
|
||||
%}
|
||||
%typemap(out) SWIGTYPE & %{ $result = (void *)$1; %}
|
||||
%typemap(out) SWIGTYPE && %{ $result = (void *)$1; %}
|
||||
|
||||
%typemap(directorout, warning=SWIGWARN_TYPEMAP_DIRECTOROUT_PTR_MSG) SWIGTYPE *
|
||||
%{ $result = ($1_ltype)$input; %}
|
||||
|
|
@ -417,6 +449,12 @@ SWIGINTERN const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
|
|||
%{ $input = (void *) $1; %}
|
||||
|
||||
%typemap(directorout, warning=SWIGWARN_TYPEMAP_DIRECTOROUT_PTR_MSG) SWIGTYPE &
|
||||
%{ if (!$input) {
|
||||
SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Unexpected null return for type $1_type", 0);
|
||||
return $null;
|
||||
}
|
||||
$result = ($1_ltype)$input; %}
|
||||
%typemap(directorout, warning=SWIGWARN_TYPEMAP_DIRECTOROUT_PTR_MSG) SWIGTYPE &&
|
||||
%{ if (!$input) {
|
||||
SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Unexpected null return for type $1_type", 0);
|
||||
return $null;
|
||||
|
|
@ -424,10 +462,13 @@ SWIGINTERN const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
|
|||
$result = ($1_ltype)$input; %}
|
||||
%typemap(directorin) SWIGTYPE &
|
||||
%{ $input = ($1_ltype) &$1; %}
|
||||
%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(csdirectorout) SWIGTYPE *, SWIGTYPE (CLASS::*), SWIGTYPE & "$csclassname.getCPtr($cscall).Handle"
|
||||
%typemap(csdirectorin) SWIGTYPE && "new $csclassname($iminput, false)"
|
||||
%typemap(csdirectorout) SWIGTYPE *, SWIGTYPE (CLASS::*), SWIGTYPE &, SWIGTYPE && "$csclassname.getCPtr($cscall).Handle"
|
||||
|
||||
/* Default array handling */
|
||||
%typemap(in) SWIGTYPE [] %{ $1 = ($1_ltype)$input; %}
|
||||
|
|
@ -522,6 +563,7 @@ SWIGINTERN const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
|
|||
SWIGTYPE,
|
||||
SWIGTYPE *,
|
||||
SWIGTYPE &,
|
||||
SWIGTYPE &&,
|
||||
SWIGTYPE *const&,
|
||||
SWIGTYPE [],
|
||||
SWIGTYPE (CLASS::*)
|
||||
|
|
@ -540,7 +582,7 @@ SWIGINTERN const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
|
|||
SWIG_CSharpSetPendingException(SWIG_CSharpApplicationException, error_msg);
|
||||
return $null; %}
|
||||
|
||||
%typemap(throws, canthrow=1) SWIGTYPE, SWIGTYPE &, SWIGTYPE *, SWIGTYPE [ANY]
|
||||
%typemap(throws, canthrow=1) SWIGTYPE, SWIGTYPE &, SWIGTYPE &&, SWIGTYPE *, SWIGTYPE [ANY]
|
||||
%{ (void)$1;
|
||||
SWIG_CSharpSetPendingException(SWIG_CSharpApplicationException, "C++ $1_type exception thrown");
|
||||
return $null; %}
|
||||
|
|
@ -571,7 +613,7 @@ SWIGINTERN const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
|
|||
"$csinput"
|
||||
%typemap(csin) char *, char *&, char[ANY], char[] "$csinput"
|
||||
%typemap(csin) SWIGTYPE "$&csclassname.getCPtr($csinput)"
|
||||
%typemap(csin) SWIGTYPE *, SWIGTYPE &, SWIGTYPE [] "$csclassname.getCPtr($csinput)"
|
||||
%typemap(csin) SWIGTYPE *, SWIGTYPE &, SWIGTYPE &&, SWIGTYPE [] "$csclassname.getCPtr($csinput)"
|
||||
%typemap(csin) SWIGTYPE (CLASS::*) "$csclassname.getCMemberPtr($csinput)"
|
||||
|
||||
/* The csout typemap is used for converting function return types from the return type
|
||||
|
|
@ -654,9 +696,13 @@ SWIGINTERN const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
|
|||
$csclassname ret = new $csclassname($imcall, $owner);$excode
|
||||
return ret;
|
||||
}
|
||||
%typemap(csout, excode=SWIGEXCODE) SWIGTYPE && {
|
||||
$csclassname ret = new $csclassname($imcall, $owner);$excode
|
||||
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::*) {
|
||||
|
|
@ -667,7 +713,7 @@ SWIGINTERN const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
|
|||
|
||||
|
||||
/* Properties */
|
||||
%typemap(csvarin, excode=SWIGEXCODE2) SWIGTYPE, SWIGTYPE *, SWIGTYPE &, SWIGTYPE [], SWIGTYPE (CLASS::*) %{
|
||||
%typemap(csvarin, excode=SWIGEXCODE2) SWIGTYPE, SWIGTYPE *, SWIGTYPE &, SWIGTYPE &&, SWIGTYPE [], SWIGTYPE (CLASS::*) %{
|
||||
set {
|
||||
$imcall;$excode
|
||||
} %}
|
||||
|
|
@ -768,10 +814,15 @@ SWIGINTERN const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
|
|||
$csclassname ret = new $csclassname($imcall, $owner);$excode
|
||||
return ret;
|
||||
} %}
|
||||
%typemap(csvarout, excode=SWIGEXCODE2) SWIGTYPE && %{
|
||||
get {
|
||||
$csclassname ret = new $csclassname($imcall, $owner);$excode
|
||||
return ret;
|
||||
} %}
|
||||
%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;
|
||||
} %}
|
||||
|
||||
|
|
@ -784,12 +835,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)
|
||||
|
|
@ -798,27 +849,26 @@ 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;
|
||||
}
|
||||
|
||||
|
||||
/* Typemaps used for the generation of proxy and type wrapper class code */
|
||||
%typemap(csbase) SWIGTYPE, SWIGTYPE *, SWIGTYPE &, SWIGTYPE [], SWIGTYPE (CLASS::*) ""
|
||||
%typemap(csclassmodifiers) SWIGTYPE, SWIGTYPE *, SWIGTYPE &, SWIGTYPE [], SWIGTYPE (CLASS::*) "public class"
|
||||
%typemap(cscode) SWIGTYPE, SWIGTYPE *, SWIGTYPE &, SWIGTYPE [], SWIGTYPE (CLASS::*) ""
|
||||
%typemap(csimports) SWIGTYPE, SWIGTYPE *, SWIGTYPE &, SWIGTYPE [], SWIGTYPE (CLASS::*) "\nusing System;\nusing System.Runtime.InteropServices;\n"
|
||||
%typemap(csinterfaces) SWIGTYPE "IDisposable"
|
||||
%typemap(csinterfaces) SWIGTYPE *, SWIGTYPE &, SWIGTYPE [], SWIGTYPE (CLASS::*) ""
|
||||
%typemap(csinterfaces_derived) SWIGTYPE, SWIGTYPE *, SWIGTYPE &, SWIGTYPE [], SWIGTYPE (CLASS::*) ""
|
||||
%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(csinterfaces) SWIGTYPE "global::System.IDisposable"
|
||||
%typemap(csinterfaces) SWIGTYPE *, SWIGTYPE &, SWIGTYPE &&, SWIGTYPE [], SWIGTYPE (CLASS::*) ""
|
||||
%typemap(csinterfaces_derived) SWIGTYPE, SWIGTYPE *, SWIGTYPE &, SWIGTYPE &&, SWIGTYPE [], SWIGTYPE (CLASS::*) ""
|
||||
|
||||
|
||||
// csbody typemaps... these are in macros so that the visibility of the methods can be easily changed by users.
|
||||
|
|
@ -826,48 +876,48 @@ 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
|
||||
|
||||
%define SWIG_CSBODY_TYPEWRAPPER(PTRCTOR_VISIBILITY, DEFAULTCTOR_VISIBILITY, CPTR_VISIBILITY, TYPE...)
|
||||
// Typewrapper classes
|
||||
%typemap(csbody) TYPE *, TYPE &, TYPE [] %{
|
||||
private HandleRef swigCPtr;
|
||||
%typemap(csbody) TYPE *, TYPE &, TYPE &&, TYPE [] %{
|
||||
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;
|
||||
}
|
||||
%}
|
||||
|
||||
|
|
@ -905,27 +955,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();
|
||||
}
|
||||
}
|
||||
|
|
@ -948,16 +998,6 @@ SWIG_CSBODY_TYPEWRAPPER(internal, protected, internal, SWIGTYPE)
|
|||
%pragma(csharp) imclassclassmodifiers="class"
|
||||
%pragma(csharp) moduleclassmodifiers="public class"
|
||||
|
||||
%pragma(csharp) moduleimports=%{
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
%}
|
||||
|
||||
%pragma(csharp) imclassimports=%{
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
%}
|
||||
|
||||
/* Some ANSI C typemaps */
|
||||
|
||||
%apply unsigned long { size_t };
|
||||
|
|
@ -965,6 +1005,7 @@ using System.Runtime.InteropServices;
|
|||
|
||||
/* Array reference typemaps */
|
||||
%apply SWIGTYPE & { SWIGTYPE ((&)[ANY]) }
|
||||
%apply SWIGTYPE && { SWIGTYPE ((&&)[ANY]) }
|
||||
|
||||
/* const pointers */
|
||||
%apply SWIGTYPE * { SWIGTYPE *const }
|
||||
|
|
@ -981,23 +1022,23 @@ using 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, 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() {
|
||||
System.Runtime.InteropServices.Marshal.FreeHGlobal(swigCPtr.Handle);
|
||||
GC.SuppressFinalize(this);
|
||||
global::System.Runtime.InteropServices.Marshal.FreeHGlobal(swigCPtr.Handle);
|
||||
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[] {
|
||||
string ret = System.Runtime.InteropServices.Marshal.PtrToStringAnsi($imcall);$excode
|
||||
string ret = global::System.Runtime.InteropServices.Marshal.PtrToStringAnsi($imcall);$excode
|
||||
return ret;
|
||||
}
|
||||
%typemap(csvarin, excode=SWIGEXCODE2) char *, char[ANY], char[] %{
|
||||
|
|
@ -1006,7 +1047,7 @@ using System.Runtime.InteropServices;
|
|||
} %}
|
||||
%typemap(csvarout, excode=SWIGEXCODE2) char *, char[ANY], char[] %{
|
||||
get {
|
||||
string ret = System.Runtime.InteropServices.Marshal.PtrToStringAnsi($imcall);$excode
|
||||
string ret = global::System.Runtime.InteropServices.Marshal.PtrToStringAnsi($imcall);$excode
|
||||
return ret;
|
||||
} %}
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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,58 +163,58 @@ 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,
|
||||
ExceptionArgumentDelegate argumentOutOfRangeDelegate);
|
||||
|
||||
static void SetPendingApplicationException(string message) {
|
||||
SWIGPendingException.Set(new System.ApplicationException(message, SWIGPendingException.Retrieve()));
|
||||
SWIGPendingException.Set(new global::System.ApplicationException(message, SWIGPendingException.Retrieve()));
|
||||
}
|
||||
static void SetPendingArithmeticException(string message) {
|
||||
SWIGPendingException.Set(new System.ArithmeticException(message, SWIGPendingException.Retrieve()));
|
||||
SWIGPendingException.Set(new global::System.ArithmeticException(message, SWIGPendingException.Retrieve()));
|
||||
}
|
||||
static void SetPendingDivideByZeroException(string message) {
|
||||
SWIGPendingException.Set(new System.DivideByZeroException(message, SWIGPendingException.Retrieve()));
|
||||
SWIGPendingException.Set(new global::System.DivideByZeroException(message, SWIGPendingException.Retrieve()));
|
||||
}
|
||||
static void SetPendingIndexOutOfRangeException(string message) {
|
||||
SWIGPendingException.Set(new System.IndexOutOfRangeException(message, SWIGPendingException.Retrieve()));
|
||||
SWIGPendingException.Set(new global::System.IndexOutOfRangeException(message, SWIGPendingException.Retrieve()));
|
||||
}
|
||||
static void SetPendingInvalidCastException(string message) {
|
||||
SWIGPendingException.Set(new System.InvalidCastException(message, SWIGPendingException.Retrieve()));
|
||||
SWIGPendingException.Set(new global::System.InvalidCastException(message, SWIGPendingException.Retrieve()));
|
||||
}
|
||||
static void SetPendingInvalidOperationException(string message) {
|
||||
SWIGPendingException.Set(new System.InvalidOperationException(message, SWIGPendingException.Retrieve()));
|
||||
SWIGPendingException.Set(new global::System.InvalidOperationException(message, SWIGPendingException.Retrieve()));
|
||||
}
|
||||
static void SetPendingIOException(string message) {
|
||||
SWIGPendingException.Set(new System.IO.IOException(message, SWIGPendingException.Retrieve()));
|
||||
SWIGPendingException.Set(new global::System.IO.IOException(message, SWIGPendingException.Retrieve()));
|
||||
}
|
||||
static void SetPendingNullReferenceException(string message) {
|
||||
SWIGPendingException.Set(new System.NullReferenceException(message, SWIGPendingException.Retrieve()));
|
||||
SWIGPendingException.Set(new global::System.NullReferenceException(message, SWIGPendingException.Retrieve()));
|
||||
}
|
||||
static void SetPendingOutOfMemoryException(string message) {
|
||||
SWIGPendingException.Set(new System.OutOfMemoryException(message, SWIGPendingException.Retrieve()));
|
||||
SWIGPendingException.Set(new global::System.OutOfMemoryException(message, SWIGPendingException.Retrieve()));
|
||||
}
|
||||
static void SetPendingOverflowException(string message) {
|
||||
SWIGPendingException.Set(new System.OverflowException(message, SWIGPendingException.Retrieve()));
|
||||
SWIGPendingException.Set(new global::System.OverflowException(message, SWIGPendingException.Retrieve()));
|
||||
}
|
||||
static void SetPendingSystemException(string message) {
|
||||
SWIGPendingException.Set(new System.SystemException(message, SWIGPendingException.Retrieve()));
|
||||
SWIGPendingException.Set(new global::System.SystemException(message, SWIGPendingException.Retrieve()));
|
||||
}
|
||||
|
||||
static void SetPendingArgumentException(string message, string paramName) {
|
||||
SWIGPendingException.Set(new System.ArgumentException(message, paramName, SWIGPendingException.Retrieve()));
|
||||
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 System.ArgumentNullException(paramName, 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 System.ArgumentOutOfRangeException(paramName, message));
|
||||
SWIGPendingException.Set(new global::System.ArgumentOutOfRangeException(paramName, message));
|
||||
}
|
||||
|
||||
static SWIGExceptionHelper() {
|
||||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@
|
|||
/* Warnings for C# keywords */
|
||||
#define CSHARPKW(x) %keywordwarn("'" `x` "' is a C# keyword, renaming to '_" `x` "'",rename="_%s") `x`
|
||||
|
||||
#define CSHARPCLASSKW(x) %keywordwarn("'" `x` "' is a special method name used in the C# wrapper classes, class renamed to '_" `x` "'",%$isclass,rename="_%s") `x`
|
||||
|
||||
/*
|
||||
from
|
||||
http://www.jaggersoft.com/csharp_grammar.html#1.7%20Keywords
|
||||
|
|
@ -88,6 +90,7 @@ CSHARPKW(void);
|
|||
CSHARPKW(volatile);
|
||||
CSHARPKW(while);
|
||||
|
||||
CSHARPCLASSKW(delete);
|
||||
|
||||
#undef CSHARPKW
|
||||
|
||||
|
|
|
|||
|
|
@ -1,16 +1,15 @@
|
|||
/* -----------------------------------------------------------------------------
|
||||
* director.swg
|
||||
*
|
||||
* This file contains support for director classes so that C# proxy
|
||||
* This file contains support for director classes so that C# proxy
|
||||
* methods can be called from C++.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
#if defined(DEBUG_DIRECTOR_OWNED)
|
||||
#include <iostream>
|
||||
#endif
|
||||
#include <string>
|
||||
#include <exception>
|
||||
|
||||
namespace Swig {
|
||||
/* Director base class - not currently used in C# directors */
|
||||
|
|
@ -18,30 +17,30 @@ namespace Swig {
|
|||
};
|
||||
|
||||
/* Base class for director exceptions */
|
||||
class DirectorException {
|
||||
class DirectorException : public std::exception {
|
||||
protected:
|
||||
std::string swig_msg;
|
||||
|
||||
public:
|
||||
DirectorException(const char* msg) : swig_msg(msg) {
|
||||
DirectorException(const char *msg) : swig_msg(msg) {
|
||||
}
|
||||
|
||||
DirectorException(const std::string &msg) : swig_msg(msg) {
|
||||
}
|
||||
const std::string& what() const {
|
||||
return swig_msg;
|
||||
|
||||
virtual ~DirectorException() throw() {
|
||||
}
|
||||
virtual ~DirectorException() {
|
||||
|
||||
const char *what() const throw() {
|
||||
return swig_msg.c_str();
|
||||
}
|
||||
};
|
||||
|
||||
/* Pure virtual method exception */
|
||||
class DirectorPureVirtualException : public Swig::DirectorException {
|
||||
class DirectorPureVirtualException : public DirectorException {
|
||||
public:
|
||||
DirectorPureVirtualException(const char* msg) : DirectorException(std::string("Attempt to invoke pure virtual method ") + msg) {
|
||||
DirectorPureVirtualException(const char *msg) : DirectorException(std::string("Attempt to invoke pure virtual method ") + msg) {
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
%typemap(in) const enum SWIGTYPE & ($*1_ltype temp)
|
||||
%{ temp = ($*1_ltype)$input;
|
||||
$1 = &temp; %}
|
||||
%typemap(out) const enum SWIGTYPE & %{ $result = *$1; %}
|
||||
%typemap(out) const enum SWIGTYPE & %{ $result = (int)*$1; %}
|
||||
|
||||
%typemap(directorout,warning=SWIGWARN_TYPEMAP_THREAD_UNSAFE_MSG) const enum SWIGTYPE &
|
||||
%{ static $*1_ltype temp = ($*1_ltype)$input;
|
||||
|
|
@ -48,7 +48,7 @@
|
|||
%typemap(cstype) enum SWIGTYPE "$csclassname"
|
||||
|
||||
%typemap(in) enum SWIGTYPE %{ $1 = ($1_ltype)$input; %}
|
||||
%typemap(out) enum SWIGTYPE %{ $result = $1; %}
|
||||
%typemap(out) enum SWIGTYPE %{ $result = (int)$1; %}
|
||||
|
||||
%typemap(directorout) enum SWIGTYPE %{ $result = ($1_ltype)$input; %}
|
||||
%typemap(directorin) enum SWIGTYPE "$input = $1;"
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
%typemap(in) const enum SWIGTYPE & ($*1_ltype temp)
|
||||
%{ temp = ($*1_ltype)$input;
|
||||
$1 = &temp; %}
|
||||
%typemap(out) const enum SWIGTYPE & %{ $result = *$1; %}
|
||||
%typemap(out) const enum SWIGTYPE & %{ $result = (int)*$1; %}
|
||||
|
||||
%typemap(directorout,warning=SWIGWARN_TYPEMAP_THREAD_UNSAFE_MSG) const enum SWIGTYPE &
|
||||
%{ static $*1_ltype temp = ($*1_ltype)$input;
|
||||
|
|
@ -50,7 +50,7 @@
|
|||
%typemap(cstype) enum SWIGTYPE "int"
|
||||
|
||||
%typemap(in) enum SWIGTYPE %{ $1 = ($1_ltype)$input; %}
|
||||
%typemap(out) enum SWIGTYPE %{ $result = $1; %}
|
||||
%typemap(out) enum SWIGTYPE %{ $result = (int)$1; %}
|
||||
|
||||
%typemap(directorout) enum SWIGTYPE %{ $result = ($1_ltype)$input; %}
|
||||
%typemap(directorin) enum SWIGTYPE "$input = $1;"
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
%typemap(in) const enum SWIGTYPE & ($*1_ltype temp)
|
||||
%{ temp = ($*1_ltype)$input;
|
||||
$1 = &temp; %}
|
||||
%typemap(out) const enum SWIGTYPE & %{ $result = *$1; %}
|
||||
%typemap(out) const enum SWIGTYPE & %{ $result = (int)*$1; %}
|
||||
|
||||
%typemap(directorout,warning=SWIGWARN_TYPEMAP_THREAD_UNSAFE_MSG) const enum SWIGTYPE &
|
||||
%{ static $*1_ltype temp = ($*1_ltype)$input;
|
||||
|
|
@ -49,7 +49,7 @@
|
|||
%typemap(cstype) enum SWIGTYPE "$csclassname"
|
||||
|
||||
%typemap(in) enum SWIGTYPE %{ $1 = ($1_ltype)$input; %}
|
||||
%typemap(out) enum SWIGTYPE %{ $result = $1; %}
|
||||
%typemap(out) enum SWIGTYPE %{ $result = (int)$1; %}
|
||||
|
||||
%typemap(directorout) enum SWIGTYPE %{ $result = ($1_ltype)$input; %}
|
||||
%typemap(directorin) enum SWIGTYPE "$input = $1;"
|
||||
|
|
@ -97,7 +97,7 @@
|
|||
for (int i = 0; i < swigValues.Length; i++)
|
||||
if (swigValues[i].swigValue == swigValue)
|
||||
return swigValues[i];
|
||||
throw new System.ArgumentOutOfRangeException("No enum $csclassname with value " + swigValue);
|
||||
throw new global::System.ArgumentOutOfRangeException("No enum $csclassname with value " + swigValue);
|
||||
}
|
||||
|
||||
public override string ToString() {
|
||||
|
|
|
|||
25
Lib/csharp/std_auto_ptr.i
Normal file
25
Lib/csharp/std_auto_ptr.i
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
The typemaps here allow to handle functions returning std::auto_ptr<>,
|
||||
which is the most common use of this type. If you have functions taking it
|
||||
as parameter, these typemaps can't be used for them and you need to do
|
||||
something else (e.g. use shared_ptr<> which SWIG supports fully).
|
||||
*/
|
||||
|
||||
%define %auto_ptr(TYPE)
|
||||
%typemap (ctype) std::auto_ptr<TYPE > "void *"
|
||||
%typemap (imtype, out="System.IntPtr") std::auto_ptr<TYPE > "HandleRef"
|
||||
%typemap (cstype) std::auto_ptr<TYPE > "$typemap(cstype, TYPE)"
|
||||
%typemap (out) std::auto_ptr<TYPE > %{
|
||||
$result = (void *)$1.release();
|
||||
%}
|
||||
%typemap(csout, excode=SWIGEXCODE) std::auto_ptr<TYPE > {
|
||||
System.IntPtr cPtr = $imcall;
|
||||
$typemap(cstype, TYPE) ret = (cPtr == System.IntPtr.Zero) ? null : new $typemap(cstype, TYPE)(cPtr, true);$excode
|
||||
return ret;
|
||||
}
|
||||
%template() std::auto_ptr<TYPE >;
|
||||
%enddef
|
||||
|
||||
namespace std {
|
||||
template <class T> class auto_ptr {};
|
||||
}
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
/* -----------------------------------------------------------------------------
|
||||
* std_map.i
|
||||
*
|
||||
* SWIG typemaps for std::map< K, T >
|
||||
* SWIG typemaps for std::map< K, T, C >
|
||||
*
|
||||
* The C# wrapper is made to look and feel like a C# System.Collections.Generic.IDictionary<>.
|
||||
*
|
||||
|
|
@ -11,9 +11,7 @@
|
|||
* %template(MapIntDouble) std::map<int, double>
|
||||
*
|
||||
* Notes:
|
||||
* 1) For .NET 1 compatibility, define SWIG_DOTNET_1 when compiling the C# code. In this case
|
||||
* the C# wrapper has only basic functionality.
|
||||
* 2) IEnumerable<> is implemented in the proxy class which is useful for using LINQ with
|
||||
* 1) IEnumerable<> is implemented in the proxy class which is useful for using LINQ with
|
||||
* C++ std::map wrappers.
|
||||
*
|
||||
* Warning: heavy macro usage in this file. Use swig -E to get a sane view on the real file contents!
|
||||
|
|
@ -26,10 +24,10 @@
|
|||
%}
|
||||
|
||||
/* K is the C++ key type, T is the C++ value type */
|
||||
%define SWIG_STD_MAP_INTERNAL(K, T)
|
||||
%define SWIG_STD_MAP_INTERNAL(K, T, C)
|
||||
|
||||
%typemap(csinterfaces) std::map< K, T > "IDisposable \n#if !SWIG_DOTNET_1\n , System.Collections.Generic.IDictionary<$typemap(cstype, K), $typemap(cstype, T)>\n#endif\n";
|
||||
%typemap(cscode) std::map<K, T > %{
|
||||
%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] {
|
||||
get {
|
||||
|
|
@ -62,14 +60,12 @@
|
|||
}
|
||||
}
|
||||
|
||||
#if !SWIG_DOTNET_1
|
||||
|
||||
public System.Collections.Generic.ICollection<$typemap(cstype, K)> Keys {
|
||||
public global::System.Collections.Generic.ICollection<$typemap(cstype, K)> Keys {
|
||||
get {
|
||||
System.Collections.Generic.ICollection<$typemap(cstype, K)> keys = new System.Collections.Generic.List<$typemap(cstype, K)>();
|
||||
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));
|
||||
}
|
||||
|
|
@ -79,21 +75,21 @@
|
|||
}
|
||||
}
|
||||
|
||||
public System.Collections.Generic.ICollection<$typemap(cstype, T)> Values {
|
||||
public global::System.Collections.Generic.ICollection<$typemap(cstype, T)> Values {
|
||||
get {
|
||||
System.Collections.Generic.ICollection<$typemap(cstype, T)> vals = new System.Collections.Generic.List<$typemap(cstype, T)>();
|
||||
foreach (System.Collections.Generic.KeyValuePair<$typemap(cstype, K), $typemap(cstype, T)> pair in this) {
|
||||
global::System.Collections.Generic.ICollection<$typemap(cstype, T)> vals = new global::System.Collections.Generic.List<$typemap(cstype, T)>();
|
||||
foreach (global::System.Collections.Generic.KeyValuePair<$typemap(cstype, K), $typemap(cstype, T)> pair in this) {
|
||||
vals.Add(pair.Value);
|
||||
}
|
||||
return vals;
|
||||
}
|
||||
}
|
||||
|
||||
public void Add(System.Collections.Generic.KeyValuePair<$typemap(cstype, K), $typemap(cstype, T)> item) {
|
||||
public void Add(global::System.Collections.Generic.KeyValuePair<$typemap(cstype, K), $typemap(cstype, T)> item) {
|
||||
Add(item.Key, item.Value);
|
||||
}
|
||||
|
||||
public bool Remove(System.Collections.Generic.KeyValuePair<$typemap(cstype, K), $typemap(cstype, T)> item) {
|
||||
public bool Remove(global::System.Collections.Generic.KeyValuePair<$typemap(cstype, K), $typemap(cstype, T)> item) {
|
||||
if (Contains(item)) {
|
||||
return Remove(item.Key);
|
||||
} else {
|
||||
|
|
@ -101,7 +97,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
public bool Contains(System.Collections.Generic.KeyValuePair<$typemap(cstype, K), $typemap(cstype, T)> item) {
|
||||
public bool Contains(global::System.Collections.Generic.KeyValuePair<$typemap(cstype, K), $typemap(cstype, T)> item) {
|
||||
if (this[item.Key] == item.Value) {
|
||||
return true;
|
||||
} else {
|
||||
|
|
@ -109,32 +105,32 @@
|
|||
}
|
||||
}
|
||||
|
||||
public void CopyTo(System.Collections.Generic.KeyValuePair<$typemap(cstype, K), $typemap(cstype, T)>[] array) {
|
||||
public void CopyTo(global::System.Collections.Generic.KeyValuePair<$typemap(cstype, K), $typemap(cstype, T)>[] array) {
|
||||
CopyTo(array, 0);
|
||||
}
|
||||
|
||||
public void CopyTo(System.Collections.Generic.KeyValuePair<$typemap(cstype, K), $typemap(cstype, T)>[] array, int arrayIndex) {
|
||||
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.");
|
||||
|
||||
System.Collections.Generic.IList<$typemap(cstype, K)> keyList = new System.Collections.Generic.List<$typemap(cstype, K)>(this.Keys);
|
||||
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++) {
|
||||
$typemap(cstype, K) currentKey = keyList[i];
|
||||
array.SetValue(new System.Collections.Generic.KeyValuePair<$typemap(cstype, K), $typemap(cstype, T)>(currentKey, this[currentKey]), arrayIndex+i);
|
||||
array.SetValue(new global::System.Collections.Generic.KeyValuePair<$typemap(cstype, K), $typemap(cstype, T)>(currentKey, this[currentKey]), arrayIndex+i);
|
||||
}
|
||||
}
|
||||
|
||||
System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<$typemap(cstype, K), $typemap(cstype, T)>> System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<$typemap(cstype, K), $typemap(cstype, T)>>.GetEnumerator() {
|
||||
global::System.Collections.Generic.IEnumerator<global::System.Collections.Generic.KeyValuePair<$typemap(cstype, K), $typemap(cstype, T)>> global::System.Collections.Generic.IEnumerable<global::System.Collections.Generic.KeyValuePair<$typemap(cstype, K), $typemap(cstype, T)>>.GetEnumerator() {
|
||||
return new $csclassnameEnumerator(this);
|
||||
}
|
||||
|
||||
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() {
|
||||
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() {
|
||||
return new $csclassnameEnumerator(this);
|
||||
}
|
||||
|
||||
|
|
@ -147,38 +143,38 @@
|
|||
/// whenever the collection is modified. This has been done for changes in the size of the
|
||||
/// collection but not when one of the elements of the collection is modified as it is a bit
|
||||
/// tricky to detect unmanaged code that modifies the collection under our feet.
|
||||
public sealed class $csclassnameEnumerator : System.Collections.IEnumerator,
|
||||
System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<$typemap(cstype, K), $typemap(cstype, T)>>
|
||||
public sealed class $csclassnameEnumerator : global::System.Collections.IEnumerator,
|
||||
global::System.Collections.Generic.IEnumerator<global::System.Collections.Generic.KeyValuePair<$typemap(cstype, K), $typemap(cstype, T)>>
|
||||
{
|
||||
private $csclassname collectionRef;
|
||||
private System.Collections.Generic.IList<$typemap(cstype, K)> keyCollection;
|
||||
private global::System.Collections.Generic.IList<$typemap(cstype, K)> keyCollection;
|
||||
private int currentIndex;
|
||||
private object currentObject;
|
||||
private int currentSize;
|
||||
|
||||
public $csclassnameEnumerator($csclassname collection) {
|
||||
collectionRef = collection;
|
||||
keyCollection = new System.Collections.Generic.List<$typemap(cstype, K)>(collection.Keys);
|
||||
keyCollection = new global::System.Collections.Generic.List<$typemap(cstype, K)>(collection.Keys);
|
||||
currentIndex = -1;
|
||||
currentObject = null;
|
||||
currentSize = collectionRef.Count;
|
||||
}
|
||||
|
||||
// Type-safe iterator Current
|
||||
public System.Collections.Generic.KeyValuePair<$typemap(cstype, K), $typemap(cstype, T)> Current {
|
||||
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.");
|
||||
return (System.Collections.Generic.KeyValuePair<$typemap(cstype, K), $typemap(cstype, T)>)currentObject;
|
||||
throw new global::System.InvalidOperationException("Collection modified.");
|
||||
return (global::System.Collections.Generic.KeyValuePair<$typemap(cstype, K), $typemap(cstype, T)>)currentObject;
|
||||
}
|
||||
}
|
||||
|
||||
// Type-unsafe IEnumerator.Current
|
||||
object System.Collections.IEnumerator.Current {
|
||||
object global::System.Collections.IEnumerator.Current {
|
||||
get {
|
||||
return Current;
|
||||
}
|
||||
|
|
@ -190,7 +186,7 @@
|
|||
if (moveOkay) {
|
||||
currentIndex++;
|
||||
$typemap(cstype, K) currentKey = keyCollection[currentIndex];
|
||||
currentObject = new System.Collections.Generic.KeyValuePair<$typemap(cstype, K), $typemap(cstype, T)>(currentKey, collectionRef[currentKey]);
|
||||
currentObject = new global::System.Collections.Generic.KeyValuePair<$typemap(cstype, K), $typemap(cstype, T)>(currentKey, collectionRef[currentKey]);
|
||||
} else {
|
||||
currentObject = null;
|
||||
}
|
||||
|
|
@ -201,7 +197,7 @@
|
|||
currentIndex = -1;
|
||||
currentObject = null;
|
||||
if (collectionRef.Count != currentSize) {
|
||||
throw new InvalidOperationException("Collection modified.");
|
||||
throw new global::System.InvalidOperationException("Collection modified.");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -210,24 +206,24 @@
|
|||
currentObject = null;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
%}
|
||||
|
||||
public:
|
||||
map();
|
||||
map(const map< K, T > &other);
|
||||
|
||||
typedef size_t size_type;
|
||||
typedef ptrdiff_t difference_type;
|
||||
typedef K key_type;
|
||||
typedef T mapped_type;
|
||||
typedef size_t size_type;
|
||||
|
||||
map();
|
||||
map(const map< K, T, C > &other);
|
||||
size_type size() const;
|
||||
bool empty() const;
|
||||
%rename(Clear) clear;
|
||||
void clear();
|
||||
%extend {
|
||||
const mapped_type& getitem(const key_type& key) throw (std::out_of_range) {
|
||||
std::map< K,T >::iterator iter = $self->find(key);
|
||||
std::map< K, T, C >::iterator iter = $self->find(key);
|
||||
if (iter != $self->end())
|
||||
return iter->second;
|
||||
else
|
||||
|
|
@ -239,19 +235,19 @@
|
|||
}
|
||||
|
||||
bool ContainsKey(const key_type& key) {
|
||||
std::map< K, T >::iterator iter = $self->find(key);
|
||||
std::map< K, T, C >::iterator iter = $self->find(key);
|
||||
return iter != $self->end();
|
||||
}
|
||||
|
||||
void Add(const key_type& key, const mapped_type& val) throw (std::out_of_range) {
|
||||
std::map< K, T >::iterator iter = $self->find(key);
|
||||
std::map< K, T, C >::iterator iter = $self->find(key);
|
||||
if (iter != $self->end())
|
||||
throw std::out_of_range("key already exists");
|
||||
$self->insert(std::pair< K, T >(key, val));
|
||||
}
|
||||
|
||||
bool Remove(const key_type& key) {
|
||||
std::map< K, T >::iterator iter = $self->find(key);
|
||||
std::map< K, T, C >::iterator iter = $self->find(key);
|
||||
if (iter != $self->end()) {
|
||||
$self->erase(iter);
|
||||
return true;
|
||||
|
|
@ -260,20 +256,20 @@
|
|||
}
|
||||
|
||||
// create_iterator_begin(), get_next_key() and destroy_iterator work together to provide a collection of keys to C#
|
||||
%apply void *VOID_INT_PTR { std::map< K, T >::iterator *create_iterator_begin }
|
||||
%apply void *VOID_INT_PTR { std::map< K, T >::iterator *swigiterator }
|
||||
%apply void *VOID_INT_PTR { std::map< K, T, C >::iterator *create_iterator_begin }
|
||||
%apply void *VOID_INT_PTR { std::map< K, T, C >::iterator *swigiterator }
|
||||
|
||||
std::map< K, T >::iterator *create_iterator_begin() {
|
||||
return new std::map< K, T >::iterator($self->begin());
|
||||
std::map< K, T, C >::iterator *create_iterator_begin() {
|
||||
return new std::map< K, T, C >::iterator($self->begin());
|
||||
}
|
||||
|
||||
const key_type& get_next_key(std::map< K, T >::iterator *swigiterator) {
|
||||
std::map< K, T >::iterator iter = *swigiterator;
|
||||
const key_type& get_next_key(std::map< K, T, C >::iterator *swigiterator) {
|
||||
std::map< K, T, C >::iterator iter = *swigiterator;
|
||||
(*swigiterator)++;
|
||||
return (*iter).first;
|
||||
}
|
||||
|
||||
void destroy_iterator(std::map< K, T >::iterator *swigiterator) {
|
||||
void destroy_iterator(std::map< K, T, C >::iterator *swigiterator) {
|
||||
delete swigiterator;
|
||||
}
|
||||
}
|
||||
|
|
@ -290,8 +286,8 @@
|
|||
|
||||
// Default implementation
|
||||
namespace std {
|
||||
template<class K, class T> class map {
|
||||
SWIG_STD_MAP_INTERNAL(K, T)
|
||||
template<class K, class T, class C = std::less<K> > class map {
|
||||
SWIG_STD_MAP_INTERNAL(K, T, C)
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ class string;
|
|||
SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
|
||||
return $null;
|
||||
}
|
||||
std::string $1_str($input);
|
||||
$*1_ltype $1_str($input);
|
||||
$1 = &$1_str; %}
|
||||
%typemap(out) const string & %{ $result = SWIG_csharp_string_callback($1->c_str()); %}
|
||||
|
||||
|
|
@ -85,7 +85,7 @@ class string;
|
|||
return $null;
|
||||
}
|
||||
/* possible thread/reentrant code problem */
|
||||
static std::string $1_str;
|
||||
static $*1_ltype $1_str;
|
||||
$1_str = $input;
|
||||
$result = &$1_str; %}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,8 +4,6 @@
|
|||
* SWIG typemaps for std::vector<T>
|
||||
* C# implementation
|
||||
* The C# wrapper is made to look and feel like a C# System.Collections.Generic.List<> collection.
|
||||
* For .NET 1 compatibility, define SWIG_DOTNET_1 when compiling the C# code; then the C# wrapper is
|
||||
* made to look and feel like a typesafe C# System.Collections.ArrayList.
|
||||
*
|
||||
* Note that IEnumerable<> is implemented in the proxy class which is useful for using LINQ with
|
||||
* C++ std::vector wrappers. The IList<> interface is also implemented to provide enhanced functionality
|
||||
|
|
@ -26,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, System.Collections.IEnumerable\n#if !SWIG_DOTNET_1\n , System.Collections.Generic.CSINTERFACE<$typemap(cstype, CTYPE)>\n#endif\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(System.Collections.ICollection c) : this() {
|
||||
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);
|
||||
}
|
||||
|
|
@ -63,7 +61,7 @@
|
|||
}
|
||||
set {
|
||||
if (value < size())
|
||||
throw new ArgumentOutOfRangeException("Capacity");
|
||||
throw new global::System.ArgumentOutOfRangeException("Capacity");
|
||||
reserve((uint)value);
|
||||
}
|
||||
}
|
||||
|
|
@ -80,53 +78,39 @@
|
|||
}
|
||||
}
|
||||
|
||||
#if SWIG_DOTNET_1
|
||||
public void CopyTo(System.Array array)
|
||||
#else
|
||||
public void CopyTo($typemap(cstype, CTYPE)[] array)
|
||||
#endif
|
||||
{
|
||||
CopyTo(0, array, 0, this.Count);
|
||||
}
|
||||
|
||||
#if SWIG_DOTNET_1
|
||||
public void CopyTo(System.Array array, int arrayIndex)
|
||||
#else
|
||||
public void CopyTo($typemap(cstype, CTYPE)[] array, int arrayIndex)
|
||||
#endif
|
||||
{
|
||||
CopyTo(0, array, arrayIndex, this.Count);
|
||||
}
|
||||
|
||||
#if SWIG_DOTNET_1
|
||||
public void CopyTo(int index, System.Array array, int arrayIndex, int count)
|
||||
#else
|
||||
public void CopyTo(int index, $typemap(cstype, CTYPE)[] array, int arrayIndex, int count)
|
||||
#endif
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
#if !SWIG_DOTNET_1
|
||||
System.Collections.Generic.IEnumerator<$typemap(cstype, CTYPE)> System.Collections.Generic.IEnumerable<$typemap(cstype, CTYPE)>.GetEnumerator() {
|
||||
global::System.Collections.Generic.IEnumerator<$typemap(cstype, CTYPE)> global::System.Collections.Generic.IEnumerable<$typemap(cstype, CTYPE)>.GetEnumerator() {
|
||||
return new $csclassnameEnumerator(this);
|
||||
}
|
||||
#endif
|
||||
|
||||
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() {
|
||||
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() {
|
||||
return new $csclassnameEnumerator(this);
|
||||
}
|
||||
|
||||
|
|
@ -139,10 +123,8 @@
|
|||
/// whenever the collection is modified. This has been done for changes in the size of the
|
||||
/// collection but not when one of the elements of the collection is modified as it is a bit
|
||||
/// tricky to detect unmanaged code that modifies the collection under our feet.
|
||||
public sealed class $csclassnameEnumerator : System.Collections.IEnumerator
|
||||
#if !SWIG_DOTNET_1
|
||||
, System.Collections.Generic.IEnumerator<$typemap(cstype, CTYPE)>
|
||||
#endif
|
||||
public sealed class $csclassnameEnumerator : global::System.Collections.IEnumerator
|
||||
, global::System.Collections.Generic.IEnumerator<$typemap(cstype, CTYPE)>
|
||||
{
|
||||
private $csclassname collectionRef;
|
||||
private int currentIndex;
|
||||
|
|
@ -160,17 +142,17 @@
|
|||
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;
|
||||
}
|
||||
}
|
||||
|
||||
// Type-unsafe IEnumerator.Current
|
||||
object System.Collections.IEnumerator.Current {
|
||||
object global::System.Collections.IEnumerator.Current {
|
||||
get {
|
||||
return Current;
|
||||
}
|
||||
|
|
@ -192,16 +174,14 @@
|
|||
currentIndex = -1;
|
||||
currentObject = null;
|
||||
if (collectionRef.Count != currentSize) {
|
||||
throw new InvalidOperationException("Collection modified.");
|
||||
throw new global::System.InvalidOperationException("Collection modified.");
|
||||
}
|
||||
}
|
||||
|
||||
#if !SWIG_DOTNET_1
|
||||
public void Dispose() {
|
||||
currentIndex = -1;
|
||||
currentObject = null;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
%}
|
||||
|
||||
|
|
@ -237,7 +217,7 @@
|
|||
else
|
||||
throw std::out_of_range("index");
|
||||
}
|
||||
const_reference getitem(int index) throw (std::out_of_range) {
|
||||
CONST_REFERENCE getitem(int index) throw (std::out_of_range) {
|
||||
if (index>=0 && index<(int)$self->size())
|
||||
return (*$self)[index];
|
||||
else
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
34
Lib/csharp/swigtype_inout.i
Normal file
34
Lib/csharp/swigtype_inout.i
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
/* -----------------------------------------------------------------------------
|
||||
* swigtype_inout.i
|
||||
*
|
||||
* Pointer pointer and pointer reference handling typemap library for non-primitive types
|
||||
*
|
||||
* These mappings provide support for input/output arguments and common
|
||||
* uses for C/C++ pointer references and pointer to pointers.
|
||||
*
|
||||
* These are named typemaps (OUTPUT) and can be used like any named typemap.
|
||||
* Alternatively they can be made the default by using %apply:
|
||||
* %apply SWIGTYPE *& OUTPUT { SWIGTYPE *& }
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* OUTPUT typemaps. Example usage wrapping:
|
||||
*
|
||||
* void f(XXX *& x) { x = new XXX(111); }
|
||||
*
|
||||
* would be:
|
||||
*
|
||||
* XXX x = null;
|
||||
* f(out x);
|
||||
* // use x
|
||||
* x.Dispose(); // manually clear memory or otherwise leave out and leave it to the garbage collector
|
||||
*/
|
||||
%typemap(ctype) SWIGTYPE *& OUTPUT "void **"
|
||||
%typemap(imtype, out="global::System.IntPtr") SWIGTYPE *& OUTPUT "out global::System.IntPtr"
|
||||
%typemap(cstype) SWIGTYPE *& OUTPUT "out $*csclassname"
|
||||
%typemap(csin,
|
||||
pre=" global::System.IntPtr cPtr_$csinput = global::System.IntPtr.Zero;",
|
||||
post=" $csinput = (cPtr_$csinput == global::System.IntPtr.Zero) ? null : new $*csclassname(cPtr_$csinput, true);",
|
||||
cshin="out $csinput") SWIGTYPE *& OUTPUT "out cPtr_$csinput"
|
||||
%typemap(in) SWIGTYPE *& OUTPUT %{ $1 = ($1_ltype)$input; %}
|
||||
%typemap(freearg) SWIGTYPE *& OUTPUT ""
|
||||
|
|
@ -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,14 +20,14 @@ 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) {
|
||||
return System.Runtime.InteropServices.Marshal.PtrToStringUni(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);
|
||||
}
|
||||
|
||||
static SWIGWStringHelper() {
|
||||
|
|
@ -77,12 +77,12 @@ 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"
|
||||
%typemap(csout, excode=SWIGEXCODE) wchar_t * {
|
||||
string ret = System.Runtime.InteropServices.Marshal.PtrToStringUni($imcall);$excode
|
||||
string ret = global::System.Runtime.InteropServices.Marshal.PtrToStringUni($imcall);$excode
|
||||
return ret;
|
||||
}
|
||||
%typemap(csvarin, excode=SWIGEXCODE2) wchar_t * %{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue