[mapguide-commits] r6293 - in sandbox/adsk/vik/Common: CoordinateSystem Foundation/System Geometry

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Mon Dec 5 15:40:01 EST 2011


Author: traianstanev
Date: 2011-12-05 12:40:01 -0800 (Mon, 05 Dec 2011)
New Revision: 6293

Modified:
   sandbox/adsk/vik/Common/CoordinateSystem/CoordSysCategoryDictionary.cpp
   sandbox/adsk/vik/Common/Foundation/System/FileUtil.cpp
   sandbox/adsk/vik/Common/Foundation/System/FileUtil.h
   sandbox/adsk/vik/Common/Geometry/Geometry.vcxproj
Log:
Reimplemented certain functions in FileUtil to use standard C rather than ACE functions. Fixed compilation of the coord sys dictionary code by changing some file system calls to standard C ones.

Modified: sandbox/adsk/vik/Common/CoordinateSystem/CoordSysCategoryDictionary.cpp
===================================================================
--- sandbox/adsk/vik/Common/CoordinateSystem/CoordSysCategoryDictionary.cpp	2011-12-05 19:10:20 UTC (rev 6292)
+++ sandbox/adsk/vik/Common/CoordinateSystem/CoordSysCategoryDictionary.cpp	2011-12-05 20:40:01 UTC (rev 6293)
@@ -201,35 +201,15 @@
     CriticalClass.Enter();
     MG_TRY()
     assert(NULL != kpDefName);
-    STRING tempName;
     STRING strPath=GetPath();
 
-#ifdef _WIN32
-    //Get a temporary file name
-    wchar_t szDrive[_MAX_DRIVE],
-         szDir[_MAX_DIR],
-         szFname[_MAX_FNAME],
-         szExt[_MAX_EXT],
-         szPath[_MAX_PATH],
-         szTempPath[_MAX_PATH];
-    _tsplitpath(strPath.c_str(), szDrive, szDir, szFname, szExt);
-    _tmakepath(szPath, szDrive, szDir, NULL, NULL);
+    char* tmpFileName = _tempnam(NULL, "csmap");
 
-    if (!GetTempFileName(szPath, /*NOXLATE*/L"cat", 0, szTempPath))
-    {
-        //couldn't open file
-        throw new MgFileIoException(L"MgCoordinateSystemCategoryDictionary.RewriteFile", __LINE__, __WFILE__, NULL, L"MgCoordinateSystemNoCategoryDictionaryException", NULL);
-    }
-    tempName=szTempPath;
-#else
-    tempName = MgFileUtil::GenerateTempFileName();
-#endif
-
     //Open the file
     csFILE *pTemp;
     char szMode[10];
     GetFileModes(Write, szMode);
-    pTemp = fopen( MgUtil::WideCharToMultiByte(tempName).c_str(), szMode );
+    pTemp = fopen( tmpFileName, szMode );
     if (!pTemp || ferror(pTemp))
     {
         //couldn't open file
@@ -303,11 +283,13 @@
     {
         throw new MgOutOfMemoryException(L"MgCoordinateSystemCategoryDictionary.RewriteFile", __LINE__, __WFILE__, NULL, L"", NULL);
     }
+
+    //MgFileUtil::DeleteFile( MgUtil::MultiByteToWideChar(sz_msPath) );
+    //MgFileUtil::RenameFile( tempName, MgUtil::MultiByteToWideChar(sz_msPath) );
     remove(sz_msPath);
-    rename(tempName, sz_msPath);
-    MgFileUtil::DeleteFile( MgUtil::MultiByteToWideChar(sz_msPath) );
-    MgFileUtil::RenameFile( tempName, MgUtil::MultiByteToWideChar(sz_msPath) );
+    rename(tmpFileName, sz_msPath);
 
+
     GetFileModes(Read, szMode);
     pFile=fopen(sz_msPath, szMode);
     delete[] sz_msPath;

Modified: sandbox/adsk/vik/Common/Foundation/System/FileUtil.cpp
===================================================================
--- sandbox/adsk/vik/Common/Foundation/System/FileUtil.cpp	2011-12-05 19:10:20 UTC (rev 6292)
+++ sandbox/adsk/vik/Common/Foundation/System/FileUtil.cpp	2011-12-05 20:40:01 UTC (rev 6293)
@@ -19,24 +19,30 @@
 #include "Foundation.h"
 #include "FileUtil.h"
 
-#if WANT_ACE
+#include <sys/stat.h>
+#include <direct.h>
 
-ACE_Recursive_Thread_Mutex MgFileUtil::sm_mutex;
 
-const STRING MgFileUtil::sm_reservedCharacters = L"\\/:*?\"<>|";
-const STRING MgFileUtil::sm_slash = L"\\/";
+static CustomThreadMutex sm_mutex;
 
+static const wchar_t* sm_reservedCharacters = L"\\/:*?\"<>|";
+static const wchar_t* sm_slash = L"\\/";
+
+#ifndef _WIN32
 static int MgDirEntrySelector(const dirent *d)
 {
-    return (0 != ACE_OS::strcmp(d->d_name, ACE_TEXT(".")) &&
-            0 != ACE_OS::strcmp(d->d_name, ACE_TEXT("..")));
+    return (0 != strcmp(d->d_name, ".") &&
+            0 != strcmp(d->d_name, ".."));
 }
 
 static int MgDirEntryComparator(const dirent **d1, const dirent **d2)
 {
-    return ACE_OS::strcmp((*d1)->d_name, (*d2)->d_name);
+    return strcmp((*d1)->d_name, (*d2)->d_name);
 }
 
+#define _stricmp strcasecmp
+#endif
+
 ///----------------------------------------------------------------------------
 /// <summary>
 /// Constructs the object.
@@ -163,7 +169,7 @@
     {
         STRING temp = pathname.substr(pos, len);
 
-        if (ACE_OS::strcasecmp(temp.c_str(), extension.c_str()) == 0)
+        if (_wcsicmp(temp.c_str(), extension.c_str()) == 0)
         {
             result = true;
         }
@@ -227,7 +233,7 @@
         RemoveSlashFromEndOfPath(path);
 
     { // Begin guarding.
-        ACE_MT(ACE_GUARD_RETURN(ACE_Recursive_Thread_Mutex, ace_mon, sm_mutex, false));
+        AutoMutexLocker lock(sm_mutex);
 
 #ifdef _WIN32
         success = ::_wstat(path.c_str(), &statInfo) == 0;
@@ -443,9 +449,13 @@
 {
     MG_TRY()
 
-    ACE_MT(ACE_GUARD(ACE_Recursive_Thread_Mutex, ace_mon, sm_mutex));
+    AutoMutexLocker lock(sm_mutex);
 
-    int errCode = ACE_OS::mkdir(MG_WCHAR_TO_TCHAR(path));
+#ifdef _WIN32
+    int errCode = _wmkdir(MG_WCHAR_TO_TCHAR(path));
+#else
+    int errCode = mkdir(MG_WCHAR_TO_TCHAR(path));
+#endif
 
     if (0 != errCode)
     {
@@ -468,6 +478,7 @@
     MG_CATCH_AND_THROW(L"MgFileUtil.MkDir")
 }
 
+#if WANT_ACE
 ///----------------------------------------------------------------------------
 /// <summary>
 /// Deletes a directory.
@@ -484,7 +495,7 @@
 {
     MG_TRY()
 
-    ACE_MT(ACE_GUARD(ACE_Recursive_Thread_Mutex, ace_mon, sm_mutex));
+    AutoMutexLocker lock(sm_mutex);
 
     if (CleanDirectory(path, recursive, strict) == false)
     {
@@ -533,7 +544,7 @@
 
     MG_TRY()
 
-    ACE_MT(ACE_GUARD_RETURN(ACE_Recursive_Thread_Mutex, ace_mon, sm_mutex, false));
+    AutoMutexLocker lock(sm_mutex);
 
     if (!PathnameExists(path))
     {
@@ -602,55 +613,6 @@
 
 ///----------------------------------------------------------------------------
 /// <summary>
-/// Changes the current working directory to the specified directory.
-/// </summary>
-///
-/// <param name="path">
-/// The path to the directory to be made current.
-/// </param>
-///
-/// <returns>
-/// The previous working directory.
-/// </returns>
-///
-/// <exceptions>
-/// MgDirectoryNotFoundException
-/// MgFileIoException
-/// </exceptions>
-///----------------------------------------------------------------------------
-
-STRING MgFileUtil::ChangeDirectory(CREFSTRING path)
-{
-    STRING currDir;
-    ACE_TCHAR buffer[MAXPATHLEN];
-
-    ACE_MT(ACE_GUARD_RETURN(ACE_Recursive_Thread_Mutex, ace_mon, sm_mutex, L""));
-
-    if (ACE_OS::getcwd(buffer, MAXPATHLEN) == NULL)
-    {
-        MgStringCollection arguments;
-        arguments.Add(path);
-
-        throw new MgFileIoException(L"MgFileUtil.ChangeDirectory",
-            __LINE__, __WFILE__, &arguments, L"", NULL);
-    }
-
-    if (ACE_OS::chdir(MG_WCHAR_TO_TCHAR(path)) != 0)
-    {
-        MgStringCollection arguments;
-        arguments.Add(path);
-
-        throw new MgDirectoryNotFoundException(L"MgFileUtil.ChangeDirectory",
-            __LINE__, __WFILE__, &arguments, L"", NULL);
-    }
-
-    currDir = MG_TCHAR_TO_WCHAR(buffer);
-
-    return currDir;
-}
-
-///----------------------------------------------------------------------------
-/// <summary>
 /// Gets all files in the specified directory.
 /// </summary>
 ///----------------------------------------------------------------------------
@@ -671,7 +633,7 @@
 
     MG_TRY()
 
-    ACE_MT(ACE_GUARD_RETURN(ACE_Recursive_Thread_Mutex, ace_mon, sm_mutex, false));
+    AutoMutexLocker lock(sm_mutex);
 
     if (!PathnameExists(path))
     {
@@ -740,6 +702,191 @@
 
 ///----------------------------------------------------------------------------
 /// <summary>
+/// Copies a file from one location to another.
+/// </summary>
+///
+/// <exceptions>
+/// MgNullArgumentException
+/// MgInvalidArgumentException
+/// MgFileNotFoundException
+/// MgFileIoException
+/// </exceptions>
+///----------------------------------------------------------------------------
+
+void MgFileUtil::CopyFile(CREFSTRING sourcePathname, CREFSTRING destPathname,
+    bool overwrite)
+{
+    MG_TRY()
+
+    if (sourcePathname.empty() || destPathname.empty())
+    {
+        throw new MgNullArgumentException(L"MgFileUtil.CopyFile",
+            __LINE__, __WFILE__, NULL, L"", NULL);
+    }
+
+    if (_wcsicmp(sourcePathname.c_str(), destPathname.c_str()) == 0)
+    {
+        MgStringCollection arguments;
+        arguments.Add(destPathname);
+
+        throw new MgDuplicateFileException(L"MgFileUtil.CopyFile",
+            __LINE__, __WFILE__, &arguments, L"", NULL);
+    }
+
+    if (overwrite)
+    {
+        DeleteFile(destPathname);
+    }
+    else if (PathnameExists(destPathname))
+    {
+        MgStringCollection arguments;
+        arguments.Add(destPathname);
+
+        throw new MgDuplicateFileException(L"MgFileUtil.CopyFile",
+            __LINE__, __WFILE__, &arguments, L"", NULL);
+    }
+
+    Ptr<MgByteSource> byteSource = new MgByteSource(sourcePathname);
+    Ptr<MgByteReader> byteReader = byteSource->GetReader();
+
+    MgByteSink byteSink(byteReader);
+    byteSink.ToFile(destPathname);
+
+    MG_CATCH_AND_THROW(L"MgFileUtil.CopyFile")
+}
+
+///----------------------------------------------------------------------------
+/// <summary>
+/// Gets the TempPath defined in the configuration file. If the TempPath doesn't
+/// exist, then create it.
+/// </summary>
+///
+/// <returns>
+/// Returns the TempPath defined in the configuration file.
+/// </returns>
+///----------------------------------------------------------------------------
+
+STRING MgFileUtil::GetTempPath()
+{
+    STRING tempPathname;
+
+    MG_TRY()
+
+    // TODO: Server Drawing Service GETDRAWINGLAYER API does not work well
+    // if using Mg temporary directory.
+    MgConfiguration* config = MgConfiguration::GetInstance();
+
+    config->GetStringValue(
+        MgFoundationConfigProperties::GeneralPropertiesSection,
+        MgFoundationConfigProperties::GeneralPropertyTempPath,
+        tempPathname,
+        MgFoundationConfigProperties::DefaultGeneralPropertyTempPath);
+
+    CreateDirectory(tempPathname);
+    AppendSlashToEndOfPath(tempPathname);
+
+    MG_CATCH_AND_THROW(L"MgFileUtil.GetTempPath")
+
+    return tempPathname;
+}
+
+///----------------------------------------------------------------------------
+/// <summary>
+/// Generates a temporary file folder using a UUID in the TempPath defined in
+/// the configuration file.
+/// </summary>
+///
+/// <returns>
+/// Returns full path name of the temporary path.
+/// </returns>
+///----------------------------------------------------------------------------
+
+STRING MgFileUtil::GenerateTempPath()
+{
+    STRING tempPathname;
+
+    MG_TRY()
+
+    tempPathname = GetTempPath();
+
+    STRING uuid;
+    MgUtil::GenerateUuid(uuid);
+    tempPathname.append(uuid);
+
+    CreateDirectory(tempPathname);
+
+    MG_CATCH_AND_THROW(L"MgFileUtil.GenerateTempPath")
+
+    return tempPathname;
+}
+
+
+#endif //WANT_ACE
+
+///----------------------------------------------------------------------------
+/// <summary>
+/// Changes the current working directory to the specified directory.
+/// </summary>
+///
+/// <param name="path">
+/// The path to the directory to be made current.
+/// </param>
+///
+/// <returns>
+/// The previous working directory.
+/// </returns>
+///
+/// <exceptions>
+/// MgDirectoryNotFoundException
+/// MgFileIoException
+/// </exceptions>
+///----------------------------------------------------------------------------
+
+STRING MgFileUtil::ChangeDirectory(CREFSTRING path)
+{
+    STRING currDir;
+#ifdef _WIN32
+    wchar_t buffer[MAX_PATH];
+#else
+    char buffer[PATH_MAX];
+#endif
+
+    AutoMutexLocker lock(sm_mutex);
+
+#ifdef _WIN32
+    if (_wgetcwd(buffer, MAX_PATH) == NULL)
+#else
+    if (getcwd(buffer, PATH_MAX) == NULL)
+#endif
+    {
+        MgStringCollection arguments;
+        arguments.Add(path);
+
+        throw new MgFileIoException(L"MgFileUtil.ChangeDirectory",
+            __LINE__, __WFILE__, &arguments, L"", NULL);
+    }
+
+#ifdef _WIN32
+    if (_wchdir(MG_WCHAR_TO_TCHAR(path)) != 0)
+#else
+    if (chdir(MG_WCHAR_TO_TCHAR(path)) != 0)
+#endif
+    {
+        MgStringCollection arguments;
+        arguments.Add(path);
+
+        throw new MgDirectoryNotFoundException(L"MgFileUtil.ChangeDirectory",
+            __LINE__, __WFILE__, &arguments, L"", NULL);
+    }
+
+    currDir = MG_TCHAR_TO_WCHAR(buffer);
+
+    return currDir;
+}
+
+
+///----------------------------------------------------------------------------
+/// <summary>
 /// Checks if the specified pathname is a file.
 /// </summary>
 ///----------------------------------------------------------------------------
@@ -773,7 +920,7 @@
 {
     MG_TRY()
 
-    ACE_MT(ACE_GUARD(ACE_Recursive_Thread_Mutex, ace_mon, sm_mutex));
+    AutoMutexLocker lock(sm_mutex);
 
     if (!PathnameExists(pathname))
     {
@@ -789,7 +936,11 @@
         return;
     }
 
-    int errCode = ACE_OS::unlink(MG_WCHAR_TO_TCHAR(pathname));
+#ifdef _WIN32
+    int errCode = _wremove(MG_WCHAR_TO_TCHAR(pathname));
+#else
+    int errCode = remove(MG_WCHAR_TO_TCHAR(pathname));
+#endif
 
     if (0 != errCode)
     {
@@ -811,61 +962,7 @@
     MG_CATCH_AND_THROW(L"MgFileUtil.DeleteFile")
 }
 
-///----------------------------------------------------------------------------
-/// <summary>
-/// Copies a file from one location to another.
-/// </summary>
-///
-/// <exceptions>
-/// MgNullArgumentException
-/// MgInvalidArgumentException
-/// MgFileNotFoundException
-/// MgFileIoException
-/// </exceptions>
-///----------------------------------------------------------------------------
 
-void MgFileUtil::CopyFile(CREFSTRING sourcePathname, CREFSTRING destPathname,
-    bool overwrite)
-{
-    MG_TRY()
-
-    if (sourcePathname.empty() || destPathname.empty())
-    {
-        throw new MgNullArgumentException(L"MgFileUtil.CopyFile",
-            __LINE__, __WFILE__, NULL, L"", NULL);
-    }
-
-    if (_wcsicmp(sourcePathname.c_str(), destPathname.c_str()) == 0)
-    {
-        MgStringCollection arguments;
-        arguments.Add(destPathname);
-
-        throw new MgDuplicateFileException(L"MgFileUtil.CopyFile",
-            __LINE__, __WFILE__, &arguments, L"", NULL);
-    }
-
-    if (overwrite)
-    {
-        DeleteFile(destPathname);
-    }
-    else if (PathnameExists(destPathname))
-    {
-        MgStringCollection arguments;
-        arguments.Add(destPathname);
-
-        throw new MgDuplicateFileException(L"MgFileUtil.CopyFile",
-            __LINE__, __WFILE__, &arguments, L"", NULL);
-    }
-
-    Ptr<MgByteSource> byteSource = new MgByteSource(sourcePathname);
-    Ptr<MgByteReader> byteReader = byteSource->GetReader();
-
-    MgByteSink byteSink(byteReader);
-    byteSink.ToFile(destPathname);
-
-    MG_CATCH_AND_THROW(L"MgFileUtil.CopyFile")
-}
-
 ///----------------------------------------------------------------------------
 /// <summary>
 /// Renames a file.
@@ -935,7 +1032,7 @@
             __LINE__, __WFILE__, &arguments, L"", NULL);
     }
 
-    ACE_MT(ACE_GUARD(ACE_Recursive_Thread_Mutex, ace_mon, sm_mutex));
+    AutoMutexLocker lock(sm_mutex);
 
     if (overwrite)
     {
@@ -1000,73 +1097,10 @@
     MG_CATCH_AND_THROW(L"MgFileUtil.RenameFile")
 }
 
-///----------------------------------------------------------------------------
-/// <summary>
-/// Gets the TempPath defined in the configuration file. If the TempPath doesn't
-/// exist, then create it.
-/// </summary>
-///
-/// <returns>
-/// Returns the TempPath defined in the configuration file.
-/// </returns>
-///----------------------------------------------------------------------------
 
-STRING MgFileUtil::GetTempPath()
-{
-    STRING tempPathname;
 
-    MG_TRY()
-
-    // TODO: Server Drawing Service GETDRAWINGLAYER API does not work well
-    // if using Mg temporary directory.
-    MgConfiguration* config = MgConfiguration::GetInstance();
-
-    config->GetStringValue(
-        MgFoundationConfigProperties::GeneralPropertiesSection,
-        MgFoundationConfigProperties::GeneralPropertyTempPath,
-        tempPathname,
-        MgFoundationConfigProperties::DefaultGeneralPropertyTempPath);
-
-    CreateDirectory(tempPathname);
-    AppendSlashToEndOfPath(tempPathname);
-
-    MG_CATCH_AND_THROW(L"MgFileUtil.GetTempPath")
-
-    return tempPathname;
-}
-
 ///----------------------------------------------------------------------------
 /// <summary>
-/// Generates a temporary file folder using a UUID in the TempPath defined in
-/// the configuration file.
-/// </summary>
-///
-/// <returns>
-/// Returns full path name of the temporary path.
-/// </returns>
-///----------------------------------------------------------------------------
-
-STRING MgFileUtil::GenerateTempPath()
-{
-    STRING tempPathname;
-
-    MG_TRY()
-
-    tempPathname = GetTempPath();
-
-    STRING uuid;
-    MgUtil::GenerateUuid(uuid);
-    tempPathname.append(uuid);
-
-    CreateDirectory(tempPathname);
-
-    MG_CATCH_AND_THROW(L"MgFileUtil.GenerateTempPath")
-
-    return tempPathname;
-}
-
-///----------------------------------------------------------------------------
-/// <summary>
 /// Generates a temporary file name. File will reside in the TempPath defined
 /// in the configuration file. File name will be a UUID so it should be unique.
 /// </summary>
@@ -1087,6 +1121,7 @@
 
     MG_TRY()
 
+#if WANT_ACE
     if (useMgTempPath)
     {
         tempPathname = GetTempPath();
@@ -1103,15 +1138,18 @@
     }
     else
     {
+#endif
         // Note that ::tempnam uses the TMP environment variable as the path
         // to the temporary file. Alternately, ACE_OS::mkstemp() could be used.
         // Add current thread id to the mix to ensure that the name is unique.
 
-        ACE_MT(ACE_GUARD_RETURN(ACE_Recursive_Thread_Mutex, ace_mon, sm_mutex, L""));
+        AutoMutexLocker lock(sm_mutex);
         string mbPrefix;
+#if WANT_ACE
         ACE_thread_t threadId = ACE_OS::thr_self();
         MgUtil::Int32ToString(threadId, mbPrefix);
         mbPrefix.append( MgUtil::WideCharToMultiByte(prefix) );
+#endif
 
         char* tempFileName = ::tempnam(NULL, mbPrefix.c_str());
 
@@ -1125,7 +1163,9 @@
         ::free(tempFileName);
 
         MgUtil::MultiByteToWideChar(tempStr, tempPathname);
+#if WANT_ACE
     }
+#endif
 
     if (!extension.empty())
     {
@@ -1146,32 +1186,32 @@
 /// \brief
 /// Retrieves the time that the specified file was created.
 ///
-MgDateTime MgFileUtil::GetFileCreationTime(CREFSTRING pathname)
+INT64 MgFileUtil::GetFileCreationTime(CREFSTRING pathname)
 {
     struct _stat statInfo;
 
     if (GetFileStatus(pathname, statInfo, true))
     {
-        return MgDateTime(statInfo.st_ctime);
+        return statInfo.st_ctime;
     }
 
-    return MgDateTime();
+    return 0;
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 /// \brief
 /// Retrieves the time that the specified file was last modified.
 ///
-MgDateTime MgFileUtil::GetFileModificationTime(CREFSTRING pathname)
+INT64 MgFileUtil::GetFileModificationTime(CREFSTRING pathname)
 {
     struct _stat statInfo;
 
     if (GetFileStatus(pathname, statInfo, true))
     {
-        return MgDateTime(statInfo.st_mtime);
+        return statInfo.st_mtime;
     }
 
-    return MgDateTime();
+    return 0;
 }
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -1216,7 +1256,7 @@
             __LINE__, __WFILE__, NULL, L"", NULL);
     }
 
-    ACE_MT(ACE_GUARD_RETURN(ACE_Recursive_Thread_Mutex, ace_mon, sm_mutex, false));
+    AutoMutexLocker lock(sm_mutex);
 
     FILE* file = NULL;
 
@@ -1319,4 +1359,4 @@
     return safe;
 }
 
-#endif //WANT_ACE
\ No newline at end of file
+

Modified: sandbox/adsk/vik/Common/Foundation/System/FileUtil.h
===================================================================
--- sandbox/adsk/vik/Common/Foundation/System/FileUtil.h	2011-12-05 19:10:20 UTC (rev 6292)
+++ sandbox/adsk/vik/Common/Foundation/System/FileUtil.h	2011-12-05 20:40:01 UTC (rev 6293)
@@ -18,8 +18,9 @@
 #ifndef MGFILEUTIL_H_
 #define MGFILEUTIL_H_
 
-#if WANT_ACE
+#include "Mutex.h"
 
+
 // INTERNAL USE ONLY
 
 // This allows to use the same function name for both Windows and Linux.
@@ -33,7 +34,6 @@
     #define _stat stat
 #endif
 
-class MG_FOUNDATION_API ACE_Recursive_Thread_Mutex;
 
 /// \cond INTERNAL
 class MG_FOUNDATION_API MgFileUtil
@@ -81,31 +81,34 @@
     static bool IsDriveLetter(wchar_t letter);
     static void CreateDirectory(CREFSTRING path, bool strict = false,
         bool recursive = false);
+#if WANT_ACE
     static void DeleteDirectory(CREFSTRING path, bool recursive = true,
         bool strict = false);
     static bool CleanDirectory(CREFSTRING path, bool recursive = true,
         bool strict = false);
-    static STRING ChangeDirectory(CREFSTRING path);
     static bool GetFilesInDirectory(MgStringCollection* files, CREFSTRING path, bool recursive = true, bool fileNameOnly = false);
+    static void CopyFile(CREFSTRING sourcePathname,
+        CREFSTRING destPathname, bool overwrite = false);
+    static STRING GetTempPath();
+    static STRING GenerateTempPath();
+#endif
+    static STRING ChangeDirectory(CREFSTRING path);
+    
 
     /// File related methods
 
     static bool IsFile(CREFSTRING pathname);
     static void DeleteFile(CREFSTRING pathname, bool strict = false);
-    static void CopyFile(CREFSTRING sourcePathname,
-        CREFSTRING destPathname, bool overwrite = false);
     static void RenameFile(CREFSTRING path, CREFSTRING oldFileName,
         CREFSTRING newFileName, bool overwrite = false);
     static void RenameFile(CREFSTRING oldPathName, CREFSTRING newPathName,
         bool overwrite = false);
 
-    static STRING GetTempPath();
-    static STRING GenerateTempPath();
     static STRING GenerateTempFileName(bool useMgTempPath = true,
         CREFSTRING prefix = L"", CREFSTRING extension = L"");
 
-    static MgDateTime GetFileCreationTime(CREFSTRING pathname);
-    static MgDateTime GetFileModificationTime(CREFSTRING pathname);
+    static INT64 GetFileCreationTime(CREFSTRING pathname);
+    static INT64 GetFileModificationTime(CREFSTRING pathname);
     static INT64 GetFileSize(CREFSTRING pathname);
 
     static bool IsFileInUse(CREFSTRING pathname);
@@ -118,21 +121,11 @@
 
     static void MkDir(CREFSTRING path);
 
-/// Data Members
 
-    private:
-
-    static ACE_Recursive_Thread_Mutex sm_mutex;
-
-    static const STRING sm_reservedCharacters;
-    static const STRING sm_slash;
 };
 /// \endcond
 
-/// Inline Methods
 
-#endif //WANT_ACE
-
 #endif
 
 

Modified: sandbox/adsk/vik/Common/Geometry/Geometry.vcxproj
===================================================================
--- sandbox/adsk/vik/Common/Geometry/Geometry.vcxproj	2011-12-05 19:10:20 UTC (rev 6292)
+++ sandbox/adsk/vik/Common/Geometry/Geometry.vcxproj	2011-12-05 20:40:01 UTC (rev 6293)
@@ -101,9 +101,9 @@
       <PrecompiledHeader>Use</PrecompiledHeader>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>csmapd.lib;ACEd.lib;GEOSd.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>csmapd.lib;GEOSd.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <OutputFile>$(OutDir)MgGeometryd.dll</OutputFile>
-      <AdditionalLibraryDirectories>..\..\Oem\CsMap\lib100\Debug;..\..\Oem\ACE\ACE_wrappers\lib;..\..\Oem\geos-2.2.0\VisualStudio\Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <AdditionalLibraryDirectories>..\..\Oem\CsMap\lib100\Debug;..\..\Oem\geos-2.2.0\VisualStudio\Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <SubSystem>Windows</SubSystem>
       <RandomizedBaseAddress>false</RandomizedBaseAddress>
@@ -129,9 +129,9 @@
       <PrecompiledHeader>Use</PrecompiledHeader>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>csmapd.lib;ACEd.lib;GEOSd.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>csmapd.lib;GEOSd.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <OutputFile>$(OutDir)MgGeometryd.dll</OutputFile>
-      <AdditionalLibraryDirectories>..\..\Oem\CsMap\lib100\Debug64;..\..\Oem\ACE\ACE_wrappers\lib64;..\..\Oem\geos-2.2.0\VisualStudio\Debug64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <AdditionalLibraryDirectories>..\..\Oem\CsMap\lib100\Debug64;..\..\Oem\geos-2.2.0\VisualStudio\Debug64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <SubSystem>Windows</SubSystem>
       <ImportLibrary>..\lib\debug64\MgGeometryd.lib</ImportLibrary>
@@ -152,9 +152,9 @@
       <PrecompiledHeader>Use</PrecompiledHeader>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>csmap.lib;ACE.lib;GEOS.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>csmap.lib;GEOS.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <OutputFile>$(OutDir)MgGeometry.dll</OutputFile>
-      <AdditionalLibraryDirectories>..\..\Oem\CsMap\lib100\Release;..\..\Oem\ACE\ACE_wrappers\lib;..\..\Oem\geos-2.2.0\VisualStudio\Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <AdditionalLibraryDirectories>..\..\Oem\CsMap\lib100\Release;..\..\Oem\geos-2.2.0\VisualStudio\Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <SubSystem>Windows</SubSystem>
       <OptimizeReferences>true</OptimizeReferences>
@@ -180,9 +180,9 @@
       <PrecompiledHeader>Use</PrecompiledHeader>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>csmap.lib;ACE.lib;GEOS.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>csmap.lib;GEOS.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <OutputFile>$(OutDir)MgGeometry.dll</OutputFile>
-      <AdditionalLibraryDirectories>..\..\Oem\CsMap\lib100\Release64;..\..\Oem\ACE\ACE_Wrappers\lib64;..\..\Oem\geos-2.2.0\VisualStudio\Release64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <AdditionalLibraryDirectories>..\..\Oem\CsMap\lib100\Release64;..\..\Oem\geos-2.2.0\VisualStudio\Release64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <SubSystem>Windows</SubSystem>
       <OptimizeReferences>true</OptimizeReferences>



More information about the mapguide-commits mailing list