]> Creatis software - clitk.git/blobdiff - common/clitkCommon.h
Merge branch 'master' of git.creatis.insa-lyon.fr:clitk
[clitk.git] / common / clitkCommon.h
index 51258e66fc3abd5c418dfc480bdba43debd32442..8cd82fbe0b0bc1b20f38876368f0d6348615b1a9 100644 (file)
@@ -38,8 +38,9 @@
 #if defined(unix) || defined(__APPLE__)
 #  include <sys/time.h>
 #  include <sys/resource.h>
-#elif defined(WIN32)
+#elif defined(_WIN32)
 #  include <windows.h>
+#  include <stdint.h>
 #endif
 
 //--------------------------------------------------------------------
@@ -227,6 +228,18 @@ namespace clitk {
   //--------------------------------------------------------------------
   void PrintMemoryUsed();
 
+  //--------------------------------------------------------------------
+  // Convert a map to a vector
+  template <typename M, typename V> 
+  void MapToVecFirst(const M & m, V & v);
+  template <typename M, typename V> 
+  void MapToVecSecond(const M & m, V & v);
+
+  //--------------------------------------------------------------------
+  // Find/replace string
+  template<class T>
+  int inline findAndReplace(T& source, const T& find, const T& replace);
+
 #include "clitkCommon.txx"
 
 } // end namespace