Globablly qualify the use of types from the .NET framework's System namespace in the C# module and library.

This commit is contained in:
Brant K. Kyser 2013-10-17 13:27:48 -05:00
commit 3235570619
7 changed files with 60 additions and 60 deletions

View file

@ -848,7 +848,7 @@ SWIGINTERN const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
%typemap(csbase) SWIGTYPE, SWIGTYPE *, SWIGTYPE &, SWIGTYPE &&, SWIGTYPE [], SWIGTYPE (CLASS::*) "" %typemap(csbase) SWIGTYPE, SWIGTYPE *, SWIGTYPE &, SWIGTYPE &&, SWIGTYPE [], SWIGTYPE (CLASS::*) ""
%typemap(csclassmodifiers) SWIGTYPE, SWIGTYPE *, SWIGTYPE &, SWIGTYPE &&, SWIGTYPE [], SWIGTYPE (CLASS::*) "public class" %typemap(csclassmodifiers) SWIGTYPE, SWIGTYPE *, SWIGTYPE &, SWIGTYPE &&, SWIGTYPE [], SWIGTYPE (CLASS::*) "public class"
%typemap(cscode) SWIGTYPE, SWIGTYPE *, SWIGTYPE &, SWIGTYPE &&, SWIGTYPE [], SWIGTYPE (CLASS::*) "" %typemap(cscode) SWIGTYPE, SWIGTYPE *, SWIGTYPE &, SWIGTYPE &&, SWIGTYPE [], SWIGTYPE (CLASS::*) ""
%typemap(csimports) SWIGTYPE, SWIGTYPE *, SWIGTYPE &, SWIGTYPE &&, SWIGTYPE [], SWIGTYPE (CLASS::*) "\nusing System;\nusing System.Runtime.InteropServices;\n" %typemap(csimports) SWIGTYPE, SWIGTYPE *, SWIGTYPE &, SWIGTYPE &&, SWIGTYPE [], SWIGTYPE (CLASS::*) "\nusing global::System;\nusing global::System.Runtime.InteropServices;\n"
%typemap(csinterfaces) SWIGTYPE "IDisposable" %typemap(csinterfaces) SWIGTYPE "IDisposable"
%typemap(csinterfaces) SWIGTYPE *, SWIGTYPE &, SWIGTYPE &&, SWIGTYPE [], SWIGTYPE (CLASS::*) "" %typemap(csinterfaces) SWIGTYPE *, SWIGTYPE &, SWIGTYPE &&, SWIGTYPE [], SWIGTYPE (CLASS::*) ""
%typemap(csinterfaces_derived) SWIGTYPE, SWIGTYPE *, SWIGTYPE &, SWIGTYPE &&, SWIGTYPE [], SWIGTYPE (CLASS::*) "" %typemap(csinterfaces_derived) SWIGTYPE, SWIGTYPE *, SWIGTYPE &, SWIGTYPE &&, SWIGTYPE [], SWIGTYPE (CLASS::*) ""
@ -982,13 +982,13 @@ SWIG_CSBODY_TYPEWRAPPER(internal, protected, internal, SWIGTYPE)
%pragma(csharp) moduleclassmodifiers="public class" %pragma(csharp) moduleclassmodifiers="public class"
%pragma(csharp) moduleimports=%{ %pragma(csharp) moduleimports=%{
using System; using global::System;
using System.Runtime.InteropServices; using global::System.Runtime.InteropServices;
%} %}
%pragma(csharp) imclassimports=%{ %pragma(csharp) imclassimports=%{
using System; using global::System;
using System.Runtime.InteropServices; using global::System.Runtime.InteropServices;
%} %}
/* Some ANSI C typemaps */ /* Some ANSI C typemaps */
@ -1018,10 +1018,10 @@ using System.Runtime.InteropServices;
public class SWIGStringMarshal : IDisposable { public class SWIGStringMarshal : IDisposable {
public readonly HandleRef swigCPtr; public readonly HandleRef swigCPtr;
public SWIGStringMarshal(string str) { public SWIGStringMarshal(string str) {
swigCPtr = new HandleRef(this, System.Runtime.InteropServices.Marshal.StringToHGlobalAnsi(str)); swigCPtr = new HandleRef(this, global::System.Runtime.InteropServices.Marshal.StringToHGlobalAnsi(str));
} }
public virtual void Dispose() { public virtual void Dispose() {
System.Runtime.InteropServices.Marshal.FreeHGlobal(swigCPtr.Handle); global::System.Runtime.InteropServices.Marshal.FreeHGlobal(swigCPtr.Handle);
GC.SuppressFinalize(this); GC.SuppressFinalize(this);
} }
} }
@ -1031,7 +1031,7 @@ using System.Runtime.InteropServices;
%typemap(out) char *, char[ANY], char[] %{ $result = $1; %} %typemap(out) char *, char[ANY], char[] %{ $result = $1; %}
%typemap(csin) char *, char[ANY], char[] "new $imclassname.SWIGStringMarshal($csinput).swigCPtr" %typemap(csin) char *, char[ANY], char[] "new $imclassname.SWIGStringMarshal($csinput).swigCPtr"
%typemap(csout, excode=SWIGEXCODE) char *, char[ANY], char[] { %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; return ret;
} }
%typemap(csvarin, excode=SWIGEXCODE2) char *, char[ANY], char[] %{ %typemap(csvarin, excode=SWIGEXCODE2) char *, char[ANY], char[] %{
@ -1040,7 +1040,7 @@ using System.Runtime.InteropServices;
} %} } %}
%typemap(csvarout, excode=SWIGEXCODE2) char *, char[ANY], char[] %{ %typemap(csvarout, excode=SWIGEXCODE2) char *, char[ANY], char[] %{
get { get {
string ret = System.Runtime.InteropServices.Marshal.PtrToStringAnsi($imcall);$excode string ret = global::System.Runtime.InteropServices.Marshal.PtrToStringAnsi($imcall);$excode
return ret; return ret;
} %} } %}
*/ */

View file

@ -170,51 +170,51 @@ SWIGEXPORT void SWIGSTDCALL SWIGRegisterExceptionArgumentCallbacks_$module(
ExceptionArgumentDelegate argumentOutOfRangeDelegate); ExceptionArgumentDelegate argumentOutOfRangeDelegate);
static void SetPendingApplicationException(string message) { 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) { 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) { 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) { 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) { 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) { 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) { 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) { 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) { 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) { 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) { 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) { 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) { static void SetPendingArgumentNullException(string message, string paramName) {
Exception e = SWIGPendingException.Retrieve(); Exception e = SWIGPendingException.Retrieve();
if (e != null) message = message + " Inner Exception: " + e.Message; 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) { static void SetPendingArgumentOutOfRangeException(string message, string paramName) {
Exception e = SWIGPendingException.Retrieve(); Exception e = SWIGPendingException.Retrieve();
if (e != null) message = message + " Inner Exception: " + e.Message; 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() { static SWIGExceptionHelper() {

View file

@ -97,7 +97,7 @@
for (int i = 0; i < swigValues.Length; i++) for (int i = 0; i < swigValues.Length; i++)
if (swigValues[i].swigValue == swigValue) if (swigValues[i].swigValue == swigValue)
return swigValues[i]; 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() { public override string ToString() {

View file

@ -28,7 +28,7 @@
/* K is the C++ key type, T is the C++ value type */ /* K is the C++ key type, T is the C++ value type */
%define SWIG_STD_MAP_INTERNAL(K, T, C) %define SWIG_STD_MAP_INTERNAL(K, T, C)
%typemap(csinterfaces) std::map< K, T, C > "IDisposable \n#if !SWIG_DOTNET_1\n , System.Collections.Generic.IDictionary<$typemap(cstype, K), $typemap(cstype, T)>\n#endif\n"; %typemap(csinterfaces) std::map< K, T, C > "IDisposable \n#if !SWIG_DOTNET_1\n , global::System.Collections.Generic.IDictionary<$typemap(cstype, K), $typemap(cstype, T)>\n#endif\n";
%typemap(cscode) std::map<K, T, C > %{ %typemap(cscode) std::map<K, T, C > %{
public $typemap(cstype, T) this[$typemap(cstype, K) key] { public $typemap(cstype, T) this[$typemap(cstype, K) key] {
@ -64,9 +64,9 @@
#if !SWIG_DOTNET_1 #if !SWIG_DOTNET_1
public System.Collections.Generic.ICollection<$typemap(cstype, K)> Keys { public global::System.Collections.Generic.ICollection<$typemap(cstype, K)> Keys {
get { 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; int size = this.Count;
if (size > 0) { if (size > 0) {
IntPtr iter = create_iterator_begin(); IntPtr iter = create_iterator_begin();
@ -79,21 +79,21 @@
} }
} }
public System.Collections.Generic.ICollection<$typemap(cstype, T)> Values { public global::System.Collections.Generic.ICollection<$typemap(cstype, T)> Values {
get { get {
System.Collections.Generic.ICollection<$typemap(cstype, T)> vals = new System.Collections.Generic.List<$typemap(cstype, T)>(); global::System.Collections.Generic.ICollection<$typemap(cstype, T)> vals = new global::System.Collections.Generic.List<$typemap(cstype, T)>();
foreach (System.Collections.Generic.KeyValuePair<$typemap(cstype, K), $typemap(cstype, T)> pair in this) { foreach (global::System.Collections.Generic.KeyValuePair<$typemap(cstype, K), $typemap(cstype, T)> pair in this) {
vals.Add(pair.Value); vals.Add(pair.Value);
} }
return vals; 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); 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)) { if (Contains(item)) {
return Remove(item.Key); return Remove(item.Key);
} else { } else {
@ -101,7 +101,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) { if (this[item.Key] == item.Value) {
return true; return true;
} else { } else {
@ -109,11 +109,11 @@
} }
} }
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); 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) if (array == null)
throw new ArgumentNullException("array"); throw new ArgumentNullException("array");
if (arrayIndex < 0) if (arrayIndex < 0)
@ -123,18 +123,18 @@
if (arrayIndex+this.Count > array.Length) if (arrayIndex+this.Count > array.Length)
throw new ArgumentException("Number of elements to copy is too large."); throw new 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++) { for (int i = 0; i < keyList.Count; i++) {
$typemap(cstype, K) currentKey = keyList[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); return new $csclassnameEnumerator(this);
} }
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() {
return new $csclassnameEnumerator(this); return new $csclassnameEnumerator(this);
} }
@ -147,25 +147,25 @@
/// whenever the collection is modified. This has been done for changes in the size of the /// 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 /// 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. /// tricky to detect unmanaged code that modifies the collection under our feet.
public sealed class $csclassnameEnumerator : System.Collections.IEnumerator, public sealed class $csclassnameEnumerator : global::System.Collections.IEnumerator,
System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<$typemap(cstype, K), $typemap(cstype, T)>> global::System.Collections.Generic.IEnumerator<global::System.Collections.Generic.KeyValuePair<$typemap(cstype, K), $typemap(cstype, T)>>
{ {
private $csclassname collectionRef; 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 int currentIndex;
private object currentObject; private object currentObject;
private int currentSize; private int currentSize;
public $csclassnameEnumerator($csclassname collection) { public $csclassnameEnumerator($csclassname collection) {
collectionRef = 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; currentIndex = -1;
currentObject = null; currentObject = null;
currentSize = collectionRef.Count; currentSize = collectionRef.Count;
} }
// Type-safe iterator Current // 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 { get {
if (currentIndex == -1) if (currentIndex == -1)
throw new InvalidOperationException("Enumeration not started."); throw new InvalidOperationException("Enumeration not started.");
@ -173,12 +173,12 @@
throw new InvalidOperationException("Enumeration finished."); throw new InvalidOperationException("Enumeration finished.");
if (currentObject == null) if (currentObject == null)
throw new InvalidOperationException("Collection modified."); throw new InvalidOperationException("Collection modified.");
return (System.Collections.Generic.KeyValuePair<$typemap(cstype, K), $typemap(cstype, T)>)currentObject; return (global::System.Collections.Generic.KeyValuePair<$typemap(cstype, K), $typemap(cstype, T)>)currentObject;
} }
} }
// Type-unsafe IEnumerator.Current // Type-unsafe IEnumerator.Current
object System.Collections.IEnumerator.Current { object global::System.Collections.IEnumerator.Current {
get { get {
return Current; return Current;
} }
@ -190,7 +190,7 @@
if (moveOkay) { if (moveOkay) {
currentIndex++; currentIndex++;
$typemap(cstype, K) currentKey = keyCollection[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 { } else {
currentObject = null; currentObject = null;
} }

View file

@ -26,9 +26,9 @@
// MACRO for use within the std::vector class body // MACRO for use within the std::vector class body
%define SWIG_STD_VECTOR_MINIMUM_INTERNAL(CSINTERFACE, CONST_REFERENCE, CTYPE...) %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 > "IDisposable, global::System.Collections.IEnumerable\n#if !SWIG_DOTNET_1\n , global::System.Collections.Generic.CSINTERFACE<$typemap(cstype, CTYPE)>\n#endif\n";
%typemap(cscode) std::vector< CTYPE > %{ %typemap(cscode) std::vector< CTYPE > %{
public $csclassname(System.Collections.ICollection c) : this() { public $csclassname(global::System.Collections.ICollection c) : this() {
if (c == null) if (c == null)
throw new ArgumentNullException("c"); throw new ArgumentNullException("c");
foreach ($typemap(cstype, CTYPE) element in c) { foreach ($typemap(cstype, CTYPE) element in c) {
@ -81,7 +81,7 @@
} }
#if SWIG_DOTNET_1 #if SWIG_DOTNET_1
public void CopyTo(System.Array array) public void CopyTo(global::System.Array array)
#else #else
public void CopyTo($typemap(cstype, CTYPE)[] array) public void CopyTo($typemap(cstype, CTYPE)[] array)
#endif #endif
@ -90,7 +90,7 @@
} }
#if SWIG_DOTNET_1 #if SWIG_DOTNET_1
public void CopyTo(System.Array array, int arrayIndex) public void CopyTo(global::System.Array array, int arrayIndex)
#else #else
public void CopyTo($typemap(cstype, CTYPE)[] array, int arrayIndex) public void CopyTo($typemap(cstype, CTYPE)[] array, int arrayIndex)
#endif #endif
@ -99,7 +99,7 @@
} }
#if SWIG_DOTNET_1 #if SWIG_DOTNET_1
public void CopyTo(int index, System.Array array, int arrayIndex, int count) public void CopyTo(int index, global::System.Array array, int arrayIndex, int count)
#else #else
public void CopyTo(int index, $typemap(cstype, CTYPE)[] array, int arrayIndex, int count) public void CopyTo(int index, $typemap(cstype, CTYPE)[] array, int arrayIndex, int count)
#endif #endif
@ -121,12 +121,12 @@
} }
#if !SWIG_DOTNET_1 #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); return new $csclassnameEnumerator(this);
} }
#endif #endif
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() {
return new $csclassnameEnumerator(this); return new $csclassnameEnumerator(this);
} }
@ -139,9 +139,9 @@
/// whenever the collection is modified. This has been done for changes in the size of the /// 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 /// 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. /// tricky to detect unmanaged code that modifies the collection under our feet.
public sealed class $csclassnameEnumerator : System.Collections.IEnumerator public sealed class $csclassnameEnumerator : global::System.Collections.IEnumerator
#if !SWIG_DOTNET_1 #if !SWIG_DOTNET_1
, System.Collections.Generic.IEnumerator<$typemap(cstype, CTYPE)> , global::System.Collections.Generic.IEnumerator<$typemap(cstype, CTYPE)>
#endif #endif
{ {
private $csclassname collectionRef; private $csclassname collectionRef;
@ -170,7 +170,7 @@
} }
// Type-unsafe IEnumerator.Current // Type-unsafe IEnumerator.Current
object System.Collections.IEnumerator.Current { object global::System.Collections.IEnumerator.Current {
get { get {
return Current; return Current;
} }

View file

@ -27,7 +27,7 @@ static SWIG_CSharpWStringHelperCallback SWIG_csharp_wstring_callback = NULL;
public static extern void SWIGRegisterWStringCallback_$module(SWIGWStringDelegate wstringDelegate); public static extern void SWIGRegisterWStringCallback_$module(SWIGWStringDelegate wstringDelegate);
static string CreateWString([MarshalAs(UnmanagedType.LPWStr)]IntPtr cString) { static string CreateWString([MarshalAs(UnmanagedType.LPWStr)]IntPtr cString) {
return System.Runtime.InteropServices.Marshal.PtrToStringUni(cString); return global::System.Runtime.InteropServices.Marshal.PtrToStringUni(cString);
} }
static SWIGWStringHelper() { static SWIGWStringHelper() {
@ -82,7 +82,7 @@ SWIGEXPORT void SWIGSTDCALL SWIGRegisterWStringCallback_$module(SWIG_CSharpWStri
%typemap(csin) wchar_t * "$csinput" %typemap(csin) wchar_t * "$csinput"
%typemap(csout, excode=SWIGEXCODE) wchar_t * { %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; return ret;
} }
%typemap(csvarin, excode=SWIGEXCODE2) wchar_t * %{ %typemap(csvarin, excode=SWIGEXCODE2) wchar_t * %{

View file

@ -1734,7 +1734,7 @@ public:
Printf(proxy_class_code, "\n"); Printf(proxy_class_code, "\n");
Printf(proxy_class_code, " private bool SwigDerivedClassHasMethod(string methodName, Type[] methodTypes) {\n"); Printf(proxy_class_code, " private bool SwigDerivedClassHasMethod(string methodName, Type[] methodTypes) {\n");
Printf(proxy_class_code, Printf(proxy_class_code,
" System.Reflection.MethodInfo methodInfo = this.GetType().GetMethod(methodName, System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance, null, methodTypes, null);\n"); " global::System.Reflection.MethodInfo methodInfo = this.GetType().GetMethod(methodName, global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, methodTypes, null);\n");
Printf(proxy_class_code, " bool hasDerivedMethod = methodInfo.DeclaringType.IsSubclassOf(typeof(%s));\n", proxy_class_name); Printf(proxy_class_code, " bool hasDerivedMethod = methodInfo.DeclaringType.IsSubclassOf(typeof(%s));\n", proxy_class_name);
/* Could add this code to cover corner case where the GetMethod() returns a method which allows type /* Could add this code to cover corner case where the GetMethod() returns a method which allows type
* promotion, eg it will return foo(double), if looking for foo(int). * promotion, eg it will return foo(double), if looking for foo(int).