summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/SystemTools.hxx.in
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2004-10-05 13:25:55 (GMT)
committerKen Martin <ken.martin@kitware.com>2004-10-05 13:25:55 (GMT)
commit50da0328472ad0f318f64a20876c474ad968fef3 (patch)
tree23a6a92593aa93f7ebf52ef6b7ed95758d64b274 /Source/kwsys/SystemTools.hxx.in
parent7f21ee17a9d152fdb775855aa03cf83903579a55 (diff)
downloadCMake-50da0328472ad0f318f64a20876c474ad968fef3.zip
CMake-50da0328472ad0f318f64a20876c474ad968fef3.tar.gz
CMake-50da0328472ad0f318f64a20876c474ad968fef3.tar.bz2
COMP: fix some compile issues with insert
Diffstat (limited to 'Source/kwsys/SystemTools.hxx.in')
-rw-r--r--Source/kwsys/SystemTools.hxx.in29
1 files changed, 28 insertions, 1 deletions
diff --git a/Source/kwsys/SystemTools.hxx.in b/Source/kwsys/SystemTools.hxx.in
index 128e0c2..1d79f2b 100644
--- a/Source/kwsys/SystemTools.hxx.in
+++ b/Source/kwsys/SystemTools.hxx.in
@@ -36,6 +36,9 @@ typedef unsigned short mode_t;
namespace @KWSYS_NAMESPACE@
{
+class SystemToolsManager;
+class SystemToolsTranslationMap;
+
/** \class SystemTools
* \brief A collection of useful platform-independent system functions.
*/
@@ -331,12 +334,36 @@ protected:
private:
/**
+ * Allocate the std::map that serve as the Path Translation table.
+ */
+ static void ClassInitialize();
+
+ /**
+ * Deallocate the std::map that serve as the Path Translation table.
+ */
+ static void ClassFinalize();
+
+ /**
* Path translation table from dir to refdir
* Each time 'dir' will be found it will be replace by 'refdir'
*/
- static kwsys_stl::map<kwsys_stl::string,kwsys_stl::string> TranslationMap;
+ static SystemToolsTranslationMap *TranslationMap;
+
+ friend class SystemToolsManager;
+};
+
+class @KWSYS_NAMESPACE@_EXPORT SystemToolsManager
+{
+public:
+ SystemToolsManager();
+ ~SystemToolsManager();
};
+// This instance will show up in any translation unit that uses
+// SystemTools. It will make sure SystemTools is initialized
+// before it is used and is the last static object destroyed.
+static SystemToolsManager SystemToolsManagerInstance;
+
} // namespace @KWSYS_NAMESPACE@
/* Undefine temporary macros. */