[mapguide-commits] r9476 - in sandbox/jng/common_decouple_v3: Common/MdfModel Common/MdfModel/Common Common/MdfParser Common/MdfParser/PrintLayout Common/Renderers Common/Stylization Server/src/Services/Kml Server/src/Services/Mapping Server/src/Services/Rendering
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Tue Feb 5 07:26:24 PST 2019
Author: jng
Date: 2019-02-05 07:26:24 -0800 (Tue, 05 Feb 2019)
New Revision: 9476
Modified:
sandbox/jng/common_decouple_v3/Common/MdfModel/AreaUsage.cpp
sandbox/jng/common_decouple_v3/Common/MdfModel/AreaUsage.h
sandbox/jng/common_decouple_v3/Common/MdfModel/Common/StringObject.cpp
sandbox/jng/common_decouple_v3/Common/MdfModel/Common/StringObject.h
sandbox/jng/common_decouple_v3/Common/MdfModel/FontSymbol.cpp
sandbox/jng/common_decouple_v3/Common/MdfModel/FontSymbol.h
sandbox/jng/common_decouple_v3/Common/MdfModel/GraphicElement.cpp
sandbox/jng/common_decouple_v3/Common/MdfModel/GraphicElement.h
sandbox/jng/common_decouple_v3/Common/MdfModel/LengthConverter.cpp
sandbox/jng/common_decouple_v3/Common/MdfModel/LengthConverter.h
sandbox/jng/common_decouple_v3/Common/MdfModel/LineUsage.cpp
sandbox/jng/common_decouple_v3/Common/MdfModel/LineUsage.h
sandbox/jng/common_decouple_v3/Common/MdfModel/MdfModel.h
sandbox/jng/common_decouple_v3/Common/MdfModel/Path.cpp
sandbox/jng/common_decouple_v3/Common/MdfModel/Path.h
sandbox/jng/common_decouple_v3/Common/MdfModel/PointUsage.cpp
sandbox/jng/common_decouple_v3/Common/MdfModel/PointUsage.h
sandbox/jng/common_decouple_v3/Common/MdfModel/ResizeBox.cpp
sandbox/jng/common_decouple_v3/Common/MdfModel/ResizeBox.h
sandbox/jng/common_decouple_v3/Common/MdfModel/SymbolInstance.cpp
sandbox/jng/common_decouple_v3/Common/MdfModel/SymbolInstance.h
sandbox/jng/common_decouple_v3/Common/MdfModel/Text.cpp
sandbox/jng/common_decouple_v3/Common/MdfModel/Text.h
sandbox/jng/common_decouple_v3/Common/MdfModel/UnicodeString.cpp
sandbox/jng/common_decouple_v3/Common/MdfModel/UnicodeString.h
sandbox/jng/common_decouple_v3/Common/MdfModel/VectorScaleRange.cpp
sandbox/jng/common_decouple_v3/Common/MdfParser/IOUnknown.cpp
sandbox/jng/common_decouple_v3/Common/MdfParser/PrintLayout/IOPrintLayoutElementCollection.h
sandbox/jng/common_decouple_v3/Common/MdfParser/PrintLayout/IOPropertyMappingCollection.h
sandbox/jng/common_decouple_v3/Common/Renderers/AGGRenderer.cpp
sandbox/jng/common_decouple_v3/Common/Renderers/FontManager.cpp
sandbox/jng/common_decouple_v3/Common/Renderers/FontManager.h
sandbox/jng/common_decouple_v3/Common/Renderers/GDRenderer.cpp
sandbox/jng/common_decouple_v3/Common/Renderers/KmlContent.cpp
sandbox/jng/common_decouple_v3/Common/Renderers/UTFGridContent.h
sandbox/jng/common_decouple_v3/Common/Stylization/Band.h
sandbox/jng/common_decouple_v3/Common/Stylization/BandData.h
sandbox/jng/common_decouple_v3/Common/Stylization/DefaultStylizer.cpp
sandbox/jng/common_decouple_v3/Common/Stylization/DefaultStylizer.h
sandbox/jng/common_decouple_v3/Common/Stylization/GeometryAdapter.cpp
sandbox/jng/common_decouple_v3/Common/Stylization/GeometryAdapter.h
sandbox/jng/common_decouple_v3/Common/Stylization/GridData.cpp
sandbox/jng/common_decouple_v3/Common/Stylization/GridData.h
sandbox/jng/common_decouple_v3/Common/Stylization/GridStyleColorHandler.cpp
sandbox/jng/common_decouple_v3/Common/Stylization/KeyEncode.cpp
sandbox/jng/common_decouple_v3/Common/Stylization/KeyEncode.h
sandbox/jng/common_decouple_v3/Common/Stylization/LabelRenderer.cpp
sandbox/jng/common_decouple_v3/Common/Stylization/LabelRendererLocal.cpp
sandbox/jng/common_decouple_v3/Common/Stylization/MathHelper.h
sandbox/jng/common_decouple_v3/Common/Stylization/PolylineAdapter.h
sandbox/jng/common_decouple_v3/Common/Stylization/RS_FdoFeatureReader.h
sandbox/jng/common_decouple_v3/Common/Stylization/RS_Font.h
sandbox/jng/common_decouple_v3/Common/Stylization/RS_Raster.h
sandbox/jng/common_decouple_v3/Common/Stylization/RS_Types.h
sandbox/jng/common_decouple_v3/Common/Stylization/RasterAdapter.cpp
sandbox/jng/common_decouple_v3/Common/Stylization/RasterAdapter.h
sandbox/jng/common_decouple_v3/Common/Stylization/SE_ExpressionBase.cpp
sandbox/jng/common_decouple_v3/Common/Stylization/Stylization.h
sandbox/jng/common_decouple_v3/Common/Stylization/Stylization.vcxproj
sandbox/jng/common_decouple_v3/Common/Stylization/StylizationEngine.cpp
sandbox/jng/common_decouple_v3/Common/Stylization/StylizationEngine.h
sandbox/jng/common_decouple_v3/Common/Stylization/StylizationUtil.cpp
sandbox/jng/common_decouple_v3/Common/Stylization/Stylizer.cpp
sandbox/jng/common_decouple_v3/Common/Stylization/Stylizer.h
sandbox/jng/common_decouple_v3/Server/src/Services/Kml/ServerKmlService.vcxproj
sandbox/jng/common_decouple_v3/Server/src/Services/Mapping/RSMgRaster.cpp
sandbox/jng/common_decouple_v3/Server/src/Services/Mapping/RSMgRaster.h
sandbox/jng/common_decouple_v3/Server/src/Services/Mapping/ServerMappingService.vcxproj
sandbox/jng/common_decouple_v3/Server/src/Services/Rendering/ServerRenderingService.vcxproj
Log:
This mega-submission continues the refactoring/decoupling work from the v2 sandbox:
- Do not "using namespace std" in common headers. This obviously broke a whole bunch of places where these headers were included, and in such places the necessary std:: qualifier was added.
- Introduce new typedefs in MdfModel
- MdfCStr, a typedef for const wchar_t. Replace all existing "const wchar_t" references with this new typedef.
- MDF_STR() a macro that all is used for all string literals throughout the MdfModel project
- Remove references to "Foundation.h" from all headers. Only FDO expression function implementations need to include this (for string bundle access)
- More fwd declares
- Introduce a new WITH_FDO preprocessor symbol in Stylization. Usages of FDO are #ifdef'd by this new symbol.
- Define the symbol in Stylization and all consuming server projects.
- Expand the RS_Types.h header by providing:
- Alternative definitions for RS_Byte/Int8/Int16/Int32/Int64/DateTime should WITH_FDO not be defined
- Neutral 1:1 definitions of the following FDO enums:
- FdoRasterDataType (RS_RasterDataType)
- FdoRasterDataModelType (RS_RasterDataModelType)
- FdoDataType (RS_DataType)
- Fix up most of the Renderers/Stylization codebase so that usages of FDO-specific typedefs and enums are replaced with their "neutral" RS equivalents (eg. FdoInt32 -> RS_Int32, FdoGeometryType -> GeometryType, etc)
Modified: sandbox/jng/common_decouple_v3/Common/MdfModel/AreaUsage.cpp
===================================================================
--- sandbox/jng/common_decouple_v3/Common/MdfModel/AreaUsage.cpp 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/MdfModel/AreaUsage.cpp 2019-02-05 15:26:24 UTC (rev 9476)
@@ -26,12 +26,12 @@
using namespace MDFMODEL_NAMESPACE;
// initialize values for string properties
-const wchar_t* AreaUsage::sAngleControlDefault = L"'FromAngle'"; // NOXLATE
-const wchar_t* AreaUsage::sAngleControlValues = L"FromAngle|FromGeometry"; // NOXLATE
-const wchar_t* AreaUsage::sOriginControlDefault = L"'Global'"; // NOXLATE
-const wchar_t* AreaUsage::sOriginControlValues = L"Global|Local|Centroid"; // NOXLATE
-const wchar_t* AreaUsage::sClippingControlDefault = L"'Clip'"; // NOXLATE
-const wchar_t* AreaUsage::sClippingControlValues = L"Clip|Inside|Overlap"; // NOXLATE
+MdfCStr* AreaUsage::sAngleControlDefault = MDF_STR("'FromAngle'"); // NOXLATE
+MdfCStr* AreaUsage::sAngleControlValues = MDF_STR("FromAngle|FromGeometry"); // NOXLATE
+MdfCStr* AreaUsage::sOriginControlDefault = MDF_STR("'Global'"); // NOXLATE
+MdfCStr* AreaUsage::sOriginControlValues = MDF_STR("Global|Local|Centroid"); // NOXLATE
+MdfCStr* AreaUsage::sClippingControlDefault = MDF_STR("'Clip'"); // NOXLATE
+MdfCStr* AreaUsage::sClippingControlValues = MDF_STR("Clip|Inside|Overlap"); // NOXLATE
//-------------------------------------------------------------------------
@@ -44,12 +44,12 @@
this->m_sAngleControl = AreaUsage::sAngleControlDefault;
this->m_sOriginControl = AreaUsage::sOriginControlDefault;
this->m_sClippingControl = AreaUsage::sClippingControlDefault;
- this->m_sAngle = L"0.0"; // NOXLATE
- this->m_sOriginX = L"0.0"; // NOXLATE
- this->m_sOriginY = L"0.0"; // NOXLATE
- this->m_sRepeatX = L"0.0"; // NOXLATE
- this->m_sRepeatY = L"0.0"; // NOXLATE
- this->m_sBufferWidth = L"0.0"; // NOXLATE
+ this->m_sAngle = MDF_STR("0.0"); // NOXLATE
+ this->m_sOriginX = MDF_STR("0.0"); // NOXLATE
+ this->m_sOriginY = MDF_STR("0.0"); // NOXLATE
+ this->m_sRepeatX = MDF_STR("0.0"); // NOXLATE
+ this->m_sRepeatY = MDF_STR("0.0"); // NOXLATE
+ this->m_sBufferWidth = MDF_STR("0.0"); // NOXLATE
}
//-------------------------------------------------------------------------
Modified: sandbox/jng/common_decouple_v3/Common/MdfModel/AreaUsage.h
===================================================================
--- sandbox/jng/common_decouple_v3/Common/MdfModel/AreaUsage.h 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/MdfModel/AreaUsage.h 2019-02-05 15:26:24 UTC (rev 9476)
@@ -30,12 +30,12 @@
{
public:
// Used with string properties
- static const wchar_t* sAngleControlDefault;
- static const wchar_t* sAngleControlValues;
- static const wchar_t* sOriginControlDefault;
- static const wchar_t* sOriginControlValues;
- static const wchar_t* sClippingControlDefault;
- static const wchar_t* sClippingControlValues;
+ static MdfCStr* sAngleControlDefault;
+ static MdfCStr* sAngleControlValues;
+ static MdfCStr* sOriginControlDefault;
+ static MdfCStr* sOriginControlValues;
+ static MdfCStr* sClippingControlDefault;
+ static MdfCStr* sClippingControlValues;
public:
// Construction, destruction, initialization
Modified: sandbox/jng/common_decouple_v3/Common/MdfModel/Common/StringObject.cpp
===================================================================
--- sandbox/jng/common_decouple_v3/Common/MdfModel/Common/StringObject.cpp 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/MdfModel/Common/StringObject.cpp 2019-02-05 15:26:24 UTC (rev 9476)
@@ -32,7 +32,7 @@
//-------------------------------------------------------------------------
// PURPOSE: Constructor. Initialize the StringObject class with a specific resource ID.
//-------------------------------------------------------------------------
-StringObject::StringObject(const wchar_t* str) :
+StringObject::StringObject(MdfCStr* str) :
m_str(str)
{
}
Modified: sandbox/jng/common_decouple_v3/Common/MdfModel/Common/StringObject.h
===================================================================
--- sandbox/jng/common_decouple_v3/Common/MdfModel/Common/StringObject.h 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/MdfModel/Common/StringObject.h 2019-02-05 15:26:24 UTC (rev 9476)
@@ -31,7 +31,7 @@
public:
// Constructor(s)/Destructor
StringObject();
- explicit StringObject(const wchar_t* str);
+ explicit StringObject(MdfCStr* str);
virtual ~StringObject();
// Operations
Modified: sandbox/jng/common_decouple_v3/Common/MdfModel/FontSymbol.cpp
===================================================================
--- sandbox/jng/common_decouple_v3/Common/MdfModel/FontSymbol.cpp 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/MdfModel/FontSymbol.cpp 2019-02-05 15:26:24 UTC (rev 9476)
@@ -75,7 +75,7 @@
// PURPOSE: Access the character that is to be displayed in the given font.
// RETURNS: An unsigned int from 0 to 255
//-------------------------------------------------------------------------
-const wchar_t FontSymbol::GetCharacter() const
+MdfCStr FontSymbol::GetCharacter() const
{
return this->m_character;
}
@@ -86,7 +86,7 @@
// Input:
// character - an unsigned int from 0 to 255.
//-------------------------------------------------------------------------
-void FontSymbol::SetCharacter(const wchar_t character)
+void FontSymbol::SetCharacter(MdfCStr character)
{
this->m_character = character;
}
Modified: sandbox/jng/common_decouple_v3/Common/MdfModel/FontSymbol.h
===================================================================
--- sandbox/jng/common_decouple_v3/Common/MdfModel/FontSymbol.h 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/MdfModel/FontSymbol.h 2019-02-05 15:26:24 UTC (rev 9476)
@@ -43,8 +43,8 @@
void SetFontName(const MdfString& strFontName);
// Property : Character
- const wchar_t GetCharacter() const;
- void SetCharacter(const wchar_t character);
+ MdfCStr GetCharacter() const;
+ void SetCharacter(MdfCStr character);
// Property : ForegroundColor
const MdfString& GetForegroundColor() const;
Modified: sandbox/jng/common_decouple_v3/Common/MdfModel/GraphicElement.cpp
===================================================================
--- sandbox/jng/common_decouple_v3/Common/MdfModel/GraphicElement.cpp 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/MdfModel/GraphicElement.cpp 2019-02-05 15:26:24 UTC (rev 9476)
@@ -26,8 +26,8 @@
using namespace MDFMODEL_NAMESPACE;
// initialize values for string properties
-const wchar_t* GraphicElement::sResizeControlDefault = L"'ResizeNone'"; // NOXLATE
-const wchar_t* GraphicElement::sResizeControlValues = L"ResizeNone|AddToResizeBox|AdjustToResizeBox"; // NOXLATE
+MdfCStr* GraphicElement::sResizeControlDefault = L"'ResizeNone'"; // NOXLATE
+MdfCStr* GraphicElement::sResizeControlValues = L"ResizeNone|AddToResizeBox|AdjustToResizeBox"; // NOXLATE
//-------------------------------------------------------------------------
Modified: sandbox/jng/common_decouple_v3/Common/MdfModel/GraphicElement.h
===================================================================
--- sandbox/jng/common_decouple_v3/Common/MdfModel/GraphicElement.h 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/MdfModel/GraphicElement.h 2019-02-05 15:26:24 UTC (rev 9476)
@@ -33,8 +33,8 @@
{
public:
// Used with string properties
- static const wchar_t* sResizeControlDefault;
- static const wchar_t* sResizeControlValues;
+ static MdfCStr* sResizeControlDefault;
+ static MdfCStr* sResizeControlValues;
public:
// Destruction
Modified: sandbox/jng/common_decouple_v3/Common/MdfModel/LengthConverter.cpp
===================================================================
--- sandbox/jng/common_decouple_v3/Common/MdfModel/LengthConverter.cpp 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/MdfModel/LengthConverter.cpp 2019-02-05 15:26:24 UTC (rev 9476)
@@ -141,7 +141,7 @@
// analyzes the provided English word dand returns its correlating units.
// used when serializing and parsing MDF files that contain unit information.
-LengthUnit LengthConverter::EnglishToUnit(const wchar_t* english)
+LengthUnit LengthConverter::EnglishToUnit(MdfCStr* english)
{
LengthUnit unit = Meters; // default, in case of bad input
Modified: sandbox/jng/common_decouple_v3/Common/MdfModel/LengthConverter.h
===================================================================
--- sandbox/jng/common_decouple_v3/Common/MdfModel/LengthConverter.h 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/MdfModel/LengthConverter.h 2019-02-05 15:26:24 UTC (rev 9476)
@@ -42,7 +42,7 @@
static double UnitToMeters(LengthUnit unit, double val);
static double MetersToUnit(LengthUnit unit, double val);
- static LengthUnit EnglishToUnit(const wchar_t* english);
+ static LengthUnit EnglishToUnit(MdfCStr* english);
static MdfString* UnitToEnglish(LengthUnit units);
};
Modified: sandbox/jng/common_decouple_v3/Common/MdfModel/LineUsage.cpp
===================================================================
--- sandbox/jng/common_decouple_v3/Common/MdfModel/LineUsage.cpp 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/MdfModel/LineUsage.cpp 2019-02-05 15:26:24 UTC (rev 9476)
@@ -26,15 +26,15 @@
using namespace MDFMODEL_NAMESPACE;
// initialize values for string properties
-const wchar_t* LineUsage::sAngleControlDefault = L"'FromGeometry'"; // NOXLATE
-const wchar_t* LineUsage::sAngleControlValues = L"FromAngle|FromGeometry"; // NOXLATE
-const wchar_t* LineUsage::sUnitsControlDefault = L"'Absolute'"; // NOXLATE
-const wchar_t* LineUsage::sUnitsControlValues = L"Absolute|Parametric"; // NOXLATE
-const wchar_t* LineUsage::sVertexControlDefault10 = L"'OverlapNone'"; // NOXLATE - default for version 1.0.0
-const wchar_t* LineUsage::sVertexControlDefault = L"'OverlapWrap'"; // NOXLATE - default for version 1.1.0 and higher
-const wchar_t* LineUsage::sVertexControlValues = L"OverlapNone|OverlapDirect|OverlapNoWrap|OverlapWrap"; // NOXLATE
-const wchar_t* LineUsage::sVertexJoinDefault = L"'Round'"; // NOXLATE
-const wchar_t* LineUsage::sVertexJoinValues = L"None|Bevel|Round|Miter"; // NOXLATE
+MdfCStr* LineUsage::sAngleControlDefault = MDF_STR("'FromGeometry'"); // NOXLATE
+MdfCStr* LineUsage::sAngleControlValues = MDF_STR("FromAngle|FromGeometry"); // NOXLATE
+MdfCStr* LineUsage::sUnitsControlDefault = MDF_STR("'Absolute'"); // NOXLATE
+MdfCStr* LineUsage::sUnitsControlValues = MDF_STR("Absolute|Parametric"); // NOXLATE
+MdfCStr* LineUsage::sVertexControlDefault10 = MDF_STR("'OverlapNone'"); // NOXLATE - default for version 1.0.0
+MdfCStr* LineUsage::sVertexControlDefault = MDF_STR("'OverlapWrap'"); // NOXLATE - default for version 1.1.0 and higher
+MdfCStr* LineUsage::sVertexControlValues = MDF_STR("OverlapNone|OverlapDirect|OverlapNoWrap|OverlapWrap"); // NOXLATE
+MdfCStr* LineUsage::sVertexJoinDefault = MDF_STR("'Round'"); // NOXLATE
+MdfCStr* LineUsage::sVertexJoinValues = MDF_STR("None|Bevel|Round|Miter"); // NOXLATE
//-------------------------------------------------------------------------
@@ -48,13 +48,13 @@
this->m_sAngleControl = LineUsage::sAngleControlDefault;
this->m_sUnitsControl = LineUsage::sUnitsControlDefault;
this->m_sVertexControl = LineUsage::sVertexControlDefault;
- this->m_sAngle = L"0.0"; // NOXLATE
-// this->m_sStartOffset = L""; // NOXLATE
-// this->m_sEndOffset = L""; // NOXLATE
- this->m_sRepeat = L"0.0"; // NOXLATE
- this->m_sVertexAngleLimit = L"0.0"; // NOXLATE
+ this->m_sAngle = MDF_STR("0.0"); // NOXLATE
+// this->m_sStartOffset = MDF_STR(""); // NOXLATE
+// this->m_sEndOffset = MDF_STR(""); // NOXLATE
+ this->m_sRepeat = MDF_STR("0.0"); // NOXLATE
+ this->m_sVertexAngleLimit = MDF_STR("0.0"); // NOXLATE
this->m_sVertexJoin = LineUsage::sVertexJoinDefault;
- this->m_sVertexMiterLimit = L"5.0"; // NOXLATE
+ this->m_sVertexMiterLimit = MDF_STR("5.0"); // NOXLATE
this->m_pDefaultPath = NULL;
}
Modified: sandbox/jng/common_decouple_v3/Common/MdfModel/LineUsage.h
===================================================================
--- sandbox/jng/common_decouple_v3/Common/MdfModel/LineUsage.h 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/MdfModel/LineUsage.h 2019-02-05 15:26:24 UTC (rev 9476)
@@ -31,15 +31,15 @@
{
public:
// Used with string properties
- static const wchar_t* sAngleControlDefault;
- static const wchar_t* sAngleControlValues;
- static const wchar_t* sUnitsControlDefault;
- static const wchar_t* sUnitsControlValues;
- static const wchar_t* sVertexControlDefault10;
- static const wchar_t* sVertexControlDefault;
- static const wchar_t* sVertexControlValues;
- static const wchar_t* sVertexJoinDefault;
- static const wchar_t* sVertexJoinValues;
+ static MdfCStr* sAngleControlDefault;
+ static MdfCStr* sAngleControlValues;
+ static MdfCStr* sUnitsControlDefault;
+ static MdfCStr* sUnitsControlValues;
+ static MdfCStr* sVertexControlDefault10;
+ static MdfCStr* sVertexControlDefault;
+ static MdfCStr* sVertexControlValues;
+ static MdfCStr* sVertexJoinDefault;
+ static MdfCStr* sVertexJoinValues;
public:
// Construction, destruction, initialization
Modified: sandbox/jng/common_decouple_v3/Common/MdfModel/MdfModel.h
===================================================================
--- sandbox/jng/common_decouple_v3/Common/MdfModel/MdfModel.h 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/MdfModel/MdfModel.h 2019-02-05 15:26:24 UTC (rev 9476)
@@ -59,11 +59,15 @@
#include <string>
+#define MDF_STR(x) L##x
+
BEGIN_NAMESPACE_MDFMODEL
// the MdfString is a std::wstring.
// It might be swapped out at a later date for a const wchar_t* .
typedef std::wstring MdfString; // wide string for unicode support
+
+ typedef const wchar_t MdfCStr;
END_NAMESPACE_MDFMODEL
Modified: sandbox/jng/common_decouple_v3/Common/MdfModel/Path.cpp
===================================================================
--- sandbox/jng/common_decouple_v3/Common/MdfModel/Path.cpp 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/MdfModel/Path.cpp 2019-02-05 15:26:24 UTC (rev 9476)
@@ -26,10 +26,10 @@
using namespace MDFMODEL_NAMESPACE;
// initialize values for string properties
-const wchar_t* Path::sLineCapDefault = L"'Round'"; // NOXLATE
-const wchar_t* Path::sLineCapValues = L"None|Round|Triangle|Square"; // NOXLATE
-const wchar_t* Path::sLineJoinDefault = L"'Round'"; // NOXLATE
-const wchar_t* Path::sLineJoinValues = L"None|Bevel|Round|Miter"; // NOXLATE
+MdfCStr* Path::sLineCapDefault = MDF_STR("'Round'"); // NOXLATE
+MdfCStr* Path::sLineCapValues = MDF_STR("None|Round|Triangle|Square"); // NOXLATE
+MdfCStr* Path::sLineJoinDefault = MDF_STR("'Round'"); // NOXLATE
+MdfCStr* Path::sLineJoinValues = MDF_STR("None|Bevel|Round|Miter"); // NOXLATE
//-------------------------------------------------------------------------
@@ -42,13 +42,13 @@
// this->m_sGeometry = L""; // NOXLATE
// this->m_sFillColor = L""; // NOXLATE
// this->m_sLineColor = L""; // NOXLATE
- this->m_sLineWeight = L"0.0"; // NOXLATE
- this->m_sLineWeightScalable = L"true"; // NOXLATE
+ this->m_sLineWeight = MDF_STR("0.0"); // NOXLATE
+ this->m_sLineWeightScalable = MDF_STR("true"); // NOXLATE
this->m_sLineCap = Path::sLineCapDefault;
this->m_sLineJoin = Path::sLineJoinDefault;
- this->m_sLineMiterLimit = L"5.0"; // NOXLATE
- this->m_sScaleX = L"1.0"; // NOXLATE
- this->m_sScaleY = L"1.0"; // NOXLATE
+ this->m_sLineMiterLimit = MDF_STR("5.0"); // NOXLATE
+ this->m_sScaleX = MDF_STR("1.0"); // NOXLATE
+ this->m_sScaleY = MDF_STR("1.0"); // NOXLATE
}
//-------------------------------------------------------------------------
Modified: sandbox/jng/common_decouple_v3/Common/MdfModel/Path.h
===================================================================
--- sandbox/jng/common_decouple_v3/Common/MdfModel/Path.h 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/MdfModel/Path.h 2019-02-05 15:26:24 UTC (rev 9476)
@@ -30,10 +30,10 @@
{
public:
// Used with string properties
- static const wchar_t* sLineCapDefault;
- static const wchar_t* sLineCapValues;
- static const wchar_t* sLineJoinDefault;
- static const wchar_t* sLineJoinValues;
+ static MdfCStr* sLineCapDefault;
+ static MdfCStr* sLineCapValues;
+ static MdfCStr* sLineJoinDefault;
+ static MdfCStr* sLineJoinValues;
public:
// Construction, destruction, initialization
Modified: sandbox/jng/common_decouple_v3/Common/MdfModel/PointUsage.cpp
===================================================================
--- sandbox/jng/common_decouple_v3/Common/MdfModel/PointUsage.cpp 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/MdfModel/PointUsage.cpp 2019-02-05 15:26:24 UTC (rev 9476)
@@ -26,8 +26,8 @@
using namespace MDFMODEL_NAMESPACE;
// initialize values for string properties
-const wchar_t* PointUsage::sAngleControlDefault = L"'FromAngle'"; // NOXLATE
-const wchar_t* PointUsage::sAngleControlValues = L"FromAngle|FromGeometry"; // NOXLATE
+MdfCStr* PointUsage::sAngleControlDefault = MDF_STR("'FromAngle'"); // NOXLATE
+MdfCStr* PointUsage::sAngleControlValues = MDF_STR("FromAngle|FromGeometry"); // NOXLATE
//-------------------------------------------------------------------------
@@ -38,9 +38,9 @@
// default values
// NOTE: values used in IOPointUsage::Write must match these
this->m_sAngleControl = PointUsage::sAngleControlDefault;
- this->m_sAngle = L"0.0"; // NOXLATE
- this->m_sOriginOffsetX = L"0.0"; // NOXLATE
- this->m_sOriginOffsetY = L"0.0"; // NOXLATE
+ this->m_sAngle = MDF_STR("0.0"); // NOXLATE
+ this->m_sOriginOffsetX = MDF_STR("0.0"); // NOXLATE
+ this->m_sOriginOffsetY = MDF_STR("0.0"); // NOXLATE
}
//-------------------------------------------------------------------------
Modified: sandbox/jng/common_decouple_v3/Common/MdfModel/PointUsage.h
===================================================================
--- sandbox/jng/common_decouple_v3/Common/MdfModel/PointUsage.h 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/MdfModel/PointUsage.h 2019-02-05 15:26:24 UTC (rev 9476)
@@ -30,8 +30,8 @@
{
public:
// Used with string properties
- static const wchar_t* sAngleControlDefault;
- static const wchar_t* sAngleControlValues;
+ static MdfCStr* sAngleControlDefault;
+ static MdfCStr* sAngleControlValues;
public:
// Construction, destruction, initialization
Modified: sandbox/jng/common_decouple_v3/Common/MdfModel/ResizeBox.cpp
===================================================================
--- sandbox/jng/common_decouple_v3/Common/MdfModel/ResizeBox.cpp 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/MdfModel/ResizeBox.cpp 2019-02-05 15:26:24 UTC (rev 9476)
@@ -26,8 +26,8 @@
using namespace MDFMODEL_NAMESPACE;
// initialize values for string properties
-const wchar_t* ResizeBox::sGrowControlDefault = L"'GrowInXYMaintainAspect'"; // NOXLATE
-const wchar_t* ResizeBox::sGrowControlValues = L"GrowInX|GrowInY|GrowInXY|GrowInXYMaintainAspect"; // NOXLATE
+MdfCStr* ResizeBox::sGrowControlDefault = MDF_STR("'GrowInXYMaintainAspect'"); // NOXLATE
+MdfCStr* ResizeBox::sGrowControlValues = MDF_STR("GrowInX|GrowInY|GrowInXY|GrowInXYMaintainAspect"); // NOXLATE
//-------------------------------------------------------------------------
@@ -37,10 +37,10 @@
{
// default values
// NOTE: values used in IOResizeBox::Write must match these
- this->m_sSizeX = L"1.0"; // NOXLATE
- this->m_sSizeY = L"1.0"; // NOXLATE
- this->m_sPositionX = L"0.0"; // NOXLATE
- this->m_sPositionY = L"0.0"; // NOXLATE
+ this->m_sSizeX = MDF_STR("1.0"); // NOXLATE
+ this->m_sSizeY = MDF_STR("1.0"); // NOXLATE
+ this->m_sPositionX = MDF_STR("0.0"); // NOXLATE
+ this->m_sPositionY = MDF_STR("0.0"); // NOXLATE
this->m_sGrowControl = ResizeBox::sGrowControlDefault;
}
Modified: sandbox/jng/common_decouple_v3/Common/MdfModel/ResizeBox.h
===================================================================
--- sandbox/jng/common_decouple_v3/Common/MdfModel/ResizeBox.h 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/MdfModel/ResizeBox.h 2019-02-05 15:26:24 UTC (rev 9476)
@@ -30,8 +30,8 @@
{
public:
// Used with string properties
- static const wchar_t* sGrowControlDefault;
- static const wchar_t* sGrowControlValues;
+ static MdfCStr* sGrowControlDefault;
+ static MdfCStr* sGrowControlValues;
public:
// Construction, destruction, initialization
Modified: sandbox/jng/common_decouple_v3/Common/MdfModel/SymbolInstance.cpp
===================================================================
--- sandbox/jng/common_decouple_v3/Common/MdfModel/SymbolInstance.cpp 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/MdfModel/SymbolInstance.cpp 2019-02-05 15:26:24 UTC (rev 9476)
@@ -26,8 +26,8 @@
using namespace MDFMODEL_NAMESPACE;
// initialize values for string properties
-const wchar_t* SymbolInstance::sPositioningAlgorithmDefault = L""; // NOXLATE
-const wchar_t* SymbolInstance::sPositioningAlgorithmValues = L"Default|EightSurrounding|PathLabels"; // NOXLATE
+MdfCStr* SymbolInstance::sPositioningAlgorithmDefault = MDF_STR(""); // NOXLATE
+MdfCStr* SymbolInstance::sPositioningAlgorithmValues = MDF_STR("Default|EightSurrounding|PathLabels"); // NOXLATE
//-------------------------------------------------------------------------
@@ -37,17 +37,17 @@
{
// default values
// NOTE: values used in IOSymbolInstance::Write must match these
-// this->m_sResourceId = L""; // NOXLATE
- this->m_sScaleX = L"1.0"; // NOXLATE
- this->m_sScaleY = L"1.0"; // NOXLATE
- this->m_sInsertionOffsetX = L"0.0"; // NOXLATE
- this->m_sInsertionOffsetY = L"0.0"; // NOXLATE
+// this->m_sResourceId = MDF_STR(""); // NOXLATE
+ this->m_sScaleX = MDF_STR("1.0"); // NOXLATE
+ this->m_sScaleY = MDF_STR("1.0"); // NOXLATE
+ this->m_sInsertionOffsetX = MDF_STR("0.0"); // NOXLATE
+ this->m_sInsertionOffsetY = MDF_STR("0.0"); // NOXLATE
this->m_eSizeContext = DeviceUnits;
- this->m_sDrawLast = L"false"; // NOXLATE
- this->m_sCheckExclusionRegion = L"false"; // NOXLATE
- this->m_sAddToExclusionRegion = L"false"; // NOXLATE
+ this->m_sDrawLast = MDF_STR("false"); // NOXLATE
+ this->m_sCheckExclusionRegion = MDF_STR("false"); // NOXLATE
+ this->m_sAddToExclusionRegion = MDF_STR("false"); // NOXLATE
// this->m_sPositioningAlgorithm = sPositioningAlgorithmDefault;
- this->m_sRenderingPass = L"0"; // NOXLATE
+ this->m_sRenderingPass = MDF_STR("0"); // NOXLATE
this->m_eUsageContext = ucUnspecified;
this->m_eGeometryContext = gcUnspecified;
Modified: sandbox/jng/common_decouple_v3/Common/MdfModel/SymbolInstance.h
===================================================================
--- sandbox/jng/common_decouple_v3/Common/MdfModel/SymbolInstance.h 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/MdfModel/SymbolInstance.h 2019-02-05 15:26:24 UTC (rev 9476)
@@ -34,8 +34,8 @@
{
public:
// Used with string properties
- static const wchar_t* sPositioningAlgorithmDefault;
- static const wchar_t* sPositioningAlgorithmValues;
+ static MdfCStr* sPositioningAlgorithmDefault;
+ static MdfCStr* sPositioningAlgorithmValues;
public:
// Describes the usage context for the symbol instance
Modified: sandbox/jng/common_decouple_v3/Common/MdfModel/Text.cpp
===================================================================
--- sandbox/jng/common_decouple_v3/Common/MdfModel/Text.cpp 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/MdfModel/Text.cpp 2019-02-05 15:26:24 UTC (rev 9476)
@@ -26,17 +26,17 @@
using namespace MDFMODEL_NAMESPACE;
// initialize values for string properties
-const wchar_t* Text::sHAlignmentDefault = L"'Center'"; // NOXLATE
-const wchar_t* Text::sHAlignmentValues = L"Left|Center|Right"; // NOXLATE
-const wchar_t* Text::sVAlignmentDefault = L"'Halfline'"; // NOXLATE
-const wchar_t* Text::sVAlignmentValues = L"Bottom|Baseline|Halfline|Capline|Top"; // NOXLATE
-const wchar_t* Text::sJustificationDefault = L"'FromAlignment'"; // NOXLATE
-const wchar_t* Text::sJustificationValues = L"Left|Center|Right|Justified|FromAlignment"; // NOXLATE
+MdfCStr* Text::sHAlignmentDefault = MDF_STR("'Center'"); // NOXLATE
+MdfCStr* Text::sHAlignmentValues = MDF_STR("Left|Center|Right"); // NOXLATE
+MdfCStr* Text::sVAlignmentDefault = MDF_STR("'Halfline'"); // NOXLATE
+MdfCStr* Text::sVAlignmentValues = MDF_STR("Bottom|Baseline|Halfline|Capline|Top"); // NOXLATE
+MdfCStr* Text::sJustificationDefault = MDF_STR("'FromAlignment'"); // NOXLATE
+MdfCStr* Text::sJustificationValues = MDF_STR("Left|Center|Right|Justified|FromAlignment"); // NOXLATE
// FontName and Markup are open-ended string properties - they only have default values,
// and not a fixed set of allowed values
-const wchar_t* Text::sFontNameDefault = L"'Arial'"; // NOXLATE
-const wchar_t* Text::sMarkupDefault = L"'Plain'"; // NOXLATE
+MdfCStr* Text::sFontNameDefault = MDF_STR("'Arial'"); // NOXLATE
+MdfCStr* Text::sMarkupDefault = MDF_STR("'Plain'"); // NOXLATE
//-------------------------------------------------------------------------
@@ -46,25 +46,25 @@
{
// default values
// NOTE: values used in IOText::Write must match these
-// this->m_sContent = L""; // NOXLATE
+// this->m_sContent = MDF_STR(""); // NOXLATE
this->m_sFontName = Text::sFontNameDefault;
- this->m_sBold = L"false"; // NOXLATE
- this->m_sItalic = L"false"; // NOXLATE
- this->m_sUnderlined = L"false"; // NOXLATE
- this->m_sOverlined = L"false"; // NOXLATE
- this->m_sObliqueAngle = L"0.0"; // NOXLATE
- this->m_sTrackSpacing = L"1.0"; // NOXLATE
- this->m_sHeight = L"4.0"; // NOXLATE
- this->m_sHeightScalable = L"true"; // NOXLATE
- this->m_sAngle = L"0.0"; // NOXLATE
- this->m_sPositionX = L"0.0"; // NOXLATE
- this->m_sPositionY = L"0.0"; // NOXLATE
+ this->m_sBold = MDF_STR("false"); // NOXLATE
+ this->m_sItalic = MDF_STR("false"); // NOXLATE
+ this->m_sUnderlined = MDF_STR("false"); // NOXLATE
+ this->m_sOverlined = MDF_STR("false"); // NOXLATE
+ this->m_sObliqueAngle = MDF_STR("0.0"); // NOXLATE
+ this->m_sTrackSpacing = MDF_STR("1.0"); // NOXLATE
+ this->m_sHeight = MDF_STR("4.0"); // NOXLATE
+ this->m_sHeightScalable = MDF_STR("true"); // NOXLATE
+ this->m_sAngle = MDF_STR("0.0"); // NOXLATE
+ this->m_sPositionX = MDF_STR("0.0"); // NOXLATE
+ this->m_sPositionY = MDF_STR("0.0"); // NOXLATE
this->m_sHAlignment = Text::sHAlignmentDefault;
this->m_sVAlignment = Text::sVAlignmentDefault;
this->m_sJustification = Text::sJustificationDefault;
- this->m_sLineSpacing = L"1.05"; // NOXLATE
- this->m_sTextColor = L"ff000000"; // NOXLATE
-// this->m_sGhostColor = L""; // NOXLATE
+ this->m_sLineSpacing = MDF_STR("1.05"); // NOXLATE
+ this->m_sTextColor = MDF_STR("ff000000"); // NOXLATE
+// this->m_sGhostColor = MDF_STR(""); // NOXLATE
this->m_sMarkup = Text::sMarkupDefault;
this->m_pFrame = NULL;
Modified: sandbox/jng/common_decouple_v3/Common/MdfModel/Text.h
===================================================================
--- sandbox/jng/common_decouple_v3/Common/MdfModel/Text.h 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/MdfModel/Text.h 2019-02-05 15:26:24 UTC (rev 9476)
@@ -31,14 +31,14 @@
{
public:
// Used with string properties
- static const wchar_t* sHAlignmentDefault;
- static const wchar_t* sHAlignmentValues;
- static const wchar_t* sVAlignmentDefault;
- static const wchar_t* sVAlignmentValues;
- static const wchar_t* sJustificationDefault;
- static const wchar_t* sJustificationValues;
- static const wchar_t* sFontNameDefault;
- static const wchar_t* sMarkupDefault;
+ static MdfCStr* sHAlignmentDefault;
+ static MdfCStr* sHAlignmentValues;
+ static MdfCStr* sVAlignmentDefault;
+ static MdfCStr* sVAlignmentValues;
+ static MdfCStr* sJustificationDefault;
+ static MdfCStr* sJustificationValues;
+ static MdfCStr* sFontNameDefault;
+ static MdfCStr* sMarkupDefault;
public:
// Construction, destruction, initialization
Modified: sandbox/jng/common_decouple_v3/Common/MdfModel/UnicodeString.cpp
===================================================================
--- sandbox/jng/common_decouple_v3/Common/MdfModel/UnicodeString.cpp 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/MdfModel/UnicodeString.cpp 2019-02-05 15:26:24 UTC (rev 9476)
@@ -68,7 +68,7 @@
}\
}
-void UnicodeString::WideCharToMultiByte(const wchar_t* uniChar, string& str)
+void UnicodeString::WideCharToMultiByte(MdfCStr* uniChar, std::string& str)
{
#ifdef _WIN32
UTFCONVERT(UTF16,UTF8)
@@ -77,7 +77,7 @@
#endif
}
-void UnicodeString::MultiByteToWideChar(const char* uniChar, wstring& str)
+void UnicodeString::MultiByteToWideChar(const char* uniChar, std::wstring& str)
{
#ifdef _WIN32
UTFCONVERT(UTF8,UTF16)
@@ -87,7 +87,7 @@
}
-void UnicodeString::UTF16toUTF8(const XMLCh* uniChar, string& str)
+void UnicodeString::UTF16toUTF8(const XMLCh* uniChar, std::string& str)
{
UTFCONVERT(UTF16,UTF8)
}
@@ -104,7 +104,7 @@
return str;
}
-void UnicodeString::UTF32toUTF8(const LCh* uniChar, string& str)
+void UnicodeString::UTF32toUTF8(const LCh* uniChar, std::string& str)
{
UTFCONVERT(UTF32,UTF8)
}
@@ -153,6 +153,6 @@
}
#ifndef _WIN32
-template class basic_string<XMLCh, unicode_traits<XMLCh> >;
-template class basic_string<LCh, unicode_traits<LCh> >;
+template class std::basic_string<XMLCh, unicode_traits<XMLCh> >;
+template class std::basic_string<LCh, unicode_traits<LCh> >;
#endif
Modified: sandbox/jng/common_decouple_v3/Common/MdfModel/UnicodeString.h
===================================================================
--- sandbox/jng/common_decouple_v3/Common/MdfModel/UnicodeString.h 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/MdfModel/UnicodeString.h 2019-02-05 15:26:24 UTC (rev 9476)
@@ -23,8 +23,6 @@
#include <cstring>
#include <cstdio>
-using namespace std;
-
// Define character type for UTF-16. This is used by Xerces C++.
#ifdef _XERCES_USES_CHAR16_T_
typedef char16_t XMLCh;
@@ -159,8 +157,8 @@
// Ideally, no one should ever have to use lstring. But it is here for completeness.
-typedef basic_string<XMLCh, unicode_traits<XMLCh> > xstring;
-typedef basic_string<LCh, unicode_traits<LCh> > lstring;
+typedef std::basic_string<XMLCh, std::unicode_traits<XMLCh> > xstring;
+typedef std::basic_string<LCh, std::unicode_traits<LCh> > lstring;
// Unicode byte code conversion class. This class contains static methods to convert
// between UTF-8, UTF-16, and UTF-32. It requires no additional libraries to function and
@@ -172,14 +170,14 @@
public:
// Platform neutral conversion routines. Compile time adjustments for Linux and Windows
- static void WideCharToMultiByte(const wchar_t* wideStr, string& mbStr);
- static void MultiByteToWideChar(const char* mbStr, wstring& wideStr);
+ static void WideCharToMultiByte(MdfCStr* wideStr, std::string& mbStr);
+ static void MultiByteToWideChar(const char* mbStr, std::wstring& wideStr);
- static void UTF16toUTF8(const XMLCh* wideStr, string& mbStr);
+ static void UTF16toUTF8(const XMLCh* wideStr, std::string& mbStr);
static void UTF8toUTF16(const char* mbStr, xstring& wideStr);
static xstring UTF8toUTF16(const char* mbStr);
- static void UTF32toUTF8(const LCh* wideStr, string& mbStr);
+ static void UTF32toUTF8(const LCh* wideStr, std::string& mbStr);
static void UTF8toUTF32(const char* mbStr, lstring& wideStr);
static void UTF32toUTF16(const LCh* wideStr, xstring& mbStr);
@@ -196,11 +194,11 @@
#ifdef _WIN32
// On Windows, wchar_t and XMLCh are both UTF-16. No conversion is necessary
# define W2X(str) (const XMLCh*) str
-# define X2W(str) (const wchar_t*) str
+# define X2W(str) (MdfCStr*) str
#else
// On Linux, wchar_t is UTF-32. Do the appropriate conversion
# define W2X(oldstr) (XMLCh*) (UnicodeString::UTF32toUTF16((const LCh*) oldstr).c_str())
-# define X2W(oldstr) (const wchar_t*) UnicodeString::UTF16toUTF32(oldstr).c_str()
+# define X2W(oldstr) (MdfCStr*) UnicodeString::UTF16toUTF32(oldstr).c_str()
#endif
#define X(str) UnicodeString::UTF8toUTF16(str).c_str()
Modified: sandbox/jng/common_decouple_v3/Common/MdfModel/VectorScaleRange.cpp
===================================================================
--- sandbox/jng/common_decouple_v3/Common/MdfModel/VectorScaleRange.cpp 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/MdfModel/VectorScaleRange.cpp 2019-02-05 15:26:24 UTC (rev 9476)
@@ -27,8 +27,6 @@
// we must undefine the max macro so the limits max function compiles correctly
#include <limits>
-using namespace std;
-#undef max
//-------------------------------------------------------------------------
// Contants : Represents the maximum value for the map scale.
Modified: sandbox/jng/common_decouple_v3/Common/MdfParser/IOUnknown.cpp
===================================================================
--- sandbox/jng/common_decouple_v3/Common/MdfParser/IOUnknown.cpp 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/MdfParser/IOUnknown.cpp 2019-02-05 15:26:24 UTC (rev 9476)
@@ -178,7 +178,7 @@
tabstr.reserve(tabCount);
tabstr.append(tabCount, L' ');
- wstring copy(unkData);
+ std::wstring copy(unkData);
// append a newline at the end if there isn't one
size_t i1 = copy.find_last_of(L"\n");
@@ -186,11 +186,11 @@
if (i1 != i2)
copy.append(L"\n");
- wstring newData;
+ std::wstring newData;
size_t start_pos = 0;
size_t end_pos = copy.find_first_of(L"\n", start_pos);
- while (end_pos != wstring::npos)
+ while (end_pos != std::wstring::npos)
{
newData.append(tabstr);
newData.append(copy, start_pos, end_pos + 1 - start_pos);
Modified: sandbox/jng/common_decouple_v3/Common/MdfParser/PrintLayout/IOPrintLayoutElementCollection.h
===================================================================
--- sandbox/jng/common_decouple_v3/Common/MdfParser/PrintLayout/IOPrintLayoutElementCollection.h 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/MdfParser/PrintLayout/IOPrintLayoutElementCollection.h 2019-02-05 15:26:24 UTC (rev 9476)
@@ -42,7 +42,7 @@
IOPrintLayoutElementCollection& operator=(const IOPrintLayoutElementCollection&);
PrintLayoutElementCollection* m_layoutElems;
- auto_ptr<PrintLayoutElement> m_currElem;
+ std::auto_ptr<PrintLayoutElement> m_currElem;
};
END_NAMESPACE_MDFPARSER
Modified: sandbox/jng/common_decouple_v3/Common/MdfParser/PrintLayout/IOPropertyMappingCollection.h
===================================================================
--- sandbox/jng/common_decouple_v3/Common/MdfParser/PrintLayout/IOPropertyMappingCollection.h 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/MdfParser/PrintLayout/IOPropertyMappingCollection.h 2019-02-05 15:26:24 UTC (rev 9476)
@@ -42,7 +42,7 @@
IOPropertyMappingCollection& operator=(const IOPropertyMappingCollection&);
PropertyMappingCollection* m_propMappings;
- auto_ptr<PropertyMapping> m_currMapping;
+ std::auto_ptr<PropertyMapping> m_currMapping;
};
END_NAMESPACE_MDFPARSER
Modified: sandbox/jng/common_decouple_v3/Common/Renderers/AGGRenderer.cpp
===================================================================
--- sandbox/jng/common_decouple_v3/Common/Renderers/AGGRenderer.cpp 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/Renderers/AGGRenderer.cpp 2019-02-05 15:26:24 UTC (rev 9476)
@@ -1780,12 +1780,12 @@
// sanity check - cannot clip against these types
switch (polygon->geom_type())
{
- case FdoGeometryType_Point:
- case FdoGeometryType_MultiPoint:
- case FdoGeometryType_LineString:
- case FdoGeometryType_MultiLineString:
- case FdoGeometryType_CurveString:
- case FdoGeometryType_MultiCurveString:
+ case GeometryType_Point:
+ case GeometryType_MultiPoint:
+ case GeometryType_LineString:
+ case GeometryType_MultiLineString:
+ case GeometryType_CurveString:
+ case GeometryType_MultiCurveString:
return;
}
c()->bPolyClip = true;
@@ -1927,12 +1927,12 @@
// can't apply an area style to point and linestring geometry types
switch (featGeom->geom_type())
{
- case FdoGeometryType_Point:
- case FdoGeometryType_MultiPoint:
- case FdoGeometryType_LineString:
- case FdoGeometryType_MultiLineString:
- case FdoGeometryType_CurveString:
- case FdoGeometryType_MultiCurveString:
+ case GeometryType_Point:
+ case GeometryType_MultiPoint:
+ case GeometryType_LineString:
+ case GeometryType_MultiLineString:
+ case GeometryType_CurveString:
+ case GeometryType_MultiCurveString:
return;
}
Modified: sandbox/jng/common_decouple_v3/Common/Renderers/FontManager.cpp
===================================================================
--- sandbox/jng/common_decouple_v3/Common/Renderers/FontManager.cpp 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/Renderers/FontManager.cpp 2019-02-05 15:26:24 UTC (rev 9476)
@@ -36,9 +36,9 @@
// local functions
-wstring ToLower(const wstring& source)
+std::wstring ToLower(const std::wstring& source)
{
- wstring lower = source;
+ std::wstring lower = source;
std::transform(lower.begin(), lower.end(), lower.begin(), ::towlower);
return lower;
}
@@ -163,7 +163,7 @@
wchar_t fontpath[MAX_PATH];
HRESULT hres = SHGetFolderPath(NULL, CSIDL_FONTS, NULL, 0, fontpath);
- wstring fontdir;
+ std::wstring fontdir;
if (S_OK == hres)
fontdir = fontpath;
@@ -170,7 +170,7 @@
// enum fonts
if (!fontdir.empty())
{
- wstring dir(fontdir);
+ std::wstring dir(fontdir);
dir += L"\\*";
WIN32_FIND_DATA FindFileData;
@@ -185,7 +185,7 @@
// skip special Windows files
if (wcscmp(FindFileData.cFileName, L"desktop.ini") != 0)
{
- wstring entryName(fontdir);
+ std::wstring entryName(fontdir);
entryName += L"\\";
entryName += FindFileData.cFileName;
@@ -196,7 +196,7 @@
do
{
- string en;
+ std::string en;
UnicodeString::WideCharToMultiByte(entryName.c_str(), en);
error = FT_New_Face(m_library, en.c_str(), index, &face);
@@ -229,7 +229,7 @@
// list always becomes the one to beat. In the case where none of the fonts match
// (they all have the same score), this first font ends up winning. So make sure
// a reasonably good font, like Arial, is the first one in the list.
- wstring lowerName = L"arial"; // use lower-case
+ std::wstring lowerName = L"arial"; // use lower-case
RS_Font* font = (RS_Font*)FindFont(lowerName, false, false);
if (font && font->m_fullname == lowerName)
{
@@ -256,7 +256,7 @@
if (pDirent)
{
- string entryName = sFontDir;
+ std::string entryName = sFontDir;
entryName += "/";
entryName += pDirent->d_name;
@@ -279,7 +279,7 @@
num_faces = face->num_faces;
}
- wstring en;
+ std::wstring en;
UnicodeString::MultiByteToWideChar(entryName.c_str(), en);
create_font(face, index, en.c_str());
added++;
@@ -324,12 +324,12 @@
RS_Font* font = new RS_Font();
// process family name
- wstring familyname;
+ std::wstring familyname;
UnicodeString::MultiByteToWideChar(face->family_name, familyname);
familyname = ToLower(familyname);
// process style name
- wstring stylename;
+ std::wstring stylename;
UnicodeString::MultiByteToWideChar(face->style_name, stylename);
stylename = ToLower(stylename);
@@ -339,22 +339,22 @@
// this will affect font matching. The font matching checks for bold / italic
// attributes happen separately through the style flags.
size_t indStr;
- wstring repStr;
+ std::wstring repStr;
const wchar_t* empty = L"";
// remove occurrences of "regular"
repStr = L"regular";// NOXLATE
- while ((indStr = stylename.find(repStr)) != wstring::npos)
+ while ((indStr = stylename.find(repStr)) != std::wstring::npos)
stylename.replace(indStr, repStr.length(), empty, 0);
// remove occurrences of "bold"
repStr = L"bold"; // NOXLATE
- while ((indStr = stylename.find(repStr)) != wstring::npos)
+ while ((indStr = stylename.find(repStr)) != std::wstring::npos)
stylename.replace(indStr, repStr.length(), empty, 0);
// remove occurrences of "italic"
repStr = L"italic"; // NOXLATE
- while ((indStr = stylename.find(repStr)) != wstring::npos)
+ while ((indStr = stylename.find(repStr)) != std::wstring::npos)
stylename.replace(indStr, repStr.length(), empty, 0);
// remove any remaining leading / trailing whitespace
@@ -372,7 +372,7 @@
}
// process full name
- wstring fullname;
+ std::wstring fullname;
fullname += familyname;
if (!stylename.empty())
{
@@ -417,7 +417,7 @@
{
AutoMutexLocker autoLocker(sm_mutex);
- m_fontAliases.insert(FontMapPair(new wstring(alias), new wstring(asciiName)));
+ m_fontAliases.insert(FontMapPair(new std::wstring(alias), new std::wstring(asciiName)));
}
}
@@ -430,7 +430,7 @@
//
-const RS_Font* FontManager::FindFont(const wstring& sfontname, bool bold, bool italic)
+const RS_Font* FontManager::FindFont(const std::wstring& sfontname, bool bold, bool italic)
{
AutoMutexLocker autoLocker(sm_mutex);
@@ -453,7 +453,7 @@
}
}
- wstring lowername = ToLower(fontname);
+ std::wstring lowername = ToLower(fontname);
const wchar_t* buf = lowername.c_str();
int score = 0;
Modified: sandbox/jng/common_decouple_v3/Common/Renderers/FontManager.h
===================================================================
--- sandbox/jng/common_decouple_v3/Common/Renderers/FontManager.h 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/Renderers/FontManager.h 2019-02-05 15:26:24 UTC (rev 9476)
@@ -30,6 +30,7 @@
#include FT_CACHE_MANAGER_H
#include <map>
+#include <string>
typedef struct FaceMapEntry {
char* pData;
@@ -48,10 +49,10 @@
RS_Font* stylearray[4];
};
-typedef map<string, FaceMapEntryType*> FaceMap;
+typedef std::map<std::string, FaceMapEntryType*> FaceMap;
typedef FaceMap::value_type FaceMapPair;
typedef FaceMap::iterator FaceMapIterator;
-typedef map<wstring*, wstring*> FontMap;
+typedef std::map<std::wstring*, std::wstring*> FontMap;
typedef FontMap::value_type FontMapPair;
typedef FontMap::iterator FontMapIterator;
@@ -72,7 +73,7 @@
FontList* GetFontList();
- const RS_Font* FindFont(const wstring& fontname, bool bold, bool italic);
+ const RS_Font* FindFont(const std::wstring& fontname, bool bold, bool italic);
// singleton access method
RENDERERS_API static FontManager* Instance();
@@ -85,7 +86,7 @@
FontList m_fontlist;
FontMap m_fontAliases;
- map<wstring, NameCacheEntry> m_matchedCache;
+ std::map<std::wstring, NameCacheEntry> m_matchedCache;
static CustomThreadMutex sm_mutex;
static FontManager sm_manager;
Modified: sandbox/jng/common_decouple_v3/Common/Renderers/GDRenderer.cpp
===================================================================
--- sandbox/jng/common_decouple_v3/Common/Renderers/GDRenderer.cpp 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/Renderers/GDRenderer.cpp 2019-02-05 15:26:24 UTC (rev 9476)
@@ -1754,12 +1754,12 @@
// can't apply an area style to point and linestring geometry types
switch (featGeom->geom_type())
{
- case FdoGeometryType_Point:
- case FdoGeometryType_MultiPoint:
- case FdoGeometryType_LineString:
- case FdoGeometryType_MultiLineString:
- case FdoGeometryType_CurveString:
- case FdoGeometryType_MultiCurveString:
+ case GeometryType_Point:
+ case GeometryType_MultiPoint:
+ case GeometryType_LineString:
+ case GeometryType_MultiLineString:
+ case GeometryType_CurveString:
+ case GeometryType_MultiCurveString:
return;
}
Modified: sandbox/jng/common_decouple_v3/Common/Renderers/KmlContent.cpp
===================================================================
--- sandbox/jng/common_decouple_v3/Common/Renderers/KmlContent.cpp 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/Renderers/KmlContent.cpp 2019-02-05 15:26:24 UTC (rev 9476)
@@ -48,7 +48,7 @@
}
-void KmlContent::WriteString(const char* szString, streamsize length, bool lineBreak)
+void KmlContent::WriteString(const char* szString, std::streamsize length, bool lineBreak)
{
m_content.sputn(szString, length);
if (lineBreak)
Modified: sandbox/jng/common_decouple_v3/Common/Renderers/UTFGridContent.h
===================================================================
--- sandbox/jng/common_decouple_v3/Common/Renderers/UTFGridContent.h 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/Renderers/UTFGridContent.h 2019-02-05 15:26:24 UTC (rev 9476)
@@ -22,6 +22,7 @@
#include "RendererStyles.h"
#include "RS_FeatureReader.h"
#include "KeyEncode.h"
+#include <map>
#include <set>
#include <sstream>
Modified: sandbox/jng/common_decouple_v3/Common/Stylization/Band.h
===================================================================
--- sandbox/jng/common_decouple_v3/Common/Stylization/Band.h 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/Stylization/Band.h 2019-02-05 15:26:24 UTC (rev 9476)
@@ -23,7 +23,6 @@
#include "Vector3D.h"
#include "Point2D.h"
#include "Point3D.h"
-#include "Foundation.h"
#include <assert.h>
//////////////////////////////////////////////////////////////////////////
Modified: sandbox/jng/common_decouple_v3/Common/Stylization/BandData.h
===================================================================
--- sandbox/jng/common_decouple_v3/Common/Stylization/BandData.h 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/Stylization/BandData.h 2019-02-05 15:26:24 UTC (rev 9476)
@@ -17,7 +17,7 @@
#ifndef BANDDATA_H_
#define BANDDATA_H_
-#include "Foundation.h"
+
#include <assert.h>
//////////////////////////////////////////////////////////////////////////
Modified: sandbox/jng/common_decouple_v3/Common/Stylization/DefaultStylizer.cpp
===================================================================
--- sandbox/jng/common_decouple_v3/Common/Stylization/DefaultStylizer.cpp 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/Stylization/DefaultStylizer.cpp 2019-02-05 15:26:24 UTC (rev 9476)
@@ -27,7 +27,9 @@
#include "ElevationSettings.h"
#include "FeatureTypeStyleVisitor.h"
#include "StylizationEngine.h"
+#include "SE_ExpressionEvaluator.h"
#include "SE_ExpressionEvaluatorFactory.h"
+#include "RS_FeatureReader.h"
#ifdef _DEBUG
#include <cstdio>
#endif
@@ -349,6 +351,7 @@
continue;
}
}
+ #ifdef WITH_FDO
catch (FdoException* e)
{
// just move on to the next feature
@@ -356,6 +359,13 @@
LineBufferPool::FreeLineBuffer(&m_lbPool, spLB.release());
continue;
}
+ #else
+ catch (...)
+ {
+ LineBufferPool::FreeLineBuffer(&m_lbPool, spLB.release());
+ continue;
+ }
+ #endif
// if we know how to stylize this type of geometry, then go ahead
GeometryAdapter* adapter = FindGeomAdapter(lb->geom_type());
@@ -556,84 +566,4 @@
MdfModel::VectorScaleRange* scaleRange = Stylizer::FindScaleRange(*scaleRanges, mapScale);
return (NULL != scaleRange);
-}
-
-
-//////////////////////////////////////////////////////////////////////////////
-FdoFilter* DefaultStylizer::GetRulesFilter(MdfModel::VectorLayerDefinition* layer,
- double mapScale)
-{
- // look through the scale ranges to find a valid one
- MdfModel::VectorScaleRangeCollection* scaleRanges = layer->GetScaleRanges();
- MdfModel::VectorScaleRange* scaleRange = Stylizer::FindScaleRange(*scaleRanges, mapScale);
-
- // no range -- fast return, the layer is invisible at this scale
- if (NULL == scaleRange)
- return NULL;
-
- // extract all the composite styles once
- MdfModel::FeatureTypeStyleCollection* ftsc = scaleRange->GetFeatureTypeStyles();
- std::vector<CompositeTypeStyle*> compTypeStyles;
- for (int i=0; i<ftsc->GetCount(); ++i)
- {
- MdfModel::FeatureTypeStyle* fts = ftsc->GetAt(i);
- if (FeatureTypeStyleVisitor::DetermineFeatureTypeStyle(fts) == FeatureTypeStyleVisitor::ftsComposite)
- compTypeStyles.push_back((CompositeTypeStyle*)fts);
- }
-
- size_t numTypeStyles = compTypeStyles.size();
- _ASSERT(numTypeStyles > 0);
- if (numTypeStyles == 0)
- return NULL;
-
- // Build a filter by combining the filters for each rule
- MdfString filterstr;
-
- for (size_t i=0; i<numTypeStyles; ++i)
- {
- CompositeTypeStyle* style = compTypeStyles.at(i);
- RuleCollection* rulecoll = style->GetRules();
- int nRules = rulecoll->GetCount();
-
- for (int j = nRules-1; j >= 0; --j)
- {
- CompositeRule* r = static_cast<CompositeRule*>(rulecoll->GetAt(j));
- const MdfString& temp = r->GetFilter();
-
- // If any of the rules is the default rule, return an empty filter because the
- // default rule will match all features, even those not matched by other rules.
- if (temp.empty())
- return NULL;
- else
- {
- if (filterstr.empty())
- filterstr.append(L"("); // start filter
- else
- filterstr.append(L" OR ");
-
- filterstr.append(L"(");
- filterstr.append(temp.c_str());
- filterstr.append(L")");
- }
- }
- }
-
- // Output filter
- FdoFilter* filter = NULL;
-
- if (!filterstr.empty())
- {
- filterstr.append(L")"); // close filter
-
- try
- {
- filter = FdoFilter::Parse(filterstr.c_str());
- }
- catch (FdoException* e)
- {
- e->Release();
- }
- }
-
- return filter;
-}
+}
\ No newline at end of file
Modified: sandbox/jng/common_decouple_v3/Common/Stylization/DefaultStylizer.h
===================================================================
--- sandbox/jng/common_decouple_v3/Common/Stylization/DefaultStylizer.h 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/Stylization/DefaultStylizer.h 2019-02-05 15:26:24 UTC (rev 9476)
@@ -18,6 +18,7 @@
#ifndef DEFAULTSTYLIZER_H_
#define DEFAULTSTYLIZER_H_
+#include <map>
#include "Stylizer.h"
#include "SE_BufferPool.h"
@@ -73,9 +74,6 @@
STYLIZATION_API virtual bool HasValidScaleRange(MdfModel::VectorLayerDefinition* layer,
double mapScale);
-
- STYLIZATION_API virtual FdoFilter* GetRulesFilter(MdfModel::VectorLayerDefinition* layer,
- double mapScale);
private:
int StylizeVLHelper(MdfModel::VectorLayerDefinition* layer,
MdfModel::VectorScaleRange* scaleRange,
Modified: sandbox/jng/common_decouple_v3/Common/Stylization/GeometryAdapter.cpp
===================================================================
--- sandbox/jng/common_decouple_v3/Common/Stylization/GeometryAdapter.cpp 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/Stylization/GeometryAdapter.cpp 2019-02-05 15:26:24 UTC (rev 9476)
@@ -20,11 +20,13 @@
#include "GeometryAdapter.h"
#include "SymbolVisitor.h"
#include "SLDSymbols.h"
-#include "ExpressionHelper.h"
#include "SE_ExpressionEvaluator.h"
+#ifdef WITH_FDO
+#include "ExpressionHelper.h"
+
extern void ProcessStylizerException(FdoException* exception, int line, wchar_t* file);
-
+#endif
//////////////////////////////////////////////////////////////////////////////
GeometryAdapter::GeometryAdapter(LineBufferPool* lbp)
{
@@ -36,6 +38,7 @@
//////////////////////////////////////////////////////////////////////////////
GeometryAdapter::~GeometryAdapter()
{
+#ifdef WITH_FDO
// free up cached fdo filters
for (std::map<const void*, FdoFilter*>::iterator iter = m_hFilterCache.begin();
iter != m_hFilterCache.end(); ++iter)
@@ -55,6 +58,7 @@
}
m_hExpressionCache.clear();
+#endif
}
Modified: sandbox/jng/common_decouple_v3/Common/Stylization/GeometryAdapter.h
===================================================================
--- sandbox/jng/common_decouple_v3/Common/Stylization/GeometryAdapter.h 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/Stylization/GeometryAdapter.h 2019-02-05 15:26:24 UTC (rev 9476)
@@ -18,10 +18,11 @@
#ifndef GEOMETRYADAPTER_H_
#define GEOMETRYADAPTER_H_
+#include <map>
#include "Stylization.h"
#include "RendererStyles.h"
-#include "RS_FeatureReader.h"
+class RS_FeatureReader;
class SE_ExpressionEvaluator;
class LineBuffer;
class LineBufferPool;
@@ -91,6 +92,7 @@
SE_ExpressionEvaluator* m_exec;
LineBufferPool* m_lbPool;
+#ifdef WITH_FDO
// BOGUS:
// TODO: we use pointer to the MDF strings for caching --
// this may be risky but all caching in the stylizer is
@@ -102,6 +104,7 @@
// FdoExpression cache
std::map<const void*, FdoExpression*> m_hExpressionCache;
+#endif
};
#endif
Modified: sandbox/jng/common_decouple_v3/Common/Stylization/GridData.cpp
===================================================================
--- sandbox/jng/common_decouple_v3/Common/Stylization/GridData.cpp 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/Stylization/GridData.cpp 2019-02-05 15:26:24 UTC (rev 9476)
@@ -20,6 +20,7 @@
#include "RS_Raster.h"
#include "Bounds.h"
#include "RS_InputStream.h"
+#include "RS_Types.h"
#ifdef MG_MAX_PATH
#undef MG_MAX_PATH
@@ -38,7 +39,7 @@
GetUniqueBandName(
wchar_t* pNewBandName,
GridData* pGisGrid,
- FdoString* pBandName
+ MdfCStr* pBandName
)
{
if ((pGisGrid) && (pBandName))
@@ -56,6 +57,8 @@
return false;
}
+#ifdef WITH_FDO
+
#define READELEVATIONDATA(elevationd_band_type, elevation_fdo_type, function_name) \
FdoPtr<elevation_fdo_type> val = static_cast<elevation_fdo_type*>(nullValue); \
elevationd_band_type fdoNullValue= val->function_name(); \
@@ -79,7 +82,15 @@
} \
}
+#define THROW_OOM throw FdoException::Create(FdoException::NLSGetMessage(FDO_NLSID(CLNT_5_OUTOFMEMORY)))
+#else
+
+#define READELEVATIONDATA(elevationd_band_type, elevation_fdo_type, function_name)
+#define THROW_OOM throw std::bad_alloc()
+
+#endif //WITH_FDO
+
GridData::GridData(const Point2D& point, double xExtent, double yExtent, unsigned int nXCount, unsigned int nYCount):
m_westSourthPoint(point), m_xExtent (xExtent), m_yExtent (yExtent),
m_nXCount (nXCount), m_nYCount (nYCount), m_pElevationBand(NULL),
@@ -326,7 +337,7 @@
}
void GridData::ReadRaster( RS_Raster* pRaster,
- FdoString* pBandName,
+ MdfCStr* pBandName,
unsigned long cols,
unsigned long rows,
double xMin,
@@ -338,18 +349,18 @@
{
Band* pGisBand = NULL;
RS_InputStream* reader = NULL;
- FdoByte* pRasterData = NULL;
- FdoByte* pPaletteBuf = NULL;
+ RS_Byte* pRasterData = NULL;
+ RS_Byte* pPaletteBuf = NULL;
wchar_t pUniqueBandName[MG_MAX_PATH] = { 0 };
try
{
//FdoPtr<FdoRasterDataModel> dataModel = pRaster->GetDataModel();
- //FdoPtr<FdoByteArray> byteArray = pRaster->GetBounds();
+ //FdoPtr<RS_ByteArray> byteArray = pRaster->GetBounds();
//FdoPtr<FdoFgfGeometryFactory> pAwkbFactory = FdoFgfGeometryFactory::GetInstance();
//FdoPtr<FdoIGeometry> pGeometry = pAwkbFactory->CreateGeometryFromFgf(byteArray);
//FdoPtr<FdoIEnvelope> envelope = pGeometry->GetEnvelope();
- FdoInt32 bitPerPixel = pRaster->GetBitsPerPixel();
- FdoRasterDataModelType dataModelType = (FdoRasterDataModelType)pRaster->GetDataModelType();
+ RS_Int32 bitPerPixel = pRaster->GetBitsPerPixel();
+ RS_RasterDataModelType dataModelType = (RS_RasterDataModelType)pRaster->GetDataModelType();
RS_Bounds env(pRaster->GetExtent());
// Compute the acutal pixel size of returned raster
unsigned long actualCols = (unsigned long) (((env.maxx - env.minx) / (xMax - xMin)) * cols + 0.5);
@@ -380,10 +391,10 @@
}
//Create an buffer to hold data
- pRasterData = new FdoByte[bufferLength];
+ pRasterData = new RS_Byte[bufferLength];
if (NULL == pRasterData)
{
- throw FdoException::Create(FdoException::NLSGetMessage(FDO_NLSID(CLNT_5_OUTOFMEMORY)));
+ THROW_OOM;
}
reader->read(pRasterData, bufferLength);
@@ -393,11 +404,11 @@
GetUniqueBandName(pUniqueBandName, this, pBandName);
pGisBand = CreateBand(gridDataType, pUniqueBandName);
- FdoString* pVerticalUnit = pRaster->GetVerticalUnits().c_str();
+ MdfCStr* pVerticalUnit = pRaster->GetVerticalUnits().c_str();
pGisBand->SetUnitName(pVerticalUnit);
// Set NULL value for Band
- if (dataModelType == FdoRasterDataModelType_Data)
+ if (dataModelType == RS_RasterDataModelType_Data)
{
//TODO: Are we guaranteed
//that FLT_MAX will always indicate the NODATA value for all grids?
@@ -411,8 +422,8 @@
pGisBand->SetNullValue(Band::Double64, (void*)&nullval);
}
}
- else if ((dataModelType == FdoRasterDataModelType_RGB)
- || (dataModelType == FdoRasterDataModelType_RGBA))
+ else if ((dataModelType == RS_RasterDataModelType_RGB)
+ || (dataModelType == RS_RasterDataModelType_RGBA))
{
unsigned int nullValue = 0x00000000;
pGisBand->SetAllToValue(gridDataType, (char*)&nullValue);
@@ -424,9 +435,9 @@
}
unsigned char* pCurPos;
- FdoRasterDataType rasterDataType = (FdoRasterDataType)pRaster->GetDataType();
- if ((dataModelType == FdoRasterDataModelType_RGB)
- || (dataModelType == FdoRasterDataModelType_RGBA))
+ RS_RasterDataType rasterDataType = pRaster->GetDataType();
+ if ((dataModelType == RS_RasterDataModelType_RGB)
+ || (dataModelType == RS_RasterDataModelType_RGBA))
{
unsigned int color;
if (24 == bitPerPixel)
@@ -486,7 +497,7 @@
delete [] row;
}
}
- else if (dataModelType == FdoRasterDataModelType_Palette)
+ else if (dataModelType == RS_RasterDataModelType_Palette)
{
//FdoPtr<FdoIRasterPropertyDictionary> propDict = pRaster->GetAuxiliaryProperties();
//FdoPtr<FdoDataValue> pal = propDict->GetProperty(L"Palette");
@@ -494,7 +505,7 @@
struct RgbColor
{
union {
- struct { FdoByte red; FdoByte green; FdoByte blue; FdoByte alpha; } rgba;
+ struct { RS_Byte red; RS_Byte green; RS_Byte blue; RS_Byte alpha; } rgba;
unsigned int packed;
};
};
@@ -504,10 +515,10 @@
if (bitPerPixel >= 8)
{
RS_InputStream* pStream = pRaster->GetPalette();
- pPaletteBuf = new FdoByte[pStream->available()];
+ pPaletteBuf = new RS_Byte[pStream->available()];
if (NULL == pPaletteBuf)
{
- throw FdoException::Create(FdoException::NLSGetMessage(FDO_NLSID(CLNT_5_OUTOFMEMORY)));
+ THROW_OOM;
}
pStream->read(pPaletteBuf, pStream->available());
@@ -568,28 +579,30 @@
}
}
}
- else if ((dataModelType == FdoRasterDataModelType_Data) &&
- ((rasterDataType == FdoRasterDataType_Integer) ||
- (rasterDataType == FdoRasterDataType_UnsignedInteger)))
+ else if ((dataModelType == RS_RasterDataModelType_Data) &&
+ ((rasterDataType == RS_RasterDataType_Integer) ||
+ (rasterDataType == RS_RasterDataType_UnsignedInteger)))
{
Band::BandDataType bandDataType = GetGridDataType(pRaster, false);
- FdoDataType type = (FdoDataType)pRaster->GetNullValueType();
+ RS_DataType type = pRaster->GetNullValueType();
+
+ #ifdef WITH_FDO
FdoDataValue* nullValue = NULL;
switch(type)
{
- case FdoDataType_Double:
+ case RS_DataType_Double:
nullValue = FdoDoubleValue::Create((double)pRaster->GetNullValueData());
break;
- case FdoDataType_Single:
+ case RS_DataType_Single:
nullValue = FdoSingleValue::Create((float)pRaster->GetNullValueData());
break;
- case FdoDataType_Int16:
- nullValue = FdoInt16Value::Create((FdoInt16)pRaster->GetNullValueData());
+ case RS_DataType_Int16:
+ nullValue = FdoInt16Value::Create((RS_Int16)pRaster->GetNullValueData());
break;
- case FdoDataType_Int32:
- nullValue = FdoInt32Value::Create((FdoInt32)pRaster->GetNullValueData());
+ case RS_DataType_Int32:
+ nullValue = FdoInt32Value::Create((RS_Int32)pRaster->GetNullValueData());
break;
- case FdoDataType_Int64:
+ case RS_DataType_Int64:
nullValue = FdoInt64Value::Create(pRaster->GetNullValueData());
break;
default: break;
@@ -650,6 +663,10 @@
}
if(nullValue)
nullValue->Release();
+
+ #else
+ #pragma message ("TODO: If we do want FDO-free raster support, we need to know to read elevation data")
+ #endif //WITH_FDO
}
else
{
@@ -668,7 +685,7 @@
// When new version of FDO RFP, which modifies resampling algorithm for dem file to BSpline, is avaiable,
// we will remove code to smooth elevation and use the following code to recover modified NULL value to its original value.
// NOTE: The smoothing code has been removed.
- if (dataModelType == FdoRasterDataModelType_Data)
+ if (dataModelType == RS_RasterDataModelType_Data)
{
float fNullValue = MG_NODATA_VALUE;
double dCurValue(0.0);
@@ -686,7 +703,7 @@
}
}
}
- else if (dataModelType == FdoRasterDataModelType_Bitonal)
+ else if (dataModelType == RS_RasterDataModelType_Bitonal)
{
//Fix DID 885517
}
@@ -710,16 +727,16 @@
GridData::GetGridDataType(RS_Raster* pRaster, bool bBandDataType) const
{
Band::BandDataType gridDataType = Band::UnsignedInt8;
- FdoInt32 bitPerPixel = pRaster->GetBitsPerPixel();
- FdoRasterDataType rasterDataType = (FdoRasterDataType)pRaster->GetDataType();
+ RS_Int32 bitPerPixel = pRaster->GetBitsPerPixel();
+ RS_RasterDataType rasterDataType = pRaster->GetDataType();
if (bBandDataType)
{
- if (FdoRasterDataModelType_Palette == (FdoRasterDataModelType)pRaster->GetDataModelType())
+ if (RS_RasterDataModelType_Palette == (RS_RasterDataModelType)pRaster->GetDataModelType())
{
return Band::UnsignedInt32;
}
- else if (FdoRasterDataModelType_Data == (FdoRasterDataModelType)pRaster->GetDataModelType())
+ else if (RS_RasterDataModelType_Data == (RS_RasterDataModelType)pRaster->GetDataModelType())
{
return Band::Double32;
}
@@ -740,10 +757,10 @@
{
switch (rasterDataType)
{
- case FdoRasterDataType_UnsignedInteger:
+ case RS_RasterDataType_UnsignedInteger:
gridDataType = Band::UnsignedInt8;
break;
- case FdoRasterDataType_Integer:
+ case RS_RasterDataType_Integer:
gridDataType = Band::Int8;
break;
default :
@@ -756,14 +773,14 @@
{
switch (rasterDataType)
{
- case FdoRasterDataType_UnsignedInteger:
+ case RS_RasterDataType_UnsignedInteger:
gridDataType = Band::UnsignedInt16;
break;
- case FdoRasterDataType_Integer:
+ case RS_RasterDataType_Integer:
gridDataType = Band::Int16;
break;
- case FdoRasterDataType_Float:
- case FdoRasterDataType_Double:
+ case RS_RasterDataType_Float:
+ case RS_RasterDataType_Double:
//should not happen
break;
default:
@@ -776,10 +793,10 @@
{
switch (rasterDataType)
{
- case FdoRasterDataType_UnsignedInteger:
+ case RS_RasterDataType_UnsignedInteger:
gridDataType = Band::UnsignedInt32;
break;
- case FdoRasterDataType_Integer:
+ case RS_RasterDataType_Integer:
gridDataType = Band::Int32;
break;
default:
@@ -793,14 +810,14 @@
{
switch (rasterDataType)
{
- case FdoRasterDataType_UnsignedInteger:
+ case RS_RasterDataType_UnsignedInteger:
gridDataType = Band::UnsignedInt32;
break;
- case FdoRasterDataType_Integer:
+ case RS_RasterDataType_Integer:
gridDataType = Band::Int32;
break;
- case FdoRasterDataType_Float:
- case FdoRasterDataType_Double:
+ case RS_RasterDataType_Float:
+ case RS_RasterDataType_Double:
gridDataType = Band::Double32;
break;
default:
@@ -813,10 +830,10 @@
{
switch (rasterDataType)
{
- case FdoRasterDataType_UnsignedInteger:
+ case RS_RasterDataType_UnsignedInteger:
gridDataType = Band::UnsignedInt32;
break;
- case FdoRasterDataType_Integer:
+ case RS_RasterDataType_Integer:
gridDataType = Band::Int32;
break;
default:
@@ -829,14 +846,14 @@
{
switch (rasterDataType)
{
- case FdoRasterDataType_UnsignedInteger:
+ case RS_RasterDataType_UnsignedInteger:
gridDataType = Band::UnsignedInt64;
break;
- case FdoRasterDataType_Integer:
+ case RS_RasterDataType_Integer:
gridDataType = Band::Int64;
break;
- case FdoRasterDataType_Float:
- case FdoRasterDataType_Double:
+ case RS_RasterDataType_Float:
+ case RS_RasterDataType_Double:
gridDataType = Band::Double64;
break;
default:
Modified: sandbox/jng/common_decouple_v3/Common/Stylization/GridData.h
===================================================================
--- sandbox/jng/common_decouple_v3/Common/Stylization/GridData.h 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/Stylization/GridData.h 2019-02-05 15:26:24 UTC (rev 9476)
@@ -51,7 +51,7 @@
/// Populates the GridData from an FdoIRaster
/// </summary>
STYLIZATION_API void ReadRaster(RS_Raster* pRaster,
- FdoString* pBandName,
+ MdfCStr* pBandName,
unsigned long cols,
unsigned long rows,
double xMin,
Modified: sandbox/jng/common_decouple_v3/Common/Stylization/GridStyleColorHandler.cpp
===================================================================
--- sandbox/jng/common_decouple_v3/Common/Stylization/GridStyleColorHandler.cpp 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/Stylization/GridStyleColorHandler.cpp 2019-02-05 15:26:24 UTC (rev 9476)
@@ -20,6 +20,7 @@
#endif
#include "stdafx.h"
+#include <algorithm>
#include "GridStyleColorHandler.h"
#include "GridColorStyle.h"
#include "GridData.h"
Modified: sandbox/jng/common_decouple_v3/Common/Stylization/KeyEncode.cpp
===================================================================
--- sandbox/jng/common_decouple_v3/Common/Stylization/KeyEncode.cpp 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/Stylization/KeyEncode.cpp 2019-02-05 15:26:24 UTC (rev 9476)
@@ -19,6 +19,8 @@
#include "KeyEncode.h"
#include "RS_FeatureReader.h"
#include "UnicodeString.h"
+#include "RS_Types.h"
+#include "RS_InputStream.h"
// macros to swap from Big Endian to Little Endian
#ifdef _WIN32
@@ -63,37 +65,37 @@
switch (dataType)
{
- case FdoDataType_Boolean :
+ case RS_DataType_Boolean :
WriteByte(reader->GetBoolean(name)? 1 : 0);
break;
- case FdoDataType_Byte :
+ case RS_DataType_Byte :
WriteByte(reader->GetByte(name));
break;
- case FdoDataType_DateTime :
+ case RS_DataType_DateTime :
WriteDateTime(reader->GetDateTime(name));
break;
- case FdoDataType_Decimal :
+ case RS_DataType_Decimal :
WriteDouble(reader->GetDouble(name));
break;
- case FdoDataType_Double :
+ case RS_DataType_Double :
WriteDouble(reader->GetDouble(name));
break;
- case FdoDataType_Int16 :
+ case RS_DataType_Int16 :
WriteInt16(reader->GetInt16(name));
break;
- case FdoDataType_Int32 :
+ case RS_DataType_Int32 :
WriteInt32(reader->GetInt32(name));
break;
- case FdoDataType_Int64 :
+ case RS_DataType_Int64 :
WriteInt64(reader->GetInt64(name));
break;
- case FdoDataType_Single :
+ case RS_DataType_Single :
WriteSingle(reader->GetSingle(name));
break;
- case FdoDataType_String :
+ case RS_DataType_String :
WriteString(reader->GetString(name));
break;
- case FdoDataType_BLOB :
+ case RS_DataType_BLOB :
{
RS_InputStream* is = reader->GetBLOB(name);
WriteUInt32((unsigned int)is->available());
@@ -101,7 +103,7 @@
delete is;
}
break;
- case FdoDataType_CLOB :
+ case RS_DataType_CLOB :
{
RS_InputStream* is = reader->GetBLOB(name);
WriteUInt32((unsigned int)is->available());
@@ -109,8 +111,10 @@
delete is;
}
break;
+ #ifdef WITH_FDO
default:
- throw FdoException::Create();
+ throw FdoException::Create();
+ #endif
}
}
@@ -143,7 +147,7 @@
void KeyEncode::WriteDouble(double d)
{
- FdoInt64 swap = *(FdoInt64 volatile*)&d;
+ RS_Int64 swap = *(RS_Int64 volatile*)&d;
WriteInt64(swap);
}
@@ -177,7 +181,7 @@
m_stream.write(&swap, sizeof(unsigned short));
}
-void KeyEncode::WriteInt64(FdoInt64 ll)
+void KeyEncode::WriteInt64(RS_Int64 ll)
{
unsigned int word = (unsigned int) (ll & 0xFFFFFFFF);
WriteUInt32(word);
@@ -214,7 +218,7 @@
m_stream.write(buf, len);
}
-void KeyEncode::WriteDateTime(FdoDateTime dt)
+void KeyEncode::WriteDateTime(RS_DateTime dt)
{
// serialize date time in MapGuide HTTP protocol format
// where seconds and microseconds are separate
Modified: sandbox/jng/common_decouple_v3/Common/Stylization/KeyEncode.h
===================================================================
--- sandbox/jng/common_decouple_v3/Common/Stylization/KeyEncode.h 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/Stylization/KeyEncode.h 2019-02-05 15:26:24 UTC (rev 9476)
@@ -20,6 +20,7 @@
#include "Stylization.h"
#include "RS_BufferOutputStream.h"
+#include "RS_Types.h"
//forward declare
class RS_FeatureReader;
@@ -40,12 +41,12 @@
void WriteUInt32(unsigned i);
void WriteInt16(short s);
void WriteUInt16(unsigned short us);
- void WriteInt64(FdoInt64 ll);
+ void WriteInt64(RS_Int64 ll);
void WriteByte(unsigned char b);
void WriteChar(char c);
void WriteString(const wchar_t* src);
void WriteBytes(unsigned char* buf, size_t len);
- void WriteDateTime(FdoDateTime dt);
+ void WriteDateTime(RS_DateTime dt);
void WriteStream(RS_InputStream* is);
RS_BufferOutputStream m_stream;
Modified: sandbox/jng/common_decouple_v3/Common/Stylization/LabelRenderer.cpp
===================================================================
--- sandbox/jng/common_decouple_v3/Common/Stylization/LabelRenderer.cpp 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/Stylization/LabelRenderer.cpp 2019-02-05 15:26:24 UTC (rev 9476)
@@ -21,9 +21,10 @@
//#define DEBUG_LABELS
+#ifdef WITH_FDO
extern void ProcessStylizerException(FdoException* exception, int line, wchar_t* file);
+#endif
-
//////////////////////////////////////////////////////////////////////////////
LabelRenderer::LabelRenderer(SE_Renderer* se_renderer)
: LabelRendererBase(se_renderer)
@@ -89,11 +90,11 @@
double scaleLimit)
{
// get the geometry type
- int geomType = (path != NULL)? path->geom_type() : FdoGeometryType_None;
+ int geomType = (path != NULL)? path->geom_type() : GeometryType_None;
// in the case of linear geometry we'll label along the path, so prepare
// for that (transform to screen space, group into stitch groups)
- if (geomType == FdoGeometryType_LineString || geomType == FdoGeometryType_MultiLineString)
+ if (geomType == GeometryType_LineString || geomType == GeometryType_MultiLineString)
{
BeginOverpostGroup(type, true, exclude);
@@ -294,10 +295,12 @@
Cleanup();
}
+#ifdef WITH_FDO
catch (FdoException* e)
{
ProcessStylizerException(e, __LINE__, __WFILE__);
}
+#endif
catch (...)
{
}
Modified: sandbox/jng/common_decouple_v3/Common/Stylization/LabelRendererLocal.cpp
===================================================================
--- sandbox/jng/common_decouple_v3/Common/Stylization/LabelRendererLocal.cpp 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/Stylization/LabelRendererLocal.cpp 2019-02-05 15:26:24 UTC (rev 9476)
@@ -21,9 +21,10 @@
//#define DEBUG_LABELS
+#ifdef WITH_FDO
extern void ProcessStylizerException(FdoException* exception, int line, wchar_t* file);
+#endif
-
//////////////////////////////////////////////////////////////////////////////
LabelRendererLocal::LabelRendererLocal(SE_Renderer* se_renderer, double tileExtentOffset)
: LabelRendererBase(se_renderer)
@@ -826,10 +827,12 @@
m_hStitchTable.clear();
m_overpost.Clear();
}
+#ifdef WITH_FDO
catch (FdoException* e)
{
ProcessStylizerException(e, __LINE__, __WFILE__);
}
+#endif
catch (...)
{
}
Modified: sandbox/jng/common_decouple_v3/Common/Stylization/MathHelper.h
===================================================================
--- sandbox/jng/common_decouple_v3/Common/Stylization/MathHelper.h 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/Stylization/MathHelper.h 2019-02-05 15:26:24 UTC (rev 9476)
@@ -19,7 +19,6 @@
#define MATHHELPER_H_
#include <math.h>
-#include "Foundation.h"
#include <assert.h>
const double EPSILON = 1e-10;
Modified: sandbox/jng/common_decouple_v3/Common/Stylization/PolylineAdapter.h
===================================================================
--- sandbox/jng/common_decouple_v3/Common/Stylization/PolylineAdapter.h 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/Stylization/PolylineAdapter.h 2019-02-05 15:26:24 UTC (rev 9476)
@@ -18,6 +18,8 @@
#ifndef POLYLINEADAPTER_H_
#define POLYLINEADAPTER_H_
+#include <map>
+#include <vector>
#include "GeometryAdapter.h"
class PolylineAdapter : public GeometryAdapter
Modified: sandbox/jng/common_decouple_v3/Common/Stylization/RS_FdoFeatureReader.h
===================================================================
--- sandbox/jng/common_decouple_v3/Common/Stylization/RS_FdoFeatureReader.h 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/Stylization/RS_FdoFeatureReader.h 2019-02-05 15:26:24 UTC (rev 9476)
@@ -19,6 +19,8 @@
#include "RS_FeatureReader.h"
+class FdoIFeatureReader;
+
// Defines a feature data reader interface with access to the internal FDO feature reader
class RS_FdoFeatureReader : public RS_FeatureReader
{
Modified: sandbox/jng/common_decouple_v3/Common/Stylization/RS_Font.h
===================================================================
--- sandbox/jng/common_decouple_v3/Common/Stylization/RS_Font.h 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/Stylization/RS_Font.h 2019-02-05 15:26:24 UTC (rev 9476)
@@ -21,8 +21,6 @@
#include <string>
#include <list>
-using namespace std;
-
struct RS_Font
{
public:
@@ -59,13 +57,13 @@
short m_underline_thickness;
//font names
- wstring m_fullname;
- wstring m_familyname;
- wstring m_filename;
+ std::wstring m_fullname;
+ std::wstring m_familyname;
+ std::wstring m_filename;
long m_index;
};
-typedef list<RS_Font*> FontList;
-typedef list<RS_Font*>::iterator FontListIterator;
+typedef std::list<RS_Font*> FontList;
+typedef std::list<RS_Font*>::iterator FontListIterator;
#endif
Modified: sandbox/jng/common_decouple_v3/Common/Stylization/RS_Raster.h
===================================================================
--- sandbox/jng/common_decouple_v3/Common/Stylization/RS_Raster.h 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/Stylization/RS_Raster.h 2019-02-05 15:26:24 UTC (rev 9476)
@@ -18,11 +18,13 @@
#ifndef RS_RASTER_H_
#define RS_RASTER_H_
-#include "RS_InputStream.h"
-#include "Bounds.h"
#include "RendererStyles.h"
#include <stdint.h>
+#include "RS_Types.h"
+struct RS_Bounds;
+class RS_InputStream;
+
class RS_Raster
{
public:
@@ -29,23 +31,23 @@
RS_Raster() {}
virtual ~RS_Raster() {}
- virtual RS_Bounds GetExtent() = 0;
+ virtual RS_Bounds GetExtent() = 0;
- virtual int GetOriginalWidth() = 0;
- virtual int GetOriginalHeight() = 0;
+ virtual int GetOriginalWidth() = 0;
+ virtual int GetOriginalHeight() = 0;
- virtual int GetBitsPerPixel() = 0;
- virtual int GetDataModelType() = 0;
+ virtual RS_Int32 GetBitsPerPixel() = 0;
+ virtual RS_RasterDataModelType GetDataModelType() = 0;
- virtual RS_InputStream* GetPalette() = 0;
+ virtual RS_InputStream* GetPalette() = 0;
- virtual RS_InputStream* GetStream(RS_ImageFormat format, int width, int height) = 0;
- virtual int GetDataType() = 0;
+ virtual RS_InputStream* GetStream(RS_ImageFormat format, int width, int height) = 0;
+ virtual RS_RasterDataType GetDataType() = 0;
- virtual RS_String GetVerticalUnits() = 0;
+ virtual RS_String GetVerticalUnits() = 0;
- virtual int GetNullValueType() = 0;
- virtual int64_t GetNullValueData() = 0;
+ virtual RS_DataType GetNullValueType() = 0;
+ virtual RS_Int64 GetNullValueData() = 0;
};
#endif
Modified: sandbox/jng/common_decouple_v3/Common/Stylization/RS_Types.h
===================================================================
--- sandbox/jng/common_decouple_v3/Common/Stylization/RS_Types.h 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/Stylization/RS_Types.h 2019-02-05 15:26:24 UTC (rev 9476)
@@ -17,8 +17,102 @@
#ifndef RS_TYPES_H_
#define RS_TYPES_H_
+enum RS_RasterDataType
+{
+ /// Data is organized in an unknown or provider specific manner.
+ RS_RasterDataType_Unknown,
+
+ /// Data is organized as Unsigned Integers.
+ RS_RasterDataType_UnsignedInteger,
+
+ /// Data is organized as Signed Integers.
+ RS_RasterDataType_Integer,
+
+ /// Data is organized as Floats.
+ RS_RasterDataType_Float,
+
+ /// Data is organized as Doubles.
+ RS_RasterDataType_Double
+};
+
+enum RS_RasterDataModelType
+{
+ /// Data is organized in an unknown or provider specific manner.
+ RS_RasterDataModelType_Unknown,
+
+ /// Data is rectangular grid, floating point data model.
+ RS_RasterDataModelType_Data,
+
+ /// Data is one bit (black/white - bitonal) pixels.
+ RS_RasterDataModelType_Bitonal,
+
+ /// Data is monochrome (black->gray->white) pixels.
+ /// It is necessary to know the BitsPerPixel value to interpret the data.
+ RS_RasterDataModelType_Gray,
+
+ /// Data is red/green/blue (in that order) pixels.
+ /// It is necessary to know the BitsPerPixel value to interpret the data.
+ RS_RasterDataModelType_RGB,
+
+ /// Data is red/green/blue/alpha (in that order) pixels; RGB with transparency.
+ /// It is necessary to know the BitsPerPixel value to interpret the data.
+ RS_RasterDataModelType_RGBA,
+
+ /// Data is monochrome but backed by a pallette (value->pallette->colour) pixels.
+ /// It is necessary to know the BitsPerPixel value to interpret the data.
+ RS_RasterDataModelType_Palette
+};
+
+enum RS_DataType
+{
+ /// Represents a Boolean value of true or false.
+ RS_DataType_Boolean,
+
+ /// Represents unsigned 8-bit integers with values between 0 and 255.
+ RS_DataType_Byte,
+
+ /// Represents a date and time value.
+ RS_DataType_DateTime,
+
+ /// Represents values ranging from 1.0 x 10^-28 to approximately 7.9 x 10^28
+ /// with 28-29 significant digits.
+ RS_DataType_Decimal,
+
+ /// Represents a floating point value ranging from approximately 5.0
+ /// x 10^-324 to 1.7 x 10^308 with a precision of 15-16 digits.
+ RS_DataType_Double,
+
+ /// Represents signed 16-bit integers with values between -32768 and 32767.
+ RS_DataType_Int16,
+
+ /// Represents signed 32-bit integers with values between -2147483648
+ /// and 2147483647.
+ RS_DataType_Int32,
+
+ /// Represents signed 64-bit integers with values
+ /// between -9223372036854775808 and 9223372036854775807.
+ RS_DataType_Int64,
+
+ /// Represents floating point values ranging from approximately 1.5 x 10^-45
+ /// to 3.4 x 10^38, with a precision of 7 digits.
+ RS_DataType_Single,
+
+ /// Represents a Unicode character strings.
+ RS_DataType_String,
+
+ /// Represents a binary large object stored as a collection of bytes.
+ RS_DataType_BLOB,
+
+ /// Represents a character large object stored as a collection of
+ /// characters.
+ RS_DataType_CLOB
+};
+
+#ifdef WITH_FDO
+
#include "Fdo.h"
+typedef FdoByte RS_Byte;
typedef FdoInt8 RS_Int8;
typedef FdoInt16 RS_Int16;
typedef FdoInt32 RS_Int32;
@@ -25,4 +119,126 @@
typedef FdoInt64 RS_Int64;
typedef FdoDateTime RS_DateTime;
+#else
+
+#include <cstdint>
+
+typedef unsigned char RS_Byte;
+typedef int8_t RS_Int8;
+typedef int16_t RS_Int16;
+typedef int32_t RS_Int32;
+typedef int64_t RS_Int64;
+
+class RS_DateTime
+{
+public:
+ /// \brief
+ /// Construct a NULL date time value
+ ///
+ /// \return
+ /// Returns nothing.
+ ///
+ RS_DateTime()
+ {
+ year = -1; month = -1; day = -1;
+ hour = -1; minute = -1; seconds = 0.0f;
+ }
+
+ /// \brief
+ /// Construct a date value
+ ///
+ /// \param _year
+ /// Input year
+ /// \param _month
+ /// Input month
+ /// \param _day
+ /// Input day of month
+ ///
+ /// \return
+ /// Returns nothing.
+ ///
+ RS_DateTime(RS_Int16 _year, RS_Int8 _month, RS_Int8 _day)
+ {
+ year = _year; month = _month; day = _day;
+ hour = -1; minute = -1; seconds = 0.0f;
+ }
+
+ /// \brief
+ /// Construct a time value
+ ///
+ /// \param _hour
+ /// Input hour
+ /// \param _minutes
+ /// Input minutes
+ /// \param _seconds
+ /// Input seconds
+ ///
+ /// \return
+ /// Returns nothing.
+ ///
+ RS_DateTime(RS_Int8 _hour, RS_Int8 _minutes, float _seconds)
+ {
+ year = -1; month = -1; day = -1;
+ hour = _hour; minute = _minutes; seconds = _seconds;
+ }
+
+ /// \brief
+ /// Construct a date time value
+ ///
+ /// \param _year
+ /// Input year
+ /// \param _month
+ /// Input month
+ /// \param _day
+ /// Input day of month
+ /// \param _hour
+ /// Input hour
+ /// \param _minutes
+ /// Input minutes
+ /// \param _seconds
+ /// Input seconds
+ ///
+ /// \return
+ /// Returns nothing.
+ ///
+ RS_DateTime(RS_Int16 _year, RS_Int8 _month, RS_Int8 _day, RS_Int8 _hour, RS_Int8 _minutes, float _seconds)
+ {
+ year = _year; month = _month; day = _day;
+ hour = _hour; minute = _minutes; seconds = _seconds;
+ }
+
+ /// \brief
+ /// Returns true if the date is valid
+ ///
+ /// \return
+ /// Returns true if date has been defined.
+ ///
+ bool IsDate() {return year != -1 && hour == -1;}
+
+ /// \brief
+ /// Returns true if the time is valid
+ ///
+ /// \return
+ /// Returns true if time has been defined.
+ ///
+ bool IsTime() {return year == -1 && hour != -1;}
+
+ /// \brief
+ /// Returns true if both the date and time is valid
+ ///
+ /// \return
+ /// Returns true if both the date and time has been defined.
+ ///
+ bool IsDateTime() {return year != -1 && hour != -1;}
+
+ RS_Int16 year;
+ RS_Int8 month;
+ RS_Int8 day;
+ RS_Int8 hour;
+ RS_Int8 minute;
+ float seconds;
+};
+
+#endif //WITH_FDO
+
#endif
\ No newline at end of file
Modified: sandbox/jng/common_decouple_v3/Common/Stylization/RasterAdapter.cpp
===================================================================
--- sandbox/jng/common_decouple_v3/Common/Stylization/RasterAdapter.cpp 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/Stylization/RasterAdapter.cpp 2019-02-05 15:26:24 UTC (rev 9476)
@@ -23,6 +23,8 @@
#include "GridStylizer.h"
#include "TransformMesh.h"
#include "SE_ExpressionEvaluator.h"
+#include "RS_Raster.h"
+#include "CSysTransformer.h"
//////////////////////////////////////////////////////////////////////////////
RasterAdapter::RasterAdapter(LineBufferPool* lbp) : GeometryAdapter(lbp)
Modified: sandbox/jng/common_decouple_v3/Common/Stylization/RasterAdapter.h
===================================================================
--- sandbox/jng/common_decouple_v3/Common/Stylization/RasterAdapter.h 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/Stylization/RasterAdapter.h 2019-02-05 15:26:24 UTC (rev 9476)
@@ -20,6 +20,8 @@
#include "GeometryAdapter.h"
+class CSysTransformer;
+class RS_Raster;
class SE_ExpressionEvaluator;
class GridData;
class GridStylizer;
Modified: sandbox/jng/common_decouple_v3/Common/Stylization/SE_ExpressionBase.cpp
===================================================================
--- sandbox/jng/common_decouple_v3/Common/Stylization/SE_ExpressionBase.cpp 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/Stylization/SE_ExpressionBase.cpp 2019-02-05 15:26:24 UTC (rev 9476)
@@ -22,9 +22,9 @@
#include <wctype.h>
using namespace MDFMODEL_NAMESPACE;
-
+#ifdef WITH_FDO
extern void ProcessStylizerException(FdoException* exception, int line, wchar_t* file);
-
+#endif
void SE_ExpressionBase::SetParameterValues(OverrideCollection* overrides)
{
m_parameters.clear();
Modified: sandbox/jng/common_decouple_v3/Common/Stylization/Stylization.h
===================================================================
--- sandbox/jng/common_decouple_v3/Common/Stylization/Stylization.h 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/Stylization/Stylization.h 2019-02-05 15:26:24 UTC (rev 9476)
@@ -81,6 +81,8 @@
#include "Base64.h"
+#ifdef WITH_FDO
+
// FDO headers
#pragma warning(push)
#pragma warning(disable: 4201)
@@ -90,6 +92,7 @@
#include "FdoExpressionEngineINonAggregateFunction.h"
#pragma warning(pop)
+#endif
#ifndef __WFILE__
// Wide character version of __FILE__ macro
@@ -98,6 +101,7 @@
#define __WFILE__ WIDEN(__FILE__)
#endif
+#ifdef WITH_FDO
//Non-fatal FDO exception logging mechanism
//Implementation is defined in Stylizer.cpp
typedef void (*StylizerExceptionCallback)(FdoException* exception, int line, wchar_t* file);
@@ -111,3 +115,5 @@
#endif
#endif
+
+#endif
Modified: sandbox/jng/common_decouple_v3/Common/Stylization/Stylization.vcxproj
===================================================================
--- sandbox/jng/common_decouple_v3/Common/Stylization/Stylization.vcxproj 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/Stylization/Stylization.vcxproj 2019-02-05 15:26:24 UTC (rev 9476)
@@ -96,7 +96,7 @@
<AdditionalOptions>$(USRCFLAGS) %(AdditionalOptions)</AdditionalOptions>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\MdfModel;..\Foundation;..\..\Oem\ACE\ACE_wrappers;..\..\Oem\FDO\inc;..\..\Oem\FDO\inc\ExpressionEngine;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;STYLIZATION_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;STYLIZATION_EXPORTS;WITH_FDO;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>Async</ExceptionHandling>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
@@ -126,7 +126,7 @@
<AdditionalOptions>$(USRCFLAGS) %(AdditionalOptions)</AdditionalOptions>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\MdfModel;..\Foundation;..\..\Oem\ACE\ACE_wrappers;..\..\Oem\FDO\inc;..\..\Oem\FDO\inc\ExpressionEngine;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;STYLIZATION_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;STYLIZATION_EXPORTS;WITH_FDO;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>Async</ExceptionHandling>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
@@ -158,7 +158,7 @@
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>false</OmitFramePointers>
<AdditionalIncludeDirectories>..\MdfModel;..\Foundation;..\..\Oem\ACE\ACE_wrappers;..\..\Oem\FDO\inc;..\..\Oem\FDO\inc\ExpressionEngine;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;STYLIZATION_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;STYLIZATION_EXPORTS;WITH_FDO;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>Async</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<WarningLevel>Level4</WarningLevel>
@@ -193,7 +193,7 @@
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>false</OmitFramePointers>
<AdditionalIncludeDirectories>..\MdfModel;..\Foundation;..\..\Oem\ACE\ACE_wrappers;..\..\Oem\FDO\inc;..\..\Oem\FDO\inc\ExpressionEngine;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;STYLIZATION_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;STYLIZATION_EXPORTS;WITH_FDO;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>Async</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
Modified: sandbox/jng/common_decouple_v3/Common/Stylization/StylizationEngine.cpp
===================================================================
--- sandbox/jng/common_decouple_v3/Common/Stylization/StylizationEngine.cpp 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/Stylization/StylizationEngine.cpp 2019-02-05 15:26:24 UTC (rev 9476)
@@ -25,6 +25,7 @@
#include "SE_SymbolDefProxies.h"
#include "FeatureTypeStyleVisitor.h"
#include "SE_ExpressionEvaluatorFactory.h"
+#include "RS_FeatureReader.h"
#include <algorithm>
#include <functional>
@@ -35,7 +36,9 @@
using namespace MDFMODEL_NAMESPACE;
+#ifdef WITH_FDO
extern void ProcessStylizerException(FdoException* exception, int line, wchar_t* file);
+#endif
StylizationEngine::StylizationEngine(SE_SymbolManager* resources, SE_BufferPool* pool) :
m_resources(resources),
@@ -158,6 +161,7 @@
continue;
}
}
+ #ifdef WITH_FDO
catch (FdoException* e)
{
// just move on to the next feature
@@ -165,6 +169,13 @@
LineBufferPool::FreeLineBuffer(m_pool, spLB.release());
continue;
}
+ #else
+ catch (...)
+ {
+ LineBufferPool::FreeLineBuffer(m_pool, spLB.release());
+ continue;
+ }
+ #endif
// stylize once for each composite type style
for (size_t i=0; i<numTypeStyles; ++i)
@@ -800,14 +811,18 @@
if (!match)
{
+ #ifdef WITH_FDO
try
{
+ #endif
match = exec->ExecFilter(&rules[i].filter);
+ #ifdef WITH_FDO
}
catch (FdoException* e)
{
ProcessStylizerException(e, __LINE__, __WFILE__);
}
+ #endif
}
if (match)
@@ -1034,14 +1049,18 @@
// evaluate the style (all expressions inside it) and convert to a
// constant screen space render style
+ #ifdef WITH_FDO
try
{
+ #endif
style->evaluate(&evalCtx);
+ #ifdef WITH_FDO
}
catch (FdoException* e)
{
ProcessStylizerException(e, __LINE__, __WFILE__);
}
+ #endif
// compute offset to apply to the clipping bounds
if (bClip)
@@ -1213,14 +1232,18 @@
else
{
// apply the style to the geometry using the renderer
+ #ifdef WITH_FDO
try
{
+ #endif
style->apply(&applyCtx);
+ #ifdef WITH_FDO
}
catch (FdoException* e)
{
ProcessStylizerException(e, __LINE__, __WFILE__);
}
+ #endif
}
}
}
Modified: sandbox/jng/common_decouple_v3/Common/Stylization/StylizationEngine.h
===================================================================
--- sandbox/jng/common_decouple_v3/Common/Stylization/StylizationEngine.h 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/Stylization/StylizationEngine.h 2019-02-05 15:26:24 UTC (rev 9476)
@@ -18,10 +18,10 @@
#ifndef STYLIZATIONENGINE_H_
#define STYLIZATIONENGINE_H_
+#include <map>
#include "Stylizer.h"
#include "SE_Matrix.h"
-
// forward declare
class SE_Renderer;
class SE_SymbolManager;
Modified: sandbox/jng/common_decouple_v3/Common/Stylization/StylizationUtil.cpp
===================================================================
--- sandbox/jng/common_decouple_v3/Common/Stylization/StylizationUtil.cpp 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/Stylization/StylizationUtil.cpp 2019-02-05 15:26:24 UTC (rev 9476)
@@ -26,7 +26,9 @@
#include "SE_ExpressionEvaluatorFactory.h"
#include <cmath>
+#ifdef WITH_FDO
extern void ProcessStylizerException(FdoException* exception, int line, wchar_t* file);
+#endif
///////////////////////////////////////////////////////////////////////////////
void StylizationUtil::ParseColor(const MdfString& colorstr, RS_Color& rscol)
@@ -190,10 +192,12 @@
break;
}
}
+#ifdef WITH_FDO
catch (FdoException* e)
{
ProcessStylizerException(e, __LINE__, __WFILE__);
}
+#endif
catch (...)
{
}
Modified: sandbox/jng/common_decouple_v3/Common/Stylization/Stylizer.cpp
===================================================================
--- sandbox/jng/common_decouple_v3/Common/Stylization/Stylizer.cpp 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/Stylization/Stylizer.cpp 2019-02-05 15:26:24 UTC (rev 9476)
@@ -52,6 +52,7 @@
return NULL;
}
+#ifdef WITH_FDO
// Non-fatal stylizer exception logging mechanism.
static StylizerExceptionCallback g_stylizerExceptionCallback = NULL;
@@ -68,5 +69,4 @@
}
exception->Release();
}
-
-
+#endif
\ No newline at end of file
Modified: sandbox/jng/common_decouple_v3/Common/Stylization/Stylizer.h
===================================================================
--- sandbox/jng/common_decouple_v3/Common/Stylization/Stylizer.h 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Common/Stylization/Stylizer.h 2019-02-05 15:26:24 UTC (rev 9476)
@@ -20,14 +20,13 @@
#include "Stylization.h"
#include "Bounds.h"
-#include "RS_InputStream.h"
-#include "RS_FeatureReader.h"
//forward declare
class Renderer;
class GeometryAdapter;
class CSysTransformer;
-
+class RS_FeatureReader;
+class RS_InputStream;
class SE_ExpressionEvaluatorFactory;
///<summary>
Modified: sandbox/jng/common_decouple_v3/Server/src/Services/Kml/ServerKmlService.vcxproj
===================================================================
--- sandbox/jng/common_decouple_v3/Server/src/Services/Kml/ServerKmlService.vcxproj 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Server/src/Services/Kml/ServerKmlService.vcxproj 2019-02-05 15:26:24 UTC (rev 9476)
@@ -95,7 +95,7 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\..\..\Common\Foundation;..\..\..\..\Common\Geometry;..\..\..\..\Common\PlatformBase;..\..\..\..\Common\MapGuideCommon;..\..\..\..\Common\MdfParser;..\..\..\..\Common\MdfModel;..\..\..\..\Common\Renderers;..\..\..\..\Common\Stylization;..\..\Common;..\..\Common\Base;..\..\Common\Manager;..\Feature;..\Mapping;..\..\..\..\Oem\ACE\ACE_wrappers;..\..\..\..\Oem\dbxml\xerces-c-src\src;..\..\..\..\Oem\DWFTK\develop\global\src;..\..\..\..\Oem\FDO\inc;..\..\..\..\Oem\FDO\inc\ExpressionEngine;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;MG_SERVER_KML_EXPORTS;DWFCORE_STATIC;DWFTK_USE_DWFCORE_ZLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;MG_SERVER_KML_EXPORTS;WITH_FDO;DWFCORE_STATIC;DWFTK_USE_DWFCORE_ZLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>Async</ExceptionHandling>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
@@ -121,7 +121,7 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\..\..\Common\Foundation;..\..\..\..\Common\Geometry;..\..\..\..\Common\PlatformBase;..\..\..\..\Common\MapGuideCommon;..\..\..\..\Common\MdfParser;..\..\..\..\Common\MdfModel;..\..\..\..\Common\Renderers;..\..\..\..\Common\Stylization;..\..\Common;..\..\Common\Base;..\..\Common\Manager;..\Feature;..\Mapping;..\..\..\..\Oem\ACE\ACE_wrappers;..\..\..\..\Oem\dbxml\xerces-c-src\src;..\..\..\..\Oem\DWFTK\develop\global\src;..\..\..\..\Oem\FDO\inc;..\..\..\..\Oem\FDO\inc\ExpressionEngine;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;MG_SERVER_KML_EXPORTS;DWFCORE_STATIC;DWFTK_USE_DWFCORE_ZLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;MG_SERVER_KML_EXPORTS;WITH_FDO;DWFCORE_STATIC;DWFTK_USE_DWFCORE_ZLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>Async</ExceptionHandling>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
@@ -147,7 +147,7 @@
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<AdditionalIncludeDirectories>..\..\..\..\Common\Foundation;..\..\..\..\Common\Geometry;..\..\..\..\Common\PlatformBase;..\..\..\..\Common\MapGuideCommon;..\..\..\..\Common\MdfParser;..\..\..\..\Common\MdfModel;..\..\..\..\Common\Renderers;..\..\..\..\Common\Stylization;..\..\Common;..\..\Common\Base;..\..\Common\Manager;..\Feature;..\Mapping;..\..\..\..\Oem\ACE\ACE_wrappers;..\..\..\..\Oem\dbxml\xerces-c-src\src;..\..\..\..\Oem\DWFTK\develop\global\src;..\..\..\..\Oem\FDO\inc;..\..\..\..\Oem\FDO\inc\ExpressionEngine;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MG_SERVER_KML_EXPORTS;DWFCORE_STATIC;DWFTK_USE_DWFCORE_ZLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MG_SERVER_KML_EXPORTS;WITH_FDO;DWFCORE_STATIC;DWFTK_USE_DWFCORE_ZLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>Async</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
@@ -174,7 +174,7 @@
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<AdditionalIncludeDirectories>..\..\..\..\Common\Foundation;..\..\..\..\Common\Geometry;..\..\..\..\Common\PlatformBase;..\..\..\..\Common\MapGuideCommon;..\..\..\..\Common\MdfParser;..\..\..\..\Common\MdfModel;..\..\..\..\Common\Renderers;..\..\..\..\Common\Stylization;..\..\Common;..\..\Common\Base;..\..\Common\Manager;..\Feature;..\Mapping;..\..\..\..\Oem\ACE\ACE_wrappers;..\..\..\..\Oem\dbxml\xerces-c-src\src;..\..\..\..\Oem\DWFTK\develop\global\src;..\..\..\..\Oem\FDO\inc;..\..\..\..\Oem\FDO\inc\ExpressionEngine;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MG_SERVER_KML_EXPORTS;DWFCORE_STATIC;DWFTK_USE_DWFCORE_ZLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MG_SERVER_KML_EXPORTS;WITH_FDO;DWFCORE_STATIC;DWFTK_USE_DWFCORE_ZLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>Async</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
Modified: sandbox/jng/common_decouple_v3/Server/src/Services/Mapping/RSMgRaster.cpp
===================================================================
--- sandbox/jng/common_decouple_v3/Server/src/Services/Mapping/RSMgRaster.cpp 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Server/src/Services/Mapping/RSMgRaster.cpp 2019-02-05 15:26:24 UTC (rev 9476)
@@ -54,14 +54,14 @@
return m_height;
}
-int RSMgRaster::GetBitsPerPixel()
+RS_Int32 RSMgRaster::GetBitsPerPixel()
{
return m_raster->GetBitsPerPixel();
}
-int RSMgRaster::GetDataModelType()
+RS_RasterDataModelType RSMgRaster::GetDataModelType()
{
- return m_raster->GetDataModelType();
+ return static_cast<RS_RasterDataModelType>(m_raster->GetDataModelType());
}
@@ -115,9 +115,9 @@
return NULL;
}
-int RSMgRaster::GetDataType()
+RS_RasterDataType RSMgRaster::GetDataType()
{
- return m_raster->GetDataType();
+ return static_cast<RS_RasterDataType>(m_raster->GetDataType());
}
RS_String RSMgRaster::GetVerticalUnits()
@@ -125,12 +125,12 @@
return m_raster->GetVerticalUnits();
}
-int RSMgRaster::GetNullValueType()
+RS_DataType RSMgRaster::GetNullValueType()
{
- return m_raster->GetNullValueType();
+ return static_cast<RS_DataType>(m_raster->GetNullValueType());
}
-INT64 RSMgRaster::GetNullValueData()
+RS_Int64 RSMgRaster::GetNullValueData()
{
return m_raster->GetNullValue();
}
Modified: sandbox/jng/common_decouple_v3/Server/src/Services/Mapping/RSMgRaster.h
===================================================================
--- sandbox/jng/common_decouple_v3/Server/src/Services/Mapping/RSMgRaster.h 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Server/src/Services/Mapping/RSMgRaster.h 2019-02-05 15:26:24 UTC (rev 9476)
@@ -28,24 +28,21 @@
RSMgRaster(MgRaster* raster);
virtual ~RSMgRaster();
- virtual RS_Bounds GetExtent();
+ virtual RS_Bounds GetExtent();
- virtual int GetOriginalWidth();
- virtual int GetOriginalHeight();
+ virtual int GetOriginalWidth();
+ virtual int GetOriginalHeight();
- virtual int GetBitsPerPixel();
- virtual int GetDataModelType();
+ virtual RS_Int32 GetBitsPerPixel();
+ virtual RS_RasterDataModelType GetDataModelType();
- virtual RS_InputStream* GetPalette();
+ virtual RS_InputStream* GetPalette();
- virtual RS_InputStream* GetStream(RS_ImageFormat format,
- int width,
- int height
- );
- virtual int GetDataType();
- virtual RS_String GetVerticalUnits();
- virtual int GetNullValueType();
- virtual INT64 GetNullValueData();
+ virtual RS_InputStream* GetStream(RS_ImageFormat format, int width, int height);
+ virtual RS_RasterDataType GetDataType();
+ virtual RS_String GetVerticalUnits();
+ virtual RS_DataType GetNullValueType();
+ virtual RS_Int64 GetNullValueData();
private:
Modified: sandbox/jng/common_decouple_v3/Server/src/Services/Mapping/ServerMappingService.vcxproj
===================================================================
--- sandbox/jng/common_decouple_v3/Server/src/Services/Mapping/ServerMappingService.vcxproj 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Server/src/Services/Mapping/ServerMappingService.vcxproj 2019-02-05 15:26:24 UTC (rev 9476)
@@ -95,7 +95,7 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\Common;..\..\Common\Base;..\..\Common\Cache;..\..\Common\Manager;..\Feature;..\..\..\..\Common\Foundation;..\..\..\..\Common\Geometry;..\..\..\..\Common\PlatformBase;..\..\..\..\Common\MapGuideCommon;..\..\..\..\Common\MdfModel;..\..\..\..\Common\MdfParser;..\..\..\..\Common\Renderers;..\..\..\..\Common\Stylization;..\..\..\..\Oem\ACE\ACE_wrappers;..\..\..\..\Oem\dbxml\xerces-c-src\src;..\..\..\..\Oem\FDO\inc;..\..\..\..\Oem\FDO\inc\ExpressionEngine;..\..\Gws\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;MG_SERVER_MAPPING_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;MG_SERVER_MAPPING_EXPORTS;WITH_FDO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>Async</ExceptionHandling>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
@@ -122,7 +122,7 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\Common;..\..\Common\Base;..\..\Common\Cache;..\..\Common\Manager;..\Feature;..\..\..\..\Common\Foundation;..\..\..\..\Common\Geometry;..\..\..\..\Common\PlatformBase;..\..\..\..\Common\MapGuideCommon;..\..\..\..\Common\MdfModel;..\..\..\..\Common\MdfParser;..\..\..\..\Common\Renderers;..\..\..\..\Common\Stylization;..\..\..\..\Oem\ACE\ACE_wrappers;..\..\..\..\Oem\dbxml\xerces-c-src\src;..\..\..\..\Oem\FDO\inc;..\..\..\..\Oem\FDO\inc\ExpressionEngine;..\..\Gws\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;MG_SERVER_MAPPING_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;MG_SERVER_MAPPING_EXPORTS;WITH_FDO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>Async</ExceptionHandling>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
@@ -149,7 +149,7 @@
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<AdditionalIncludeDirectories>..\..\Common;..\..\Common\Base;..\..\Common\Cache;..\..\Common\Manager;..\Feature;..\..\..\..\Common\Foundation;..\..\..\..\Common\Geometry;..\..\..\..\Common\PlatformBase;..\..\..\..\Common\MapGuideCommon;..\..\..\..\Common\MdfModel;..\..\..\..\Common\MdfParser;..\..\..\..\Common\Renderers;..\..\..\..\Common\Stylization;..\..\..\..\Oem\ACE\ACE_wrappers;..\..\..\..\Oem\dbxml\xerces-c-src\src;..\..\..\..\Oem\FDO\inc;..\..\..\..\Oem\FDO\inc\ExpressionEngine;..\..\Gws\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MG_SERVER_MAPPING_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MG_SERVER_MAPPING_EXPORTS;WITH_FDO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>Async</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
@@ -177,7 +177,7 @@
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<AdditionalIncludeDirectories>..\..\Common;..\..\Common\Base;..\..\Common\Cache;..\..\Common\Manager;..\Feature;..\..\..\..\Common\Foundation;..\..\..\..\Common\Geometry;..\..\..\..\Common\PlatformBase;..\..\..\..\Common\MapGuideCommon;..\..\..\..\Common\MdfModel;..\..\..\..\Common\MdfParser;..\..\..\..\Common\Renderers;..\..\..\..\Common\Stylization;..\..\..\..\Oem\ACE\ACE_wrappers;..\..\..\..\Oem\dbxml\xerces-c-src\src;..\..\..\..\Oem\FDO\inc;..\..\..\..\Oem\FDO\inc\ExpressionEngine;..\..\Gws\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MG_SERVER_MAPPING_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MG_SERVER_MAPPING_EXPORTS;WITH_FDO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>Async</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
Modified: sandbox/jng/common_decouple_v3/Server/src/Services/Rendering/ServerRenderingService.vcxproj
===================================================================
--- sandbox/jng/common_decouple_v3/Server/src/Services/Rendering/ServerRenderingService.vcxproj 2019-02-05 13:44:22 UTC (rev 9475)
+++ sandbox/jng/common_decouple_v3/Server/src/Services/Rendering/ServerRenderingService.vcxproj 2019-02-05 15:26:24 UTC (rev 9476)
@@ -95,7 +95,7 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\Common;..\..\Common\Base;..\..\Common\Cache;..\..\Common\Manager;..\Feature;..\Mapping;..\..\..\..\Common\Foundation;..\..\..\..\Common\Geometry;..\..\..\..\Common\PlatformBase;..\..\..\..\Common\MapGuideCommon;..\..\..\..\Common\MdfModel;..\..\..\..\Common\Renderers;..\..\..\..\Common\Stylization;..\..\..\..\Oem\ACE\ACE_wrappers;..\..\..\..\Oem\dbxml\xerces-c-src\src;..\..\..\..\Oem\FDO\inc;..\..\..\..\Oem\FDO\inc\ExpressionEngine;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;MG_SERVER_RENDERING_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;MG_SERVER_RENDERING_EXPORTS;WITH_FDO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>Async</ExceptionHandling>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
@@ -121,7 +121,7 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\Common;..\..\Common\Base;..\..\Common\Cache;..\..\Common\Manager;..\Feature;..\Mapping;..\..\..\..\Common\Foundation;..\..\..\..\Common\Geometry;..\..\..\..\Common\PlatformBase;..\..\..\..\Common\MapGuideCommon;..\..\..\..\Common\MdfModel;..\..\..\..\Common\Renderers;..\..\..\..\Common\Stylization;..\..\..\..\Oem\ACE\ACE_wrappers;..\..\..\..\Oem\dbxml\xerces-c-src\src;..\..\..\..\Oem\FDO\inc;..\..\..\..\Oem\FDO\inc\ExpressionEngine;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;MG_SERVER_RENDERING_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;MG_SERVER_RENDERING_EXPORTS;WITH_FDO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>Async</ExceptionHandling>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
@@ -147,7 +147,7 @@
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<AdditionalIncludeDirectories>..\..\Common;..\..\Common\Base;..\..\Common\Cache;..\..\Common\Manager;..\Feature;..\Mapping;..\..\..\..\Common\Foundation;..\..\..\..\Common\Geometry;..\..\..\..\Common\PlatformBase;..\..\..\..\Common\MapGuideCommon;..\..\..\..\Common\MdfModel;..\..\..\..\Common\Renderers;..\..\..\..\Common\Stylization;..\..\..\..\Oem\ACE\ACE_wrappers;..\..\..\..\Oem\dbxml\xerces-c-src\src;..\..\..\..\Oem\FDO\inc;..\..\..\..\Oem\FDO\inc\ExpressionEngine;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MG_SERVER_RENDERING_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MG_SERVER_RENDERING_EXPORTS;WITH_FDO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>Async</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
@@ -174,7 +174,7 @@
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<AdditionalIncludeDirectories>..\..\Common;..\..\Common\Base;..\..\Common\Cache;..\..\Common\Manager;..\Feature;..\Mapping;..\..\..\..\Common\Foundation;..\..\..\..\Common\Geometry;..\..\..\..\Common\PlatformBase;..\..\..\..\Common\MapGuideCommon;..\..\..\..\Common\MdfModel;..\..\..\..\Common\Renderers;..\..\..\..\Common\Stylization;..\..\..\..\Oem\ACE\ACE_wrappers;..\..\..\..\Oem\dbxml\xerces-c-src\src;..\..\..\..\Oem\FDO\inc;..\..\..\..\Oem\FDO\inc\ExpressionEngine;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MG_SERVER_RENDERING_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MG_SERVER_RENDERING_EXPORTS;WITH_FDO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>Async</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
More information about the mapguide-commits
mailing list