[mapguide-commits] r5141 - in sandbox/rfc94/Common:
CoordinateSystem Geometry/CoordinateSystem
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Fri Sep 17 07:35:15 EDT 2010
Author: baertelchen
Date: 2010-09-17 11:35:15 +0000 (Fri, 17 Sep 2010)
New Revision: 5141
Modified:
sandbox/rfc94/Common/CoordinateSystem/CoordSysDatum.cpp
sandbox/rfc94/Common/CoordinateSystem/CoordSysDatum.h
sandbox/rfc94/Common/CoordinateSystem/CoordSysEllipsoid.cpp
sandbox/rfc94/Common/CoordinateSystem/CoordSysEllipsoid.h
sandbox/rfc94/Common/CoordinateSystem/CoordSysMacro.h
sandbox/rfc94/Common/Geometry/CoordinateSystem/CoordinateSystemDatum.h
sandbox/rfc94/Common/Geometry/CoordinateSystem/CoordinateSystemEllipsoid.h
Log:
Added INT16 Get/SetEpsgCode to MgCoordinateSystemDatum and MgCoordinateSystemEllipsoid.
Modified: sandbox/rfc94/Common/CoordinateSystem/CoordSysDatum.cpp
===================================================================
--- sandbox/rfc94/Common/CoordinateSystem/CoordSysDatum.cpp 2010-09-17 10:59:32 UTC (rev 5140)
+++ sandbox/rfc94/Common/CoordinateSystem/CoordSysDatum.cpp 2010-09-17 11:35:15 UTC (rev 5141)
@@ -15,6 +15,8 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//
+#include "CoordSysMacro.h"
+
#include "GeometryCommon.h"
#include "CoordSysCommon.h"
#include "CriticalSection.h"
@@ -562,6 +564,10 @@
SetString(sSource, &m_DtDef.source[0], sizeof(m_DtDef.source));
}
+//Gets/Sets the EPSG code
+//
+DEFINE_GET_SET_NUMERIC(CCoordinateSystemDatum,EpsgCode,INT16,this->m_DtDef.epsgNbr)
+
//Returns whether the specified string is a legal source string
//
bool CCoordinateSystemDatum::IsLegalSource(CREFSTRING sSource)
Modified: sandbox/rfc94/Common/CoordinateSystem/CoordSysDatum.h
===================================================================
--- sandbox/rfc94/Common/CoordinateSystem/CoordSysDatum.h 2010-09-17 10:59:32 UTC (rev 5140)
+++ sandbox/rfc94/Common/CoordinateSystem/CoordSysDatum.h 2010-09-17 11:35:15 UTC (rev 5141)
@@ -44,6 +44,8 @@
virtual bool IsLegalGroup(CREFSTRING sGroup);
virtual STRING GetSource();
virtual void SetSource(CREFSTRING sSource);
+ virtual INT16 GetEpsgCode();
+ virtual void SetEpsgCode(INT16 epsgCode);
virtual bool IsLegalSource(CREFSTRING sSource);
virtual bool IsProtected();
virtual INT16 GetAge();
Modified: sandbox/rfc94/Common/CoordinateSystem/CoordSysEllipsoid.cpp
===================================================================
--- sandbox/rfc94/Common/CoordinateSystem/CoordSysEllipsoid.cpp 2010-09-17 10:59:32 UTC (rev 5140)
+++ sandbox/rfc94/Common/CoordinateSystem/CoordSysEllipsoid.cpp 2010-09-17 11:35:15 UTC (rev 5141)
@@ -15,6 +15,8 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//
+#include "CoordSysMacro.h"
+
#include "GeometryCommon.h"
#include "CoordSysCommon.h"
@@ -416,6 +418,10 @@
SetString(sSource, &m_def.source[0], sizeof(m_def.source));
}
+//Gets/Sets the EPSG code
+//
+DEFINE_GET_SET_NUMERIC(CCoordinateSystemEllipsoid,EpsgCode,INT16,this->m_def.epsgNbr)
+
//Returns whether the specified string is a legal source string
//
bool CCoordinateSystemEllipsoid::IsLegalSource(CREFSTRING sSource)
Modified: sandbox/rfc94/Common/CoordinateSystem/CoordSysEllipsoid.h
===================================================================
--- sandbox/rfc94/Common/CoordinateSystem/CoordSysEllipsoid.h 2010-09-17 10:59:32 UTC (rev 5140)
+++ sandbox/rfc94/Common/CoordinateSystem/CoordSysEllipsoid.h 2010-09-17 11:35:15 UTC (rev 5141)
@@ -45,6 +45,8 @@
virtual bool IsLegalGroup(CREFSTRING sGroup);
virtual STRING GetSource();
virtual void SetSource(CREFSTRING sSource);
+ virtual INT16 GetEpsgCode();
+ virtual void SetEpsgCode(INT16 epsgCode);
virtual bool IsLegalSource(CREFSTRING sSource);
virtual bool IsProtected();
virtual INT16 GetAge();
Modified: sandbox/rfc94/Common/CoordinateSystem/CoordSysMacro.h
===================================================================
--- sandbox/rfc94/Common/CoordinateSystem/CoordSysMacro.h 2010-09-17 10:59:32 UTC (rev 5140)
+++ sandbox/rfc94/Common/CoordinateSystem/CoordSysMacro.h 2010-09-17 11:35:15 UTC (rev 5141)
@@ -19,79 +19,79 @@
#define _MG_COORDSYSMACRO_H_
//make sure to have CS_MAP_DEF_VARIABLE defined before including this header; this is used by VERIFY_INITIALIZED(x)
-
-#ifdef CS_MAP_DEF_VARIABLE
#define MAKE_L_STRING(x) L## #x
+#ifdef CS_MAP_DEF_VARIABLE
#define VERIFY_INITIALIZED(x) if (NULL == CS_MAP_DEF_VARIABLE) \
throw new MgInvalidOperationException(x, __LINE__, __WFILE__, NULL, L"", NULL)
+#else
+ #define VERIFY_INITIALIZED(x)
+#endif
- #define VERIFY_NOT_PROTECTED(x) if (this->IsProtected()) \
+#define VERIFY_NOT_PROTECTED(x) if (this->IsProtected()) \
throw new MgCoordinateSystemInitializationFailedException(x, __LINE__, __WFILE__, NULL, L"MgCoordinateSystemProtectedException", NULL);
- #define DEFINE_GET_STRING(x,y) STRING x::Get##y()
- #define DEFINE_SET_STRING(x,y) void x::Set##y(CREFSTRING propertyValue)
+#define DEFINE_GET_STRING(x,y) STRING x::Get##y()
+#define DEFINE_SET_STRING(x,y) void x::Set##y(CREFSTRING propertyValue)
- #define DEFINE_GET_SET_STRING(className,propertyName,charBuffer) \
- DEFINE_GET_STRING(className,propertyName) \
- { \
- VERIFY_INITIALIZED(MAKE_L_STRING(className##.Get##propertyName)); \
- return MentorReadString(charBuffer); \
- } \
- DEFINE_SET_STRING(className,propertyName) \
- { \
- VERIFY_INITIALIZED(MAKE_L_STRING(className##.Set##propertyName)); \
- if (this->IsProtected()) \
- throw new MgCoordinateSystemInitializationFailedException(L"SetString", __LINE__, __WFILE__, NULL, L"MgCoordinateSystemProtectedException", NULL); \
- \
- MentorSetString(propertyValue, charBuffer /* target buffer */, sizeof(charBuffer)); \
- }
+#define DEFINE_GET_SET_STRING(className,propertyName,charBuffer) \
+ DEFINE_GET_STRING(className,propertyName) \
+ { \
+ VERIFY_INITIALIZED(MAKE_L_STRING(className##.Get##propertyName)); \
+ return MentorReadString(charBuffer); \
+ } \
+ DEFINE_SET_STRING(className,propertyName) \
+ { \
+ VERIFY_INITIALIZED(MAKE_L_STRING(className##.Set##propertyName)); \
+ if (this->IsProtected()) \
+ throw new MgCoordinateSystemInitializationFailedException(L"SetString", __LINE__, __WFILE__, NULL, L"MgCoordinateSystemProtectedException", NULL); \
+ \
+ MentorSetString(propertyValue, charBuffer /* target buffer */, sizeof(charBuffer)); \
+ }
- #define DEFINE_GET_NUMERIC(x,y,targetType) targetType x::Get##y()
- #define DEFINE_SET_NUMERIC(x,y,targetType) void x::Set##y(targetType propertyValue)
+#define DEFINE_GET_NUMERIC(x,y,targetType) targetType x::Get##y()
+#define DEFINE_SET_NUMERIC(x,y,targetType) void x::Set##y(targetType propertyValue)
- #define DEFINE_GET_NUMERIC_IDX(x,y,targetType) targetType x::Get##y(INT32 index)
- #define DEFINE_SET_NUMERIC_IDX(x,y,targetType) void x::Set##y(INT32 index, targetType propertyValue)
+#define DEFINE_GET_NUMERIC_IDX(x,y,targetType) targetType x::Get##y(INT32 index)
+#define DEFINE_SET_NUMERIC_IDX(x,y,targetType) void x::Set##y(INT32 index, targetType propertyValue)
- #define DEFINE_GET_SET_NUMERIC(className, propertyName,targetType,target) \
- DEFINE_GET_NUMERIC(className,propertyName,targetType) \
- { \
- VERIFY_INITIALIZED(MAKE_L_STRING(className##.Get##propertyName)); \
- return target; \
- } \
- DEFINE_SET_NUMERIC(className,propertyName,targetType) \
- { \
- VERIFY_INITIALIZED(MAKE_L_STRING(className##.Set##propertyName)); \
- if (this->IsProtected()) \
- throw new MgCoordinateSystemInitializationFailedException(L"SetValue", __LINE__, __WFILE__, NULL, L"MgCoordinateSystemProtectedException", NULL); \
- \
- target = propertyValue;\
- }
+#define DEFINE_GET_SET_NUMERIC(className, propertyName,targetType,target) \
+ DEFINE_GET_NUMERIC(className,propertyName,targetType) \
+ { \
+ VERIFY_INITIALIZED(MAKE_L_STRING(className##.Get##propertyName)); \
+ return target; \
+ } \
+ DEFINE_SET_NUMERIC(className,propertyName,targetType) \
+ { \
+ VERIFY_INITIALIZED(MAKE_L_STRING(className##.Set##propertyName)); \
+ if (this->IsProtected()) \
+ throw new MgCoordinateSystemInitializationFailedException(L"SetValue", __LINE__, __WFILE__, NULL, L"MgCoordinateSystemProtectedException", NULL); \
+ \
+ target = propertyValue;\
+ }
- #define DEFINE_GET_SET_NUMERIC_IDX(className, propertyName,targetType,target,maxIdx) \
- DEFINE_GET_NUMERIC_IDX(className,propertyName,targetType) \
- { \
- VERIFY_INITIALIZED(MAKE_L_STRING(className##.Get##propertyName)); \
- if (index < 0 || index > maxIdx) \
- throw new MgArgumentOutOfRangeException(L"GetValue", __LINE__, __WFILE__, NULL, L"MgCoordinateSystemProtectedException", NULL); \
- \
- return target[index]; \
- } \
- DEFINE_SET_NUMERIC_IDX(className,propertyName,targetType) \
- { \
- VERIFY_INITIALIZED(MAKE_L_STRING(className##.Set##propertyName)); \
- if (this->IsProtected()) \
- throw new MgCoordinateSystemInitializationFailedException(L"SetValue", __LINE__, __WFILE__, NULL, L"MgCoordinateSystemProtectedException", NULL); \
- \
- if (index < 0 || index > maxIdx) \
- throw new MgArgumentOutOfRangeException(L"GetValue", __LINE__, __WFILE__, NULL, L"MgCoordinateSystemProtectedException", NULL); \
- \
- target[index] = propertyValue;\
- }
+#define DEFINE_GET_SET_NUMERIC_IDX(className, propertyName,targetType,target,maxIdx) \
+ DEFINE_GET_NUMERIC_IDX(className,propertyName,targetType) \
+ { \
+ VERIFY_INITIALIZED(MAKE_L_STRING(className##.Get##propertyName)); \
+ if (index < 0 || index > maxIdx) \
+ throw new MgArgumentOutOfRangeException(L"GetValue", __LINE__, __WFILE__, NULL, L"MgCoordinateSystemProtectedException", NULL); \
+ \
+ return target[index]; \
+ } \
+ DEFINE_SET_NUMERIC_IDX(className,propertyName,targetType) \
+ { \
+ VERIFY_INITIALIZED(MAKE_L_STRING(className##.Set##propertyName)); \
+ if (this->IsProtected()) \
+ throw new MgCoordinateSystemInitializationFailedException(L"SetValue", __LINE__, __WFILE__, NULL, L"MgCoordinateSystemProtectedException", NULL); \
+ \
+ if (index < 0 || index > maxIdx) \
+ throw new MgArgumentOutOfRangeException(L"GetValue", __LINE__, __WFILE__, NULL, L"MgCoordinateSystemProtectedException", NULL); \
+ \
+ target[index] = propertyValue;\
+ }
-#endif
-
#define ENSURE_NOT_NULL(param,method) \
if (NULL == param) \
throw new MgNullArgumentException(L# method, __LINE__, __WFILE__, NULL, L"", NULL)
Modified: sandbox/rfc94/Common/Geometry/CoordinateSystem/CoordinateSystemDatum.h
===================================================================
--- sandbox/rfc94/Common/Geometry/CoordinateSystem/CoordinateSystemDatum.h 2010-09-17 10:59:32 UTC (rev 5140)
+++ sandbox/rfc94/Common/Geometry/CoordinateSystem/CoordinateSystemDatum.h 2010-09-17 11:35:15 UTC (rev 5141)
@@ -40,6 +40,8 @@
virtual bool IsLegalGroup(CREFSTRING sGroup)=0;
virtual STRING GetSource()=0;
virtual void SetSource(CREFSTRING sSource)=0;
+ virtual INT16 GetEpsgCode()=0;
+ virtual void SetEpsgCode(INT16 epsgCode)=0;
virtual bool IsLegalSource(CREFSTRING sSource)=0;
virtual bool IsProtected()=0;
virtual INT16 GetAge()=0;
Modified: sandbox/rfc94/Common/Geometry/CoordinateSystem/CoordinateSystemEllipsoid.h
===================================================================
--- sandbox/rfc94/Common/Geometry/CoordinateSystem/CoordinateSystemEllipsoid.h 2010-09-17 10:59:32 UTC (rev 5140)
+++ sandbox/rfc94/Common/Geometry/CoordinateSystem/CoordinateSystemEllipsoid.h 2010-09-17 11:35:15 UTC (rev 5141)
@@ -38,6 +38,8 @@
virtual bool IsLegalGroup(CREFSTRING sGroup)=0;
virtual STRING GetSource()=0;
virtual void SetSource(CREFSTRING sSource)=0;
+ virtual INT16 GetEpsgCode()=0;
+ virtual void SetEpsgCode(INT16 epsgCode)=0;
virtual bool IsLegalSource(CREFSTRING sSource)=0;
virtual bool IsProtected()=0;
virtual INT16 GetAge()=0;
More information about the mapguide-commits
mailing list