[mapguide-commits] r9354 - in sandbox/jng/common_decouple: Common/Stylization Server/src/Services/Mapping Server/src/Services/Rendering
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Sun Mar 4 04:27:17 PST 2018
Author: jng
Date: 2018-03-04 04:27:16 -0800 (Sun, 04 Mar 2018)
New Revision: 9354
Added:
sandbox/jng/common_decouple/Common/Stylization/RS_FdoFeatureReader.h
sandbox/jng/common_decouple/Common/Stylization/RS_Types.h
Modified:
sandbox/jng/common_decouple/Common/Stylization/ExpressionHelper.cpp
sandbox/jng/common_decouple/Common/Stylization/ExpressionHelper.h
sandbox/jng/common_decouple/Common/Stylization/RS_FeatureReader.h
sandbox/jng/common_decouple/Common/Stylization/Stylization.vcxproj
sandbox/jng/common_decouple/Common/Stylization/Stylization.vcxproj.filters
sandbox/jng/common_decouple/Server/src/Services/Mapping/RSMgFeatureReader.h
sandbox/jng/common_decouple/Server/src/Services/Rendering/FeaturePropRenderer.cpp
Log:
Decouple FDO types from RS_FeatureReader. Add a new RS_FdoFeatureReader that exposes the GetInternalReader and have all existing implementations inherit from RS_FdoFeatureReader
Modified: sandbox/jng/common_decouple/Common/Stylization/ExpressionHelper.cpp
===================================================================
--- sandbox/jng/common_decouple/Common/Stylization/ExpressionHelper.cpp 2018-03-04 05:25:50 UTC (rev 9353)
+++ sandbox/jng/common_decouple/Common/Stylization/ExpressionHelper.cpp 2018-03-04 12:27:16 UTC (rev 9354)
@@ -115,11 +115,13 @@
// defined by stylization.
FdoExpressionEngine* ExpressionHelper::GetExpressionEngine(Renderer* renderer, RS_FeatureReader* reader)
{
+ RS_FdoFeatureReader* frdr = dynamic_cast<RS_FdoFeatureReader*>(reader);
+
// get the user-defined functions
FdoPtr<FdoExpressionEngineFunctionCollection> userDefinedFunctions = ExpressionHelper::GetExpressionEngineFunctions(renderer, reader);
// create the engine
- FdoPtr<FdoIFeatureReader> fdoReader = reader? reader->GetInternalReader() : NULL;
+ FdoPtr<FdoIFeatureReader> fdoReader = frdr ? frdr->GetInternalReader() : NULL;
FdoPtr<FdoClassDefinition> classDef = fdoReader? fdoReader->GetClassDefinition() : FdoClass::Create();
FdoExpressionEngine* exec = FdoExpressionEngine::Create(fdoReader, classDef, userDefinedFunctions);
Modified: sandbox/jng/common_decouple/Common/Stylization/ExpressionHelper.h
===================================================================
--- sandbox/jng/common_decouple/Common/Stylization/ExpressionHelper.h 2018-03-04 05:25:50 UTC (rev 9353)
+++ sandbox/jng/common_decouple/Common/Stylization/ExpressionHelper.h 2018-03-04 12:27:16 UTC (rev 9354)
@@ -20,7 +20,7 @@
#include "Stylization.h"
#include "Renderer.h"
-#include "FdoStylizationCommon.h"
+#include "RS_FdoFeatureReader.h"
class ExpressionHelper
{
Added: sandbox/jng/common_decouple/Common/Stylization/RS_FdoFeatureReader.h
===================================================================
--- sandbox/jng/common_decouple/Common/Stylization/RS_FdoFeatureReader.h (rev 0)
+++ sandbox/jng/common_decouple/Common/Stylization/RS_FdoFeatureReader.h 2018-03-04 12:27:16 UTC (rev 9354)
@@ -0,0 +1,30 @@
+//
+// Copyright (C) 2004-2018 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
+//
+#ifndef RS_FDO_FEATURE_READER_H_
+#define RS_FDO_FEATURE_READER_H_
+
+#include "FdoStylizationCommon.h"
+#include "RS_FeatureReader.h"
+
+// Defines a feature data reader interface with access to the internal FDO feature reader
+class RS_FdoFeatureReader : public RS_FeatureReader
+{
+public:
+ virtual FdoIFeatureReader* GetInternalReader() = 0;
+};
+
+#endif
\ No newline at end of file
Modified: sandbox/jng/common_decouple/Common/Stylization/RS_FeatureReader.h
===================================================================
--- sandbox/jng/common_decouple/Common/Stylization/RS_FeatureReader.h 2018-03-04 05:25:50 UTC (rev 9353)
+++ sandbox/jng/common_decouple/Common/Stylization/RS_FeatureReader.h 2018-03-04 12:27:16 UTC (rev 9354)
@@ -21,7 +21,7 @@
#include "LineBuffer.h"
#include "CSysTransformer.h"
#include "RS_Raster.h"
-#include <Fdo.h>
+#include "RS_Types.h"
// Defines a feature data reader interface.
class RS_FeatureReader
@@ -33,13 +33,13 @@
virtual bool IsNull (const wchar_t* propertyName) = 0;
virtual bool GetBoolean (const wchar_t* propertyName) = 0;
- virtual FdoInt8 GetByte (const wchar_t* propertyName) = 0;
- virtual FdoDateTime GetDateTime (const wchar_t* propertyName) = 0;
+ virtual RS_Int8 GetByte (const wchar_t* propertyName) = 0;
+ virtual RS_DateTime GetDateTime (const wchar_t* propertyName) = 0;
virtual float GetSingle (const wchar_t* propertyName) = 0;
virtual double GetDouble (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 RS_Int16 GetInt16 (const wchar_t* propertyName) = 0;
+ virtual RS_Int32 GetInt32 (const wchar_t* propertyName) = 0;
+ virtual RS_Int64 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;
@@ -52,8 +52,6 @@
virtual const wchar_t* GetRasterPropName() = 0;
virtual const wchar_t* const* GetIdentPropNames(int& count) = 0;
virtual const wchar_t* const* GetPropNames (int& count) = 0;
-
- virtual FdoIFeatureReader* GetInternalReader() = 0;
};
#endif
Added: sandbox/jng/common_decouple/Common/Stylization/RS_Types.h
===================================================================
--- sandbox/jng/common_decouple/Common/Stylization/RS_Types.h (rev 0)
+++ sandbox/jng/common_decouple/Common/Stylization/RS_Types.h 2018-03-04 12:27:16 UTC (rev 9354)
@@ -0,0 +1,28 @@
+//
+// Copyright (C) 2004-2018 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
+//
+#ifndef RS_TYPES_H_
+#define RS_TYPES_H_
+
+#include "FdoStylizationCommon.h"
+
+typedef FdoInt8 RS_Int8;
+typedef FdoInt16 RS_Int16;
+typedef FdoInt32 RS_Int32;
+typedef FdoInt64 RS_Int64;
+typedef FdoDateTime RS_DateTime;
+
+#endif
\ No newline at end of file
Modified: sandbox/jng/common_decouple/Common/Stylization/Stylization.vcxproj
===================================================================
--- sandbox/jng/common_decouple/Common/Stylization/Stylization.vcxproj 2018-03-04 05:25:50 UTC (rev 9353)
+++ sandbox/jng/common_decouple/Common/Stylization/Stylization.vcxproj 2018-03-04 12:27:16 UTC (rev 9354)
@@ -334,6 +334,8 @@
<ClInclude Include="Point2D.h" />
<ClInclude Include="Point3D.h" />
<ClInclude Include="PolygonUtils.h" />
+ <ClInclude Include="RS_FdoFeatureReader.h" />
+ <ClInclude Include="RS_Types.h" />
<ClInclude Include="SE_Evaluator.h" />
<ClInclude Include="Vector2D.h" />
<ClInclude Include="Vector3D.h" />
Modified: sandbox/jng/common_decouple/Common/Stylization/Stylization.vcxproj.filters
===================================================================
--- sandbox/jng/common_decouple/Common/Stylization/Stylization.vcxproj.filters 2018-03-04 05:25:50 UTC (rev 9353)
+++ sandbox/jng/common_decouple/Common/Stylization/Stylization.vcxproj.filters 2018-03-04 12:27:16 UTC (rev 9354)
@@ -623,6 +623,12 @@
<ClInclude Include="FdoStylizationCommon.h">
<Filter>ExpressionEngine</Filter>
</ClInclude>
+ <ClInclude Include="RS_Types.h">
+ <Filter>Interfaces</Filter>
+ </ClInclude>
+ <ClInclude Include="RS_FdoFeatureReader.h">
+ <Filter>Interfaces</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="Stylization.rc" />
Modified: sandbox/jng/common_decouple/Server/src/Services/Mapping/RSMgFeatureReader.h
===================================================================
--- sandbox/jng/common_decouple/Server/src/Services/Mapping/RSMgFeatureReader.h 2018-03-04 05:25:50 UTC (rev 9353)
+++ sandbox/jng/common_decouple/Server/src/Services/Mapping/RSMgFeatureReader.h 2018-03-04 12:27:16 UTC (rev 9354)
@@ -18,7 +18,7 @@
#ifndef RSMGFEATUREREADER_H
#define RSMGFEATUREREADER_H
-#include "RS_FeatureReader.h"
+#include "RS_FdoFeatureReader.h"
struct PropertyStub
{
@@ -34,7 +34,7 @@
class RS_InputStream;
//RS_FeatureReader implementation based on an MgFeatureReader
-class MG_SERVER_MAPPING_API RSMgFeatureReader : public RS_FeatureReader
+class MG_SERVER_MAPPING_API RSMgFeatureReader : public RS_FdoFeatureReader
{
public:
RSMgFeatureReader(MgFeatureReader* reader, MgFeatureService* svcFeature, MgResourceIdentifier* featResId, MgFeatureQueryOptions* options, const STRING& geomPropName);
Modified: sandbox/jng/common_decouple/Server/src/Services/Rendering/FeaturePropRenderer.cpp
===================================================================
--- sandbox/jng/common_decouple/Server/src/Services/Rendering/FeaturePropRenderer.cpp 2018-03-04 05:25:50 UTC (rev 9353)
+++ sandbox/jng/common_decouple/Server/src/Services/Rendering/FeaturePropRenderer.cpp 2018-03-04 12:27:16 UTC (rev 9354)
@@ -95,10 +95,11 @@
featureProps->Add(boundingBoxProperty);
}
+ RS_FdoFeatureReader* frdr = dynamic_cast<RS_FdoFeatureReader*>(feature);
//Add geometry if we're instructed to capture it
- if (m_bCaptureGeometry)
+ if (m_bCaptureGeometry && NULL != frdr)
{
- FdoPtr<FdoIFeatureReader> fr = feature->GetInternalReader();
+ FdoPtr<FdoIFeatureReader> fr = frdr->GetInternalReader();
const FdoString* geomName = m_fcInfo->geometry().c_str();
Ptr<MgGeometryProperty> geomProp = new MgGeometryProperty();
//Not using geometry prop name here as we want to specially denote the designated geometry value
More information about the mapguide-commits
mailing list