[mapserver-commits] r7848 - in trunk/mapserver: . mapscript/csharp
svn at osgeo.org
svn at osgeo.org
Thu Aug 14 07:03:43 EDT 2008
Author: tamas
Date: 2008-08-14 07:03:43 -0400 (Thu, 14 Aug 2008)
New Revision: 7848
Modified:
trunk/mapserver/HISTORY.TXT
trunk/mapserver/mapscript/csharp/csmodule.i
Log:
Implement Equals and GetHashCode properly for the mapscript C# classes
Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT 2008-08-14 10:23:11 UTC (rev 7847)
+++ trunk/mapserver/HISTORY.TXT 2008-08-14 11:03:43 UTC (rev 7848)
@@ -12,6 +12,8 @@
Current Version (5.3-dev, SVN trunk):
------------------------------------
+- Implement Equals and GetHashCode properly for the mapscript C# classes
+
- Expose msConnectLayer to the SWIG mapscript interface (#2735)
- SLD: when creating well known symbols on the fly the pen-up value
Modified: trunk/mapserver/mapscript/csharp/csmodule.i
===================================================================
--- trunk/mapserver/mapscript/csharp/csmodule.i 2008-08-14 10:23:11 UTC (rev 7847)
+++ trunk/mapserver/mapscript/csharp/csmodule.i 2008-08-14 11:03:43 UTC (rev 7848)
@@ -36,6 +36,24 @@
%ignore fp;
/******************************************************************************
+ * Implement Equals and GetHashCode properly
+ *****************************************************************************/
+
+%typemap(cscode) SWIGTYPE %{
+ public override bool Equals(object obj) {
+ if (obj == null)
+ return false;
+ if (this.GetType() != obj.GetType())
+ return false;
+ return swigCPtr.Handle.Equals($csclassname.getCPtr(($csclassname)obj).Handle);
+ }
+
+ public override int GetHashCode() {
+ return swigCPtr.Handle.GetHashCode();
+ }
+%}
+
+/******************************************************************************
* Module initialization helper (bug 1665)
*****************************************************************************/
More information about the mapserver-commits
mailing list