[mapguide-commits] r8399 - in trunk/MgDev: Common/Foundation Common/PlatformBase Common/PlatformBase/Services Common/Stylization Server/src/Services/Mapping

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Thu Oct 9 10:04:43 PDT 2014


Author: jng
Date: 2014-10-09 10:04:43 -0700 (Thu, 09 Oct 2014)
New Revision: 8399

Added:
   trunk/MgDev/Common/PlatformBase/Services/FeatureSpatialOperations.cpp
   trunk/MgDev/Common/PlatformBase/Services/OrderingOption.cpp
Modified:
   trunk/MgDev/Common/Foundation/FoundationDefs.h
   trunk/MgDev/Common/PlatformBase/Makefile.am
   trunk/MgDev/Common/PlatformBase/PlatformBaseBuild.cpp
   trunk/MgDev/Common/Stylization/RS_FeatureReader.h
   trunk/MgDev/Common/Stylization/RS_Raster.h
   trunk/MgDev/Server/src/Services/Mapping/RSMgFeatureReader.cpp
   trunk/MgDev/Server/src/Services/Mapping/RSMgFeatureReader.h
Log:
#1657: Add/Fix support for 64-bit Linux. With this change, we have a functional MapGuide Server on 64-bit linux. Some FDO providers may still not be functional yet on 64-bit Linux (eg. SHP) and will have to be resolved on a provider-by-provider basis. At least with this change, we can still pave the way for a MapGuide release for 64-bit Linux with partial FDO provider support.

The typedef changes has somehow caused static members in MgOrderingOption and MgFeatureSpatialOperations to be unresolved on Linux. This submission adds .cpp files to define these members ensuring these static members are included in the final library .so

Reviewed by Walt Welton-Lair.

Modified: trunk/MgDev/Common/Foundation/FoundationDefs.h
===================================================================
--- trunk/MgDev/Common/Foundation/FoundationDefs.h	2014-10-09 14:00:51 UTC (rev 8398)
+++ trunk/MgDev/Common/Foundation/FoundationDefs.h	2014-10-09 17:04:43 UTC (rev 8399)
@@ -22,6 +22,8 @@
 
 #ifdef _WIN32
 #include <basetsd.h>
+#else
+#include <stdint.h>
 #endif
 
 // This allows to use the same function name for both Windows and Linux.
@@ -95,42 +97,42 @@
 //////////////////////////////////////////////////////////////////////////////
 /// \brief
 /// 8 bit integer
-typedef char INT8;
+typedef int8_t INT8;
 
 //////////////////////////////////////////////////////////////////////////////
 /// \brief
 /// 8 bit unsigned integer
-typedef unsigned char UINT8;
+typedef uint8_t UINT8;
 
 //////////////////////////////////////////////////////////////////////////////
 /// \brief
 /// 16 bit integer
-typedef short INT16;
+typedef int16_t INT16;
 
 //////////////////////////////////////////////////////////////////////////////
 /// \brief
 /// 16 bit unsigned integer
-typedef unsigned short UINT16;
+typedef uint16_t UINT16;
 
 //////////////////////////////////////////////////////////////////////////////
 /// \brief
 /// 32 bit integer
-typedef long INT32;
+typedef int32_t INT32;
 
 //////////////////////////////////////////////////////////////////////////////
 /// \brief
 /// 32 bit unsigned integer
-typedef unsigned long UINT32;
+typedef uint32_t UINT32;
 
 //////////////////////////////////////////////////////////////////////////////
 /// \brief
 /// 64 bit integer
-typedef long long INT64;
+typedef int64_t INT64;
 
 //////////////////////////////////////////////////////////////////////////////
 /// \brief
 /// 64 bit unsigned integer
-typedef unsigned long long UINT64;
+typedef uint64_t UINT64;
 #endif
 
 //////////////////////////////////////////////////////////////////////////////

Modified: trunk/MgDev/Common/PlatformBase/Makefile.am
===================================================================
--- trunk/MgDev/Common/PlatformBase/Makefile.am	2014-10-09 14:00:51 UTC (rev 8398)
+++ trunk/MgDev/Common/PlatformBase/Makefile.am	2014-10-09 17:04:43 UTC (rev 8399)
@@ -76,6 +76,7 @@
   Services/FeatureService.cpp \
   Services/FeatureSet.cpp \
   Services/FeatureSourceParams.cpp \
+  Services/FeatureSpatialOperations.cpp \
   Services/FileFeatureSourceParams.cpp \
   Services/GeometricPropertyDefinition.cpp \
   Services/GeometryProperty.cpp \
@@ -85,6 +86,7 @@
   Services/LongTransactionData.cpp \
   Services/LongTransactionReader.cpp \
   Services/ObjectPropertyDefinition.cpp \
+  Services/OrderingOption.cpp \
   Services/Parameter.cpp \
   Services/ParameterCollection.cpp \
   Services/Raster.cpp \

Modified: trunk/MgDev/Common/PlatformBase/PlatformBaseBuild.cpp
===================================================================
--- trunk/MgDev/Common/PlatformBase/PlatformBaseBuild.cpp	2014-10-09 14:00:51 UTC (rev 8398)
+++ trunk/MgDev/Common/PlatformBase/PlatformBaseBuild.cpp	2014-10-09 17:04:43 UTC (rev 8399)
@@ -87,6 +87,7 @@
 #include "Services/FeatureService.cpp"
 #include "Services/FeatureSet.cpp"
 #include "Services/FeatureSourceParams.cpp"
+#include "Services/FeatureSpatialOperations.cpp"
 #include "Services/FileFeatureSourceParams.cpp"
 #include "Services/GeometricPropertyDefinition.cpp"
 #include "Services/GeometryProperty.cpp"
@@ -96,6 +97,7 @@
 #include "Services/LongTransactionData.cpp"
 #include "Services/LongTransactionReader.cpp"
 #include "Services/ObjectPropertyDefinition.cpp"
+#include "Services/OrderingOption.cpp"
 #include "Services/Parameter.cpp"
 #include "Services/ParameterCollection.cpp"
 #include "Services/Raster.cpp"

Added: trunk/MgDev/Common/PlatformBase/Services/FeatureSpatialOperations.cpp
===================================================================
--- trunk/MgDev/Common/PlatformBase/Services/FeatureSpatialOperations.cpp	                        (rev 0)
+++ trunk/MgDev/Common/PlatformBase/Services/FeatureSpatialOperations.cpp	2014-10-09 17:04:43 UTC (rev 8399)
@@ -0,0 +1,34 @@
+//
+//  Copyright (C) 2004-2014 by Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "FeatureSpatialOperations.h"
+
+//NOTE: This is primarily for Linux to ensure that the symbols below are
+//included in the resulting binary, as the typedef changes to enable 64-bit support
+//caused these symbols below to be unresolved
+
+const int MgFeatureSpatialOperations::Contains;
+const int MgFeatureSpatialOperations::Crosses;
+const int MgFeatureSpatialOperations::Disjoint;
+const int MgFeatureSpatialOperations::Equals;
+const int MgFeatureSpatialOperations::Intersects;
+const int MgFeatureSpatialOperations::Overlaps;
+const int MgFeatureSpatialOperations::Touches;
+const int MgFeatureSpatialOperations::Within;
+const int MgFeatureSpatialOperations::CoveredBy;
+const int MgFeatureSpatialOperations::Inside;
+const int MgFeatureSpatialOperations::EnvelopeIntersects;

Added: trunk/MgDev/Common/PlatformBase/Services/OrderingOption.cpp
===================================================================
--- trunk/MgDev/Common/PlatformBase/Services/OrderingOption.cpp	                        (rev 0)
+++ trunk/MgDev/Common/PlatformBase/Services/OrderingOption.cpp	2014-10-09 17:04:43 UTC (rev 8399)
@@ -0,0 +1,25 @@
+//
+//  Copyright (C) 2004-2014 by Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "OrderingOption.h"
+
+//NOTE: This is primarily for Linux to ensure that the symbols below are
+//included in the resulting binary, as the typedef changes to enable 64-bit support
+//caused these symbols below to be unresolved
+
+const int MgOrderingOption::Ascending;
+const int MgOrderingOption::Descending;

Modified: trunk/MgDev/Common/Stylization/RS_FeatureReader.h
===================================================================
--- trunk/MgDev/Common/Stylization/RS_FeatureReader.h	2014-10-09 14:00:51 UTC (rev 8398)
+++ trunk/MgDev/Common/Stylization/RS_FeatureReader.h	2014-10-09 17:04:43 UTC (rev 8399)
@@ -33,13 +33,13 @@
 
     virtual bool            IsNull         (const wchar_t* propertyName) = 0;
     virtual bool            GetBoolean     (const wchar_t* propertyName) = 0;
-    virtual unsigned char   GetByte        (const wchar_t* propertyName) = 0;
+    virtual FdoInt8         GetByte        (const wchar_t* propertyName) = 0;
     virtual FdoDateTime     GetDateTime    (const wchar_t* propertyName) = 0;
     virtual float           GetSingle      (const wchar_t* propertyName) = 0;
     virtual double          GetDouble      (const wchar_t* propertyName) = 0;
-    virtual short           GetInt16       (const wchar_t* propertyName) = 0;
-    virtual int             GetInt32       (const wchar_t* propertyName) = 0;
-    virtual long long       GetInt64       (const wchar_t* propertyName) = 0;
+    virtual FdoInt16        GetInt16       (const wchar_t* propertyName) = 0;
+    virtual FdoInt32        GetInt32       (const wchar_t* propertyName) = 0;
+    virtual FdoInt64        GetInt64       (const wchar_t* propertyName) = 0;
     virtual const wchar_t*  GetString      (const wchar_t* propertyName) = 0;
     virtual LineBuffer*     GetGeometry    (const wchar_t* propertyName, LineBuffer* lb, CSysTransformer* xformer) = 0;
     virtual RS_Raster*      GetRaster      (const wchar_t* propertyName) = 0;

Modified: trunk/MgDev/Common/Stylization/RS_Raster.h
===================================================================
--- trunk/MgDev/Common/Stylization/RS_Raster.h	2014-10-09 14:00:51 UTC (rev 8398)
+++ trunk/MgDev/Common/Stylization/RS_Raster.h	2014-10-09 17:04:43 UTC (rev 8399)
@@ -21,6 +21,7 @@
 #include "RS_InputStream.h"
 #include "Bounds.h"
 #include "RendererStyles.h"
+#include <stdint.h>
 
 class RS_Raster
 {
@@ -44,7 +45,7 @@
     virtual RS_String       GetVerticalUnits()  = 0;
 
     virtual int             GetNullValueType()  = 0;
-    virtual long long       GetNullValueData()  = 0;
+    virtual int64_t         GetNullValueData()  = 0;
 };
 
 #endif

Modified: trunk/MgDev/Server/src/Services/Mapping/RSMgFeatureReader.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Mapping/RSMgFeatureReader.cpp	2014-10-09 14:00:51 UTC (rev 8398)
+++ trunk/MgDev/Server/src/Services/Mapping/RSMgFeatureReader.cpp	2014-10-09 17:04:43 UTC (rev 8399)
@@ -202,7 +202,7 @@
 }
 
 
-unsigned char RSMgFeatureReader::GetByte(const wchar_t* propertyName)
+FdoInt8 RSMgFeatureReader::GetByte(const wchar_t* propertyName)
 {
     RSFR_TRY()
     return m_reader->GetByte(propertyName);
@@ -246,7 +246,7 @@
 }
 
 
-short RSMgFeatureReader::GetInt16(const wchar_t* propertyName)
+FdoInt16 RSMgFeatureReader::GetInt16(const wchar_t* propertyName)
 {
     RSFR_TRY()
     return m_reader->GetInt16(propertyName);
@@ -254,7 +254,7 @@
 }
 
 
-int RSMgFeatureReader::GetInt32(const wchar_t* propertyName)
+FdoInt32 RSMgFeatureReader::GetInt32(const wchar_t* propertyName)
 {
     RSFR_TRY()
     return m_reader->GetInt32(propertyName);
@@ -262,7 +262,7 @@
 }
 
 
-long long RSMgFeatureReader::GetInt64(const wchar_t* propertyName)
+FdoInt64 RSMgFeatureReader::GetInt64(const wchar_t* propertyName)
 {
     RSFR_TRY()
     return m_reader->GetInt64(propertyName);

Modified: trunk/MgDev/Server/src/Services/Mapping/RSMgFeatureReader.h
===================================================================
--- trunk/MgDev/Server/src/Services/Mapping/RSMgFeatureReader.h	2014-10-09 14:00:51 UTC (rev 8398)
+++ trunk/MgDev/Server/src/Services/Mapping/RSMgFeatureReader.h	2014-10-09 17:04:43 UTC (rev 8399)
@@ -50,13 +50,13 @@
 
     virtual bool            IsNull         (const wchar_t* propertyName);
     virtual bool            GetBoolean     (const wchar_t* propertyName);
-    virtual unsigned char   GetByte        (const wchar_t* propertyName);
+    virtual FdoInt8         GetByte        (const wchar_t* propertyName);
     virtual FdoDateTime     GetDateTime    (const wchar_t* propertyName);
     virtual float           GetSingle      (const wchar_t* propertyName);
     virtual double          GetDouble      (const wchar_t* propertyName);
-    virtual short           GetInt16       (const wchar_t* propertyName);
-    virtual int             GetInt32       (const wchar_t* propertyName);
-    virtual long long       GetInt64       (const wchar_t* propertyName);
+    virtual FdoInt16        GetInt16       (const wchar_t* propertyName);
+    virtual FdoInt32        GetInt32       (const wchar_t* propertyName);
+    virtual FdoInt64        GetInt64       (const wchar_t* propertyName);
     virtual const wchar_t*  GetString      (const wchar_t* propertyName);
     virtual LineBuffer*     GetGeometry    (const wchar_t* propertyName, LineBuffer* lb, CSysTransformer* xformer);
     virtual RS_Raster*      GetRaster      (const wchar_t* propertyName);



More information about the mapguide-commits mailing list