[mapguide-commits] r5171 - in trunk/MgDev/Common: .
CoordinateSystem Geometry Geometry/CoordinateSystem
Geometry/GeometryConsoleTest
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Tue Sep 21 12:53:51 EDT 2010
Author: NormOlsen
Date: 2010-09-21 16:53:51 +0000 (Tue, 21 Sep 2010)
New Revision: 5171
Modified:
trunk/MgDev/Common/Common.sln
trunk/MgDev/Common/CoordinateSystem/CoordSysDictionaryBase.h
trunk/MgDev/Common/CoordinateSystem/CoordSysGeodeticAnalyticalTransformDefParams.cpp
trunk/MgDev/Common/CoordinateSystem/CoordSysGeodeticInterpolationTransformDefParams.cpp
trunk/MgDev/Common/CoordinateSystem/CoordSysGeodeticMultipleRegressionTransformDefParams.cpp
trunk/MgDev/Common/CoordinateSystem/CoordSysGeodeticPath.cpp
trunk/MgDev/Common/CoordinateSystem/CoordSysGeodeticPathDictionary.cpp
trunk/MgDev/Common/CoordinateSystem/CoordSysGeodeticPathDictionary.h
trunk/MgDev/Common/CoordinateSystem/CoordSysGeodeticTransformDef.cpp
trunk/MgDev/Common/CoordinateSystem/CoordSysGeodeticTransformDefDictionary.cpp
trunk/MgDev/Common/CoordinateSystem/CoordSysGeodeticTransformDefDictionary.h
trunk/MgDev/Common/CoordinateSystem/CoordSysGeodeticTransformGridFile.cpp
trunk/MgDev/Common/CoordinateSystem/CoordSysMacro.h
trunk/MgDev/Common/CoordinateSystem/MentorUtil.cpp
trunk/MgDev/Common/Geometry/CoordinateSystem/CoordinateSystemGeodeticTransformDefParams.h
trunk/MgDev/Common/Geometry/GeometryConsoleTest/GeometryConsoleTest.cpp
trunk/MgDev/Common/Geometry/GeometryConsoleTest/GeometryConsoleTest.vcproj
trunk/MgDev/Common/Geometry/Makefile.am
Log:
Build fix, should include line ending correction as well.
Modified: trunk/MgDev/Common/Common.sln
===================================================================
--- trunk/MgDev/Common/Common.sln 2010-09-21 14:52:39 UTC (rev 5170)
+++ trunk/MgDev/Common/Common.sln 2010-09-21 16:53:51 UTC (rev 5171)
@@ -49,6 +49,8 @@
{C50254F2-654A-48DE-AF5B-20605AEF8D10} = {C50254F2-654A-48DE-AF5B-20605AEF8D10}
EndProjectSection
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GeometryConsoleTest", "Geometry\GeometryConsoleTest\GeometryConsoleTest.vcproj", "{F1285F4D-3CB7-427A-A2E8-43A575932C9F}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@@ -125,6 +127,12 @@
{96CA495A-2450-4F27-B318-E95D24268AAE}.Debug|x64.ActiveCfg = Debug|x64
{96CA495A-2450-4F27-B318-E95D24268AAE}.Release|Win32.ActiveCfg = Release|Win32
{96CA495A-2450-4F27-B318-E95D24268AAE}.Release|x64.ActiveCfg = Release|x64
+ {F1285F4D-3CB7-427A-A2E8-43A575932C9F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {F1285F4D-3CB7-427A-A2E8-43A575932C9F}.Debug|Win32.Build.0 = Debug|Win32
+ {F1285F4D-3CB7-427A-A2E8-43A575932C9F}.Debug|x64.ActiveCfg = Debug|Win32
+ {F1285F4D-3CB7-427A-A2E8-43A575932C9F}.Release|Win32.ActiveCfg = Release|Win32
+ {F1285F4D-3CB7-427A-A2E8-43A575932C9F}.Release|Win32.Build.0 = Release|Win32
+ {F1285F4D-3CB7-427A-A2E8-43A575932C9F}.Release|x64.ActiveCfg = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Modified: trunk/MgDev/Common/CoordinateSystem/CoordSysDictionaryBase.h
===================================================================
--- trunk/MgDev/Common/CoordinateSystem/CoordSysDictionaryBase.h 2010-09-21 14:52:39 UTC (rev 5170)
+++ trunk/MgDev/Common/CoordinateSystem/CoordSysDictionaryBase.h 2010-09-21 16:53:51 UTC (rev 5171)
@@ -22,8 +22,8 @@
#define MAP_CS_DEFAULT_FILE_NAME(x) L## x //builds the wchar_t default filename from the #define found in cs_map.h, e.g. from [cs_GP_NAME]
#define DICTIONARY_FILE_NAME(x) DefaultDictName##x //defines the name of the extern variable we need to initialize each template class with
-#define DECLARE_DICTIONARY_FILE_NAME(x) extern const ACE_TCHAR DefaultDictName##x[] //declares(!) the extern variable we need for the template class
-#define DEFINE_DICTIONARY_FILE_NAME(x,y) extern const ACE_TCHAR DefaultDictName##x[] = MAP_CS_DEFAULT_FILE_NAME(y) //defines(!) the extern variable we need for the template class
+#define DECLARE_DICTIONARY_FILE_NAME(x) extern const wchar_t DefaultDictName##x[] //declares(!) the extern variable we need for the template class
+#define DEFINE_DICTIONARY_FILE_NAME(x,y) const wchar_t DefaultDictName##x[] = MAP_CS_DEFAULT_FILE_NAME(y) //defines(!) the extern variable we need for the template class
//typedef of the callback that's being invoked, when a dictionary file is being opened; the invoked method
//has to specify the open mode the target dictionary file has to be opened with; the [long] parameter is the magic header number
Modified: trunk/MgDev/Common/CoordinateSystem/CoordSysGeodeticAnalyticalTransformDefParams.cpp
===================================================================
--- trunk/MgDev/Common/CoordinateSystem/CoordSysGeodeticAnalyticalTransformDefParams.cpp 2010-09-21 14:52:39 UTC (rev 5170)
+++ trunk/MgDev/Common/CoordinateSystem/CoordSysGeodeticAnalyticalTransformDefParams.cpp 2010-09-21 16:53:51 UTC (rev 5171)
@@ -62,7 +62,7 @@
void CCoordinateSystemGeodeticAnalyticalTransformDefParams::CopyTo(void* target) const
{
- ENSURE_NOT_NULL(target, CCoordinateSystemGeodeticAnalyticalTransformDefParams::CopyTo);
+ ENSURE_NOT_NULL(target, L"CCoordinateSystemGeodeticAnalyticalTransformDefParams.CopyTo");
memcpy(target, this->geocentricTransformParams, sizeof(cs_GeodeticTransform_::csGeodeticXformParameters::csGeodeticXformParmsGeocentric));
}
Modified: trunk/MgDev/Common/CoordinateSystem/CoordSysGeodeticInterpolationTransformDefParams.cpp
===================================================================
--- trunk/MgDev/Common/CoordinateSystem/CoordSysGeodeticInterpolationTransformDefParams.cpp 2010-09-21 14:52:39 UTC (rev 5170)
+++ trunk/MgDev/Common/CoordinateSystem/CoordSysGeodeticInterpolationTransformDefParams.cpp 2010-09-21 16:53:51 UTC (rev 5171)
@@ -77,7 +77,7 @@
VERIFY_NOT_PROTECTED(L"CCoordinateSystemGeodeticInterpolationTransformDefParams.SetGridFiles");
//we don't take ownership over fileNames
- ENSURE_NOT_NULL(gridFiles, CCoordinateSystemGeodeticInterpolationTransformDefParams::SetGridFileNames);
+ ENSURE_NOT_NULL(gridFiles, L"CCoordinateSystemGeodeticInterpolationTransformDefParams.SetGridFileNames");
const INT32 fileNamesCount = gridFiles->GetCount();
if (fileNamesCount > csGRIDI1_FILEMAX)
throw new MgInvalidArgumentException(L"CCoordinateSystemGeodeticInterpolationTransformDefParams.SetGridFiles", __LINE__, __WFILE__, NULL, L"", NULL);
@@ -182,7 +182,7 @@
void CCoordinateSystemGeodeticInterpolationTransformDefParams::CopyTo(void* target) const
{
- ENSURE_NOT_NULL(target, CCoordinateSystemGeodeticInterpolationTransformDefParams::CopyTo);
+ ENSURE_NOT_NULL(target, L"CCoordinateSystemGeodeticInterpolationTransformDefParams.CopyTo");
memcpy(target, this->gridFileParams, sizeof(csGridFileXformParams));
}
\ No newline at end of file
Modified: trunk/MgDev/Common/CoordinateSystem/CoordSysGeodeticMultipleRegressionTransformDefParams.cpp
===================================================================
--- trunk/MgDev/Common/CoordinateSystem/CoordSysGeodeticMultipleRegressionTransformDefParams.cpp 2010-09-21 14:52:39 UTC (rev 5170)
+++ trunk/MgDev/Common/CoordinateSystem/CoordSysGeodeticMultipleRegressionTransformDefParams.cpp 2010-09-21 16:53:51 UTC (rev 5171)
@@ -74,7 +74,7 @@
void CCoordinateSystemGeodeticMultipleRegressionTransformDefParams::CopyTo(void* target) const
{
- ENSURE_NOT_NULL(target, CCoordinateSystemGeodeticMultipleRegressionTransformDefParams::CopyTo);
+ ENSURE_NOT_NULL(target, L"CCoordinateSystemGeodeticMultipleRegressionTransformDefParams.CopyTo");
memcpy(target, this->mulRegParams, sizeof(csMultipleRegressionXformParams));
}
Modified: trunk/MgDev/Common/CoordinateSystem/CoordSysGeodeticPath.cpp
===================================================================
--- trunk/MgDev/Common/CoordinateSystem/CoordSysGeodeticPath.cpp 2010-09-21 14:52:39 UTC (rev 5170)
+++ trunk/MgDev/Common/CoordinateSystem/CoordSysGeodeticPath.cpp 2010-09-21 16:53:51 UTC (rev 5171)
@@ -181,7 +181,7 @@
VERIFY_INITIALIZED(L"CCoordinateSystemGeodeticPath.SetPathElements");
VERIFY_NOT_PROTECTED(L"CCoordinateSystemGeodeticPath.SetPathElements");
- ENSURE_NOT_NULL(pathElements, CCoordinateSystemGeodeticPath::SetPathElements);
+ ENSURE_NOT_NULL(pathElements, L"CCoordinateSystemGeodeticPath.SetPathElements");
const INT32 pathElementCount = pathElements->GetCount();
if (0 == pathElementCount || pathElementCount > csPATH_MAXXFRM)
Modified: trunk/MgDev/Common/CoordinateSystem/CoordSysGeodeticPathDictionary.cpp
===================================================================
--- trunk/MgDev/Common/CoordinateSystem/CoordSysGeodeticPathDictionary.cpp 2010-09-21 14:52:39 UTC (rev 5170)
+++ trunk/MgDev/Common/CoordinateSystem/CoordSysGeodeticPathDictionary.cpp 2010-09-21 16:53:51 UTC (rev 5171)
@@ -56,13 +56,15 @@
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
CCoordinateSystemGeodeticPathDictionary::CCoordinateSystemGeodeticPathDictionary(MgCoordinateSystemCatalog *pCatalog)
- : m_pDictionary(new CCoordinateSystemDictionaryBase<CCoordinateSystemGeodeticPath, cs_GeodeticPath_, &definitionAccess, true, cs_GPDEF_MAGIC, DICTIONARY_FILE_NAME(GeodeticPath)>(pCatalog))
+ : m_pDictionary(NULL)
{
+ this->m_pDictionary = new CCoordinateSystemDictionaryBase<CCoordinateSystemGeodeticPath, cs_GeodeticPath_,
+ &definitionAccess, true, cs_GPDEF_MAGIC, DICTIONARY_FILE_NAME(GeodeticPath)>(pCatalog);
}
CCoordinateSystemGeodeticPathDictionary::~CCoordinateSystemGeodeticPathDictionary()
{
- this->m_pDictionary = NULL;
+ SAFE_RELEASE(this->m_pDictionary)
}
const char* CCoordinateSystemGeodeticPathDictionary::ReadName(const cs_GeodeticPath_& definition)
@@ -106,8 +108,8 @@
void CCoordinateSystemGeodeticPathDictionary::FullInitialize(CCoordinateSystemGeodeticPath* mgGeodeticPath, cs_GeodeticPath_* csPath, MgCoordinateSystemCatalog* catalog)
{
- ENSURE_NOT_NULL(mgGeodeticPath, CCoordinateSystemGeodeticPathDictionary::FullInitialize);
- ENSURE_NOT_NULL(csPath, CCoordinateSystemGeodeticPathDictionary::FullInitialize);
+ ENSURE_NOT_NULL(mgGeodeticPath, L"CCoordinateSystemGeodeticPathDictionary.FullInitialize");
+ ENSURE_NOT_NULL(csPath, L"CCoordinateSystemGeodeticPathDictionary.FullInitialize");
_ASSERT(NULL != catalog);
Modified: trunk/MgDev/Common/CoordinateSystem/CoordSysGeodeticPathDictionary.h
===================================================================
--- trunk/MgDev/Common/CoordinateSystem/CoordSysGeodeticPathDictionary.h 2010-09-21 14:52:39 UTC (rev 5170)
+++ trunk/MgDev/Common/CoordinateSystem/CoordSysGeodeticPathDictionary.h 2010-09-21 16:53:51 UTC (rev 5171)
@@ -64,8 +64,7 @@
protected:
- Ptr<CCoordinateSystemDictionaryBase<CCoordinateSystemGeodeticPath, cs_GeodeticPath_, \
- &definitionAccess, true, cs_GPDEF_MAGIC, DICTIONARY_FILE_NAME(GeodeticPath)>> m_pDictionary;
+ CCoordinateSystemDictionaryBase<CCoordinateSystemGeodeticPath, cs_GeodeticPath_, &definitionAccess, true, cs_GPDEF_MAGIC, DICTIONARY_FILE_NAME(GeodeticPath)>* m_pDictionary;
public:
Modified: trunk/MgDev/Common/CoordinateSystem/CoordSysGeodeticTransformDef.cpp
===================================================================
--- trunk/MgDev/Common/CoordinateSystem/CoordSysGeodeticTransformDef.cpp 2010-09-21 14:52:39 UTC (rev 5170)
+++ trunk/MgDev/Common/CoordinateSystem/CoordSysGeodeticTransformDef.cpp 2010-09-21 16:53:51 UTC (rev 5171)
@@ -253,7 +253,7 @@
}
//otherwise: make sure, we've been passed non null paramaters...
- ENSURE_NOT_NULL(parameters, CCoordinateSystemGeodeticTransformDef::SetParameters);
+ ENSURE_NOT_NULL(parameters, L"CCoordinateSystemGeodeticTransformDef.SetParameters");
INT32 paramsMethodCode = 0x0;
Modified: trunk/MgDev/Common/CoordinateSystem/CoordSysGeodeticTransformDefDictionary.cpp
===================================================================
--- trunk/MgDev/Common/CoordinateSystem/CoordSysGeodeticTransformDefDictionary.cpp 2010-09-21 14:52:39 UTC (rev 5170)
+++ trunk/MgDev/Common/CoordinateSystem/CoordSysGeodeticTransformDefDictionary.cpp 2010-09-21 16:53:51 UTC (rev 5171)
@@ -55,13 +55,15 @@
CCoordinateSystemGeodeticTransformDefDictionary::GetFileOpenMode);
CCoordinateSystemGeodeticTransformDefDictionary::CCoordinateSystemGeodeticTransformDefDictionary(MgCoordinateSystemCatalog *pCatalog)
- : m_pDictionary(new CCoordinateSystemDictionaryBase<CCoordinateSystemGeodeticTransformDef, cs_GeodeticTransform_,
- &transformDefinitionAccess, true, cs_GXDEF_MAGIC, DICTIONARY_FILE_NAME(GeodeticTransformation)>(pCatalog))
+ : m_pDictionary(NULL)
{
+ this->m_pDictionary = new CCoordinateSystemDictionaryBase<CCoordinateSystemGeodeticTransformDef, cs_GeodeticTransform_,
+ &transformDefinitionAccess, true, cs_GXDEF_MAGIC, DICTIONARY_FILE_NAME(GeodeticTransformation)>(pCatalog);
}
CCoordinateSystemGeodeticTransformDefDictionary::~CCoordinateSystemGeodeticTransformDefDictionary()
{
+ SAFE_RELEASE(this->m_pDictionary)
}
@@ -169,7 +171,7 @@
bool CCoordinateSystemGeodeticTransformDefDictionary::SetupCsStructFromMgTransformDef(CCoordinateSystemGeodeticTransformDef* mgGeodeticTransformDef, cs_GeodeticTransform_& csTransformDef)
{
- ENSURE_NOT_NULL(mgGeodeticTransformDef, CCoordinateSystemGeodeticTransformDefDictionary::SetupCsStructFromMgTransformDef);
+ ENSURE_NOT_NULL(mgGeodeticTransformDef, L"CCoordinateSystemGeodeticTransformDefDictionary.SetupCsStructFromMgTransformDef");
//copy the struct values from [mgGeodeticTransformDef] to [csTransformDef]; will throw an exception, if [mgGeodeticTransformDef] hasn't been yet initialized
mgGeodeticTransformDef->CopyTo(csTransformDef);
@@ -180,8 +182,8 @@
cs_GeodeticTransform_* csTransformDef,
MgCoordinateSystemCatalog* catalog)
{
- ENSURE_NOT_NULL(mgGeodeticTransformDef, CCoordinateSystemGeodeticTransformDefDictionary::FullInitialize);
- ENSURE_NOT_NULL(csTransformDef, CCoordinateSystemGeodeticTransformDefDictionary::FullInitialize);
+ ENSURE_NOT_NULL(mgGeodeticTransformDef, L"CCoordinateSystemGeodeticTransformDefDictionary.FullInitialize");
+ ENSURE_NOT_NULL(csTransformDef, L"CCoordinateSystemGeodeticTransformDefDictionary.FullInitialize");
mgGeodeticTransformDef->Initialize(*csTransformDef);
Modified: trunk/MgDev/Common/CoordinateSystem/CoordSysGeodeticTransformDefDictionary.h
===================================================================
--- trunk/MgDev/Common/CoordinateSystem/CoordSysGeodeticTransformDefDictionary.h 2010-09-21 14:52:39 UTC (rev 5170)
+++ trunk/MgDev/Common/CoordinateSystem/CoordSysGeodeticTransformDefDictionary.h 2010-09-21 16:53:51 UTC (rev 5171)
@@ -59,8 +59,7 @@
protected:
- Ptr<CCoordinateSystemDictionaryBase<CCoordinateSystemGeodeticTransformDef, cs_GeodeticTransform_, \
- &transformDefinitionAccess, true, cs_GXDEF_MAGIC, DICTIONARY_FILE_NAME(GeodeticTransformation)>> m_pDictionary;
+ CCoordinateSystemDictionaryBase<CCoordinateSystemGeodeticTransformDef, cs_GeodeticTransform_, &transformDefinitionAccess, true, cs_GXDEF_MAGIC, DICTIONARY_FILE_NAME(GeodeticTransformation)>* m_pDictionary;
public:
Modified: trunk/MgDev/Common/CoordinateSystem/CoordSysGeodeticTransformGridFile.cpp
===================================================================
--- trunk/MgDev/Common/CoordinateSystem/CoordSysGeodeticTransformGridFile.cpp 2010-09-21 14:52:39 UTC (rev 5170)
+++ trunk/MgDev/Common/CoordinateSystem/CoordSysGeodeticTransformGridFile.cpp 2010-09-21 16:53:51 UTC (rev 5171)
@@ -21,6 +21,7 @@
#include "GeometryCommon.h"
#include "CoordSysCommon.h"
+#include "CriticalSection.h"
#include "CoordSysUtil.h" //for Convert_Wide_To_Ascii
#include "MentorUtil.h" //for OpenDictionaryFile()
@@ -59,14 +60,14 @@
{
if (NULL != this->gridFileDesc)
{
- delete this->gridFileDesc;
+ CS_free(this->gridFileDesc);
this->gridFileDesc = NULL;
}
}
void CCoordinateSystemGeodeticTransformGridFile::CopyTo(csGeodeticXfromParmsFile_* destGridFile) const
{
- ENSURE_NOT_NULL(destGridFile, CCoordinateSystemGeodeticTransformGridFile::CopyTo);
+ ENSURE_NOT_NULL(destGridFile, L"CCoordinateSystemGeodeticTransformGridFile.CopyTo");
*destGridFile = *this->gridFileDesc;
}
Modified: trunk/MgDev/Common/CoordinateSystem/CoordSysMacro.h
===================================================================
--- trunk/MgDev/Common/CoordinateSystem/CoordSysMacro.h 2010-09-21 14:52:39 UTC (rev 5170)
+++ trunk/MgDev/Common/CoordinateSystem/CoordSysMacro.h 2010-09-21 16:53:51 UTC (rev 5171)
@@ -20,8 +20,10 @@
//make sure to have CS_MAP_DEF_VARIABLE defined before including this header; this is used by VERIFY_INITIALIZED(x)
- #define MAKE_L_STRING(x) L## #x
+#define MAKE_L_STRING(x) L## #x
+#define MAKE_QUALIFIED_MEMBER_STRING(className,member) MAKE_L_STRING(className.member)
+
#ifdef CS_MAP_DEF_VARIABLE
#define VERIFY_INITIALIZED(x) if (NULL == CS_MAP_DEF_VARIABLE) \
throw new MgInvalidOperationException(x, __LINE__, __WFILE__, NULL, L"", NULL)
@@ -32,20 +34,24 @@
#define VERIFY_NOT_PROTECTED(x) if (this->IsProtected()) \
throw new MgCoordinateSystemInitializationFailedException(x, __LINE__, __WFILE__, NULL, L"MgCoordinateSystemProtectedException", NULL);
+#define ENSURE_NOT_NULL(param,method) \
+ if (NULL == param) \
+ throw new MgNullArgumentException(method, __LINE__, __WFILE__, NULL, L"", 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_SET_STRING(className,propertyName,charBuffer) \
DEFINE_GET_STRING(className,propertyName) \
{ \
- VERIFY_INITIALIZED(MAKE_L_STRING(className##.Get##propertyName)); \
+ VERIFY_INITIALIZED(MAKE_QUALIFIED_MEMBER_STRING(className,Get##propertyName)); \
return MentorReadString(charBuffer); \
} \
DEFINE_SET_STRING(className,propertyName) \
{ \
- VERIFY_INITIALIZED(MAKE_L_STRING(className##.Set##propertyName)); \
+ VERIFY_INITIALIZED(MAKE_QUALIFIED_MEMBER_STRING(className,Set##propertyName)); \
if (this->IsProtected()) \
- throw new MgCoordinateSystemInitializationFailedException(L"SetString", __LINE__, __WFILE__, NULL, L"MgCoordinateSystemProtectedException", NULL); \
+ throw new MgCoordinateSystemInitializationFailedException(MAKE_QUALIFIED_MEMBER_STRING(className,Set##propertyName), __LINE__, __WFILE__, NULL, L"MgCoordinateSystemProtectedException", NULL); \
\
MentorSetString(propertyValue, charBuffer /* target buffer */, sizeof(charBuffer)); \
}
@@ -59,14 +65,14 @@
#define DEFINE_GET_SET_NUMERIC(className, propertyName,targetType,target) \
DEFINE_GET_NUMERIC(className,propertyName,targetType) \
{ \
- VERIFY_INITIALIZED(MAKE_L_STRING(className##.Get##propertyName)); \
+ VERIFY_INITIALIZED(MAKE_QUALIFIED_MEMBER_STRING(className,Get##propertyName)); \
return target; \
} \
DEFINE_SET_NUMERIC(className,propertyName,targetType) \
{ \
- VERIFY_INITIALIZED(MAKE_L_STRING(className##.Set##propertyName)); \
+ VERIFY_INITIALIZED(MAKE_QUALIFIED_MEMBER_STRING(className,Set##propertyName)); \
if (this->IsProtected()) \
- throw new MgCoordinateSystemInitializationFailedException(L"SetValue", __LINE__, __WFILE__, NULL, L"MgCoordinateSystemProtectedException", NULL); \
+ throw new MgCoordinateSystemInitializationFailedException(MAKE_QUALIFIED_MEMBER_STRING(className,Set##propertyName), __LINE__, __WFILE__, NULL, L"MgCoordinateSystemProtectedException", NULL); \
\
target = propertyValue;\
}
@@ -74,26 +80,22 @@
#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)); \
+ VERIFY_INITIALIZED(MAKE_QUALIFIED_MEMBER_STRING(className,Get##propertyName)); \
if (index < 0 || index > maxIdx) \
- throw new MgArgumentOutOfRangeException(L"GetValue", __LINE__, __WFILE__, NULL, L"MgCoordinateSystemProtectedException", NULL); \
+ throw new MgArgumentOutOfRangeException(MAKE_QUALIFIED_MEMBER_STRING(className,Get##propertyName), __LINE__, __WFILE__, NULL, L"MgCoordinateSystemProtectedException", NULL); \
\
return target[index]; \
} \
DEFINE_SET_NUMERIC_IDX(className,propertyName,targetType) \
{ \
- VERIFY_INITIALIZED(MAKE_L_STRING(className##.Set##propertyName)); \
+ VERIFY_INITIALIZED(MAKE_QUALIFIED_MEMBER_STRING(className,Set##propertyName)); \
if (this->IsProtected()) \
- throw new MgCoordinateSystemInitializationFailedException(L"SetValue", __LINE__, __WFILE__, NULL, L"MgCoordinateSystemProtectedException", NULL); \
+ throw new MgCoordinateSystemInitializationFailedException(MAKE_QUALIFIED_MEMBER_STRING(className,Set##propertyName), __LINE__, __WFILE__, NULL, L"MgCoordinateSystemProtectedException", NULL); \
\
if (index < 0 || index > maxIdx) \
- throw new MgArgumentOutOfRangeException(L"GetValue", __LINE__, __WFILE__, NULL, L"MgCoordinateSystemProtectedException", NULL); \
+ throw new MgArgumentOutOfRangeException(MAKE_QUALIFIED_MEMBER_STRING(className,Get##propertyName), __LINE__, __WFILE__, NULL, L"MgCoordinateSystemProtectedException", NULL); \
\
target[index] = propertyValue;\
}
-#define ENSURE_NOT_NULL(param,method) \
- if (NULL == param) \
- throw new MgNullArgumentException(L# method, __LINE__, __WFILE__, NULL, L"", NULL)
-
#endif //_MG_COORDSYSMACRO_H_
\ No newline at end of file
Modified: trunk/MgDev/Common/CoordinateSystem/MentorUtil.cpp
===================================================================
--- trunk/MgDev/Common/CoordinateSystem/MentorUtil.cpp 2010-09-21 14:52:39 UTC (rev 5170)
+++ trunk/MgDev/Common/CoordinateSystem/MentorUtil.cpp 2010-09-21 16:53:51 UTC (rev 5171)
@@ -37,7 +37,7 @@
#include "CoordSysEnum.h" //for CCoordinateSystemEnum
#include "CoordSysDictionary.h" //for CCoordinateSystemDictionary
-#include <cs_legacy.h>
+#include <cs_Legacy.h>
using namespace CSLibrary;
Modified: trunk/MgDev/Common/Geometry/CoordinateSystem/CoordinateSystemGeodeticTransformDefParams.h
===================================================================
--- trunk/MgDev/Common/Geometry/CoordinateSystem/CoordinateSystemGeodeticTransformDefParams.h 2010-09-21 14:52:39 UTC (rev 5170)
+++ trunk/MgDev/Common/Geometry/CoordinateSystem/CoordinateSystemGeodeticTransformDefParams.h 2010-09-21 16:53:51 UTC (rev 5171)
@@ -55,4 +55,4 @@
/// \}
-#endif _MGCOORDINATESYSTEMGEODETICTRANSFORMDEFPARAMS_H_
\ No newline at end of file
+#endif //_MGCOORDINATESYSTEMGEODETICTRANSFORMDEFPARAMS_H_
\ No newline at end of file
Modified: trunk/MgDev/Common/Geometry/GeometryConsoleTest/GeometryConsoleTest.cpp
===================================================================
--- trunk/MgDev/Common/Geometry/GeometryConsoleTest/GeometryConsoleTest.cpp 2010-09-21 14:52:39 UTC (rev 5170)
+++ trunk/MgDev/Common/Geometry/GeometryConsoleTest/GeometryConsoleTest.cpp 2010-09-21 16:53:51 UTC (rev 5171)
@@ -21,6 +21,9 @@
INT32 gridLineCount;
INT32 lineSegmentCount;
+ clock_t startTime;
+ clock_t endTime;
+
double xx;
double yy;
double uu;
@@ -28,6 +31,13 @@
double value;
MgCoordinateSystemFactory factory;
+ MgCoordinateSystemCatalog* catalog;
+ MgCoordinateSystemCategoryDictionary* categoryDict;
+ MgCoordinateSystemEnum* categoryEnum;
+ MgCoordinateSystemDictionary* coordsysDict;
+ MgCoordinateSystemEnum* coordsysEnum;
+ MgDisposableCollection* coordsysCollection;
+ MgStringCollection* stringCollection;
MgCoordinate* pCoordinate;
MgCoordinateIterator* coordItr;
@@ -43,6 +53,32 @@
MgCoordinateSystemGridTick* pGridTick;
MgCoordinateSystemGridTickCollection* pGridTicks;
+startTime = clock ();
+catalog = factory.GetCatalog ();
+categoryDict = catalog->GetCategoryDictionary ();
+categoryEnum = categoryDict->GetEnum ();
+coordsysDict = catalog->GetCoordinateSystemDictionary ();
+coordsysEnum = coordsysDict->GetEnum ();
+do
+{
+ stringCollection = coordsysEnum->NextName (1);
+ if (stringCollection->GetCount () > 0)
+ {
+ STRING code = stringCollection->GetItem (0);
+ Ptr<MgCoordinateSystem> coordSysPtr = factory.CreateFromCode (code);
+ }
+} while (stringCollection->GetCount () > 0);
+endTime = clock ();
+printf ("Dictionary enumeration time = %ld milliseconds.\n",endTime - startTime);
+
+wchar_t wktTest [2048] = L"PROJCS[\"UTM83-10F\",GEOGCS[\"LL83\",DATUM[\"NAD83\",SPHEROID[\"GRS1980\",6378137.000,298.25722210]],PRIMEM[\"Greenwich\",0],UNIT[\"Degree\",0.017453292519943295]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"false_easting\",1640416.667],PARAMETER[\"false_northing\",0.000],PARAMETER[\"central_meridian\",-123.00000000000000],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"latitude_of_origin\",0.000],UNIT[\"Foot_US\",0.30480060960122]]";
+//wchar_t wktTest [2048] = L"PROJCS[\"WGS84.PseudoMercator\",GEOGCS[\"LL84\",DATUM[\"WGS84\",SPHEROID[\"WGS84\",6378137.000,298.25722293]],PRIMEM[\"Greenwich\",0],UNIT[\"Degree\",0.017453292519943295]],PROJECTION[\"Popular Visualisation Pseudo Mercator\"],PARAMETER[\"false_easting\",0.000],PARAMETER[\"false_northing\",0.000],PARAMETER[\"central_meridian\",0.00000000000000],UNIT[\"Meter\",1.00000000000000]]";
+startTime = clock ();
+INT32 epsgCode = factory.ConvertWktToEpsgCode (wktTest);
+endTime = clock ();
+printf ("ConvertWktToEpsgCode time = %ld milliseconds.\n",endTime - startTime);
+exit (0);
+
pGridSpecification = factory.GridSpecification ();
pGridSpecification->SetGridBase (0.0,0.0);
pGridSpecification->SetGridIncrement (1.0,1.0);
@@ -50,6 +86,21 @@
pGridSpecification->SetUnits (MgCoordinateSystemUnitCode::Degree,MgCoordinateSystemUnitType::Angular);
pGridSpecification->SetCurvePrecision (1.0E-05);
+ {
+ MgCoordinateSystem* pTestSource = factory.CreateFromCode(L"CA83-IIF");
+ MgCoordinateSystem* pTestTarget = factory.CreateFromCode(L"LL84");
+ MgCoordinateSystemTransform* pTestTransform = factory.GetTransform(pTestSource,pTestTarget);
+ MgCoordinate* southWestXYZ = new MgCoordinateXYZ (6.49E+06,1.99E+06,300.0);
+ MgCoordinate* northEastXYZ = new MgCoordinateXYZ (6.61E+06,2.11E+06,100.0);
+ MgEnvelope* pTestEnvelopeSource = new MgEnvelope (northEastXYZ,southWestXYZ);
+ MgEnvelope* pTestEnvelopeTarget = pTestEnvelopeSource->Transform (pTestTransform);
+ pTestTransform->Release ();
+ pTestSource->Release ();
+ pTestTarget->Release ();
+ pTestEnvelopeSource->Release ();
+ pTestEnvelopeTarget->Release ();
+ }
+
pGenericGrid = factory.GenericGrid (L"LL84",L"CA83-IIF",true);
MgCoordinate* southWestXY = new MgCoordinateXY (6.49E+06,1.99E+06);
Modified: trunk/MgDev/Common/Geometry/GeometryConsoleTest/GeometryConsoleTest.vcproj
===================================================================
--- trunk/MgDev/Common/Geometry/GeometryConsoleTest/GeometryConsoleTest.vcproj 2010-09-21 14:52:39 UTC (rev 5170)
+++ trunk/MgDev/Common/Geometry/GeometryConsoleTest/GeometryConsoleTest.vcproj 2010-09-21 16:53:51 UTC (rev 5171)
@@ -18,8 +18,8 @@
<Configurations>
<Configuration
Name="Debug|Win32"
- OutputDirectory="$(GISPLATFORMROOTDIR)\OS\Common\bin\$(ConfigurationName)"
- IntermediateDirectory="$(ProjectDir)$(COnfigurationName)"
+ OutputDirectory="..\..\..\Common\bin\$(ConfigurationName)"
+ IntermediateDirectory="$(ProjectDir)$(ConfigurationName)"
ConfigurationType="1"
CharacterSet="1"
DeleteExtensionsOnClean="*.obj;*.pch;*.sbr;*.ilk;*.tlb;*.tli;*.tlh;*.tmp;*.rsp;*.pgc;*.pgd;*.meta;$(TargetPath)"
@@ -42,7 +42,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories=""$(GISPLATFORMROOTDIR)\OS\Common\Geometry";"$(GISPLATFORMROOTDIR)\OS\Common\Foundation";"$(GISPLATFORMROOTDIR)\OS\CommonGeometry\CoordinateSystem";"$(GISPLATFORMROOTDIR)\OS\Oem\ACE\ACE_wrappers""
+ AdditionalIncludeDirectories=""..\..\..\Common\Geometry";"..\..\..\Common\Foundation";"..\..\..\CommonGeometry\CoordinateSystem";"..\..\..\Oem\ACE\ACE_wrappers""
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE"
MinimalRebuild="false"
BasicRuntimeChecks="3"
@@ -64,7 +64,7 @@
Name="VCLinkerTool"
AdditionalDependencies="MgGeometryd.lib MgFoundationd.lib CsMapd.lib ACEd.lib"
LinkIncremental="1"
- AdditionalLibraryDirectories=""$(ProjectDir)$(ConfigurationName)";"$(GISPLATFORMROOTDIR)\OS\Common\lib\$(ConfigurationName)";"$(GISPLATFORMROOTDIR)\OS\Oem\CsMap\lib80\$(ConfigurationName)";"$(GISPLATFORMROOTDIR)\OS\Oem\ACE\ACE_wrappers\lib""
+ AdditionalLibraryDirectories=""$(ProjectDir)$(ConfigurationName)";"..\..\..\Common\lib\$(ConfigurationName)";"..\..\..\Oem\CsMap\lib80\$(ConfigurationName)";"..\..\..\Oem\ACE\ACE_wrappers\lib""
GenerateDebugInformation="true"
SubSystem="1"
TargetMachine="1"
@@ -93,8 +93,8 @@
</Configuration>
<Configuration
Name="Release|Win32"
- OutputDirectory="$(GISPLATFORMROOTDIR)\OS\Common\bin\$(ConfigurationName)"
- IntermediateDirectory="$(ProjectDir)$(COnfigurationName)"
+ OutputDirectory="..\..\..\Common\bin\$(ConfigurationName)"
+ IntermediateDirectory="$(ProjectDir)$(ConfigurationName)"
ConfigurationType="1"
CharacterSet="1"
WholeProgramOptimization="1"
@@ -118,7 +118,7 @@
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
- AdditionalIncludeDirectories=""$(GISPLATFORMROOTDIR)\OS\Common\Geometry";"$(GISPLATFORMROOTDIR)\OS\Common\Foundation";"$(GISPLATFORMROOTDIR)\OS\CommonGeometry\CoordinateSystem";"$(GISPLATFORMROOTDIR)\OS\Oem\ACE\ACE_wrappers""
+ AdditionalIncludeDirectories=""..\..\..\Common\Geometry";"..\..\..\Common\Foundation";"..\..\..\CommonGeometry\CoordinateSystem";"..\..\..\Oem\ACE\ACE_wrappers""
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
@@ -139,7 +139,7 @@
Name="VCLinkerTool"
AdditionalDependencies="MgGeometry.lib MgFoundation.lib CsMap.lib ACE.lib"
LinkIncremental="1"
- AdditionalLibraryDirectories=""$(ProjectDir)$(ConfigurationName)";"$(GISPLATFORMROOTDIR)\OS\Common\lib\$(ConfigurationName)";"$(GISPLATFORMROOTDIR)\OS\Oem\CsMap\lib80\$(ConfigurationName)";"$(GISPLATFORMROOTDIR)\OS\Oem\ACE\ACE_wrappers\lib""
+ AdditionalLibraryDirectories=""$(ProjectDir)$(ConfigurationName)";"..\..\..\Common\lib\$(ConfigurationName)";"..\..\..\Oem\CsMap\lib80\$(ConfigurationName)";"..\..\..\Oem\ACE\ACE_wrappers\lib""
GenerateDebugInformation="true"
SubSystem="1"
OptimizeReferences="2"
Modified: trunk/MgDev/Common/Geometry/Makefile.am
===================================================================
--- trunk/MgDev/Common/Geometry/Makefile.am 2010-09-21 14:52:39 UTC (rev 5170)
+++ trunk/MgDev/Common/Geometry/Makefile.am 2010-09-21 16:53:51 UTC (rev 5171)
@@ -7,6 +7,7 @@
libMgGeometry_la_SOURCES = \
GeometryBuild.cpp \
../CoordinateSystem/ArbitraryCoordsys.cpp \
+ ../CoordinateSystem/CoordSysDictionaryBase.cpp \
../CoordinateSystem/CoordSys.cpp \
../CoordinateSystem/CoordSysCatalog.cpp \
../CoordinateSystem/CoordSysCategory.cpp \
@@ -22,7 +23,17 @@
../CoordinateSystem/CoordSysEnumDatum.cpp \
../CoordinateSystem/CoordSysEnumEllipsoid.cpp \
../CoordinateSystem/CoordSysFormatConverter.cpp \
- ../CoordinateSystem/CoordSysGeodeticTransformation.cpp \
+ ../CoordinateSystem/CoordSysGeodeticAnalyticalTransformDefParams.cpp\
+ ../CoordinateSystem/CoordSysGeodeticInterpolationTransformDefParams.cpp\
+ ../CoordinateSystem/CoordSysGeodeticMultipleRegressionTransformDefParams.cpp\
+ ../CoordinateSystem/CoordSysGeodeticPath.cpp\
+ ../CoordinateSystem/CoordSysGeodeticPathDictionary.cpp\
+ ../CoordinateSystem/CoordSysGeodeticPathElement.cpp\
+ ../CoordinateSystem/CoordSysGeodeticTransformation.cpp\
+ ../CoordinateSystem/CoordSysGeodeticTransformDef.cpp\
+ ../CoordinateSystem/CoordSysGeodeticTransformDefDictionary.cpp\
+ ../CoordinateSystem/CoordSysGeodeticTransformDefParams.cpp\
+ ../CoordinateSystem/CoordSysGeodeticTransformGridFile.cpp\
../CoordinateSystem/CoordSysMeasure.cpp \
../CoordinateSystem/CoordSysTransform.cpp \
../CoordinateSystem/CoordSysDictionaryUtility.cpp \
@@ -158,7 +169,17 @@
../CoordinateSystem/CoordSysEnumDatum.cpp \
../CoordinateSystem/CoordSysEnumEllipsoid.cpp \
../CoordinateSystem/CoordSysFormatConverter.cpp \
- ../CoordinateSystem/CoordSysGeodeticTransformation.cpp \
+ ../CoordinateSystem/CoordSysGeodeticAnalyticalTransformDefParams.cpp\
+ ../CoordinateSystem/CoordSysGeodeticInterpolationTransformDefParams.cpp\
+ ../CoordinateSystem/CoordSysGeodeticMultipleRegressionTransformDefParams.cpp\
+ ../CoordinateSystem/CoordSysGeodeticPath.cpp\
+ ../CoordinateSystem/CoordSysGeodeticPathDictionary.cpp\
+ ../CoordinateSystem/CoordSysGeodeticPathElement.cpp\
+ ../CoordinateSystem/CoordSysGeodeticTransformation.cpp\
+ ../CoordinateSystem/CoordSysGeodeticTransformDef.cpp\
+ ../CoordinateSystem/CoordSysGeodeticTransformDefDictionary.cpp\
+ ../CoordinateSystem/CoordSysGeodeticTransformDefParams.cpp\
+ ../CoordinateSystem/CoordSysGeodeticTransformGridFile.cpp\
../CoordinateSystem/CoordSysMeasure.cpp \
../CoordinateSystem/CoordSysTransform.cpp \
../CoordinateSystem/CoordSysDictionaryUtility.cpp \
@@ -354,6 +375,7 @@
Spatial/SpatialUtilityVectorAngle.h \
../CoordinateSystem/ArbitraryCoordsys.h \
../CoordinateSystem/CoordSys.h \
+ ../CoordinateSystem/CoordSysDictionaryBase.h \
../CoordinateSystem/CoordSysCatalog.h \
../CoordinateSystem/CoordSysCategory.h \
../CoordinateSystem/CoordSysCategoryDictionary.h \
@@ -369,7 +391,17 @@
../CoordinateSystem/CoordSysEnumDatum.h \
../CoordinateSystem/CoordSysEnumEllipsoid.h \
../CoordinateSystem/CoordSysFormatConverter.h \
- ../CoordinateSystem/CoordSysGeodeticTransformation.h \
+ ../CoordinateSystem/CoordSysGeodeticAnalyticalTransformDefParams.h\
+ ../CoordinateSystem/CoordSysGeodeticInterpolationTransformDefParams.h\
+ ../CoordinateSystem/CoordSysGeodeticMultipleRegressionTransformDefParams.h\
+ ../CoordinateSystem/CoordSysGeodeticPath.h\
+ ../CoordinateSystem/CoordSysGeodeticPathDictionary.h\
+ ../CoordinateSystem/CoordSysGeodeticPathElement.h\
+ ../CoordinateSystem/CoordSysGeodeticTransformation.h\
+ ../CoordinateSystem/CoordSysGeodeticTransformDef.h\
+ ../CoordinateSystem/CoordSysGeodeticTransformDefDictionary.h\
+ ../CoordinateSystem/CoordSysGeodeticTransformDefParams.h\
+ ../CoordinateSystem/CoordSysGeodeticTransformGridFile.h\
../CoordinateSystem/CoordSysMeasure.h \
../CoordinateSystem/CoordSysTransform.h \
../CoordinateSystem/CoordSysType.h \
@@ -378,6 +410,7 @@
../CoordinateSystem/CoordSysDictionaryUtility.h \
../CoordinateSystem/CoordSysEnumInteger32.h \
../CoordinateSystem/CoordSysMathComparator.h \
+ ../CoordinateSystem/CoordSysMacro.h\
../CoordinateSystem/CoordSysProjectionInformation.h \
../CoordinateSystem/CoordSysUnitInformation.h \
../CoordinateSystem/CsmapVersion.h \
@@ -415,3 +448,4 @@
-L../Foundation \
-L../../Oem/CsMap \
-L../../Common/CoordinateSystem
+
More information about the mapguide-commits
mailing list