]> Creatis software - crea.git/commitdiff
#3204 crea Feature New Normal branch mingw64
authorEduardo DAVILA <davila@creatis.insa-lyon.fr>
Fri, 27 Jul 2018 14:26:16 +0000 (16:26 +0200)
committerEduardo DAVILA <davila@creatis.insa-lyon.fr>
Fri, 27 Jul 2018 14:26:16 +0000 (16:26 +0200)
CMakeLists.txt
src/creaMessageManager.cxx
src/creaMessageManager.h
src/creaVtk.h
src/creaVtk.txx

index c256e1dd57cc6c09da1d6c727c990cf9a4583d53..138764e023e35b0b17cf49f51195b201c32cd02e 100644 (file)
@@ -91,7 +91,7 @@ MARK_AS_ADVANCED(
   LIBRARY_OUTPUT_PATH
   )
   
-SET (BOOST_FILESYSTEM_VERSION 2)
+## SET (BOOST_FILESYSTEM_VERSION 2)
 
 #-----------------------------------------------------------------------------
 # messages compilation options
index ae10284760e73d7ee61d127f5c590f9ea3e7d575..fa24abdf239219afce298495492779eefb164fda 100644 (file)
@@ -173,7 +173,7 @@ namespace crea
   //===========================================================================
 
   //===========================================================================
-  void MessageManager::SendMessage(const std::string& key, const std::string& mess)
+  void MessageManager::HSendMessage(const std::string& key, const std::string& mess)
   {
     if (GetInstance()->mSendToCout)
       {
index 489659934b58b9a8092180da23440165e67d31b3..54dd93efcc954ff73cb1f9b7b81cf5397b4809b1 100644 (file)
@@ -61,6 +61,7 @@
      \brief Manages the messages displayed by crea
   */
 
+  
 #ifndef __creaMessageManager_h__
 #define __creaMessageManager_h__
 
 #include <map>
 #include <iostream>
 #include <sstream>
+
+
+
+namespace crea 
+{
+  class CREA_EXPORT MessageManager
+  {
+  public:
+    //=============================================
+    typedef boost::signals2::signal<void (const std::string&)>  MessageSignalType;
+    typedef MessageSignalType::slot_function_type MessageCallbackType;
+    //=============================================
+    MessageManager();
+    ~MessageManager();
+    static MessageManager* GetInstance();
+    static void RegisterMessageType(const std::string& key, 
+                                    const std::string& help,
+                                    unsigned char default_level = 9);
+    static void SetMessageLevel(const std::string& key, unsigned char level);
+    static int GetMessageLevel(const std::string& key);
+    static void HSendMessage(const std::string& key, const std::string& mess);
+    static void AddMessageObserver(const std::string& key, MessageCallbackType callback );
+    static void SendMessagesToCout(bool v = true);
+    static std::string& GetTab() { static std::string s; return s; }
+    static std::string GetSpace(int n)  {       std::string s; s.insert(0,"                ",n); return s; }
+    static void IncTab() { GetTab() += std::string(" "); }
+    static void DecTab() { GetTab() = GetTab().substr(0,GetTab().length()-1); }
+    static void ResetTab() { GetTab() = std::string(""); }
+    static void PrintInfo();
+private:
+    struct MessageType
+    {
+      MessageType(int l, const std::string& h) : Level(l), Help(h) {}
+      int Level;
+      std::string Help;
+      MessageSignalType Signal;
+    };
+    typedef std::map<std::string,MessageType*> MessageMapType;
+    MessageMapType mMessageMap;
+    unsigned int mMaxMessageLength;
+    bool mSendToCout;
+  };
+  //===========================================================
+}
+
+
+
+
+
+
+
+
 // Comment out these symbols to prevent compilation 
 //#define CREA_COMPILE_MESSAGES
 //#define CREA_COMPILE_DEBUG_MESSAGES
          << creaMessageTab                             \
          << creaMessageSpace(value)                    \
          << MESSAGE;                                   \
-       crea::MessageManager::SendMessage(key,s.str()); \
+       crea::MessageManager::HSendMessage(key,s.str());        \
       }                                                        \
   }                                                    \
   while (0)
        {                                               \
        std::ostringstream s;                           \
        s << MESSAGE;                                   \
-       crea::MessageManager::SendMessage(key,s.str()); \
+       crea::MessageManager::HSendMessage(key,s.str());        \
        }                                               \
     }                                                  \
   while (0)
          << creaMessageTab                             \
          << creaMessageSpace(value)                    \
          << MESSAGE;                                   \
-       crea::MessageManager::SendMessage(key,s.str()); \
+       crea::MessageManager::HSendMessage(key,s.str());        \
        crea::MessageManager::IncTab();                 \
        }                                               \
     }                                                  \
            << creaMessageTab                                   \
            << creaMessageSpace(value)                          \
            << MESSAGE;                                         \
-         crea::MessageManager::SendMessage(key,s.str());       \
+         crea::MessageManager::HSendMessage(key,s.str());      \
        }                                                       \
     }                                                          \
   while (0)
 
 
 
-namespace crea 
-
-{
-
-  
-
-  class CREA_EXPORT MessageManager
-
-  {
-
-  public:
-
-    //=============================================
-
-    typedef boost::signals2::signal<void (const std::string&)>  MessageSignalType;
-
-    typedef MessageSignalType::slot_function_type MessageCallbackType;
-
-    //=============================================
-
-    ///
-
-    MessageManager();
-
-    ///
-
-    ~MessageManager();
-
-    ///
-
-    static MessageManager* GetInstance();
-
-    ///
-
-    static void RegisterMessageType(const std::string& key, 
-
-                                    const std::string& help,
-
-                                    unsigned char default_level = 9);
-
-    ///
-
-    static void SetMessageLevel(const std::string& key, unsigned char level);
-
-    ///
-
-    static int GetMessageLevel(const std::string& key);
-
-    ///  
-
-    static void SendMessage(const std::string& key, const std::string& mess);
-
-    ///
-
-    static void AddMessageObserver(const std::string& key, MessageCallbackType callback );
-
-    ///
-
-    static void SendMessagesToCout(bool v = true);
-
-    ///
-
-    static std::string& GetTab() { static std::string s; return s; }
-
-    ///
-
-    static std::string GetSpace(int n) { 
-
-      std::string s; s.insert(0,"                ",n); return s; }
-
-    ///
-
-    static void IncTab() { GetTab() += std::string(" "); }
-
-    ///
-
-    static void DecTab() { GetTab() = GetTab().substr(0,GetTab().length()-1); }
-
-    ///
-
-    static void ResetTab() { GetTab() = std::string(""); }
-
-    ///
-
-    static void PrintInfo();
-
-    /// 
-
-    
-
-  private:
-
-    struct MessageType
-
-    {
-
-      MessageType(int l, const std::string& h) : Level(l), Help(h) {}
-
-      int Level;
-
-      std::string Help;
-
-      MessageSignalType Signal;
-
-    };
-
-    typedef std::map<std::string,MessageType*> MessageMapType;
-
-    MessageMapType mMessageMap;
-
-    unsigned int mMaxMessageLength;
-
-    bool mSendToCout;
-
-  };
-
-  //===========================================================
-
-  
-
-}
 
 
 
index 636cf5cd044f47cff1825090845ad4abe67ed050..c1b3c02efbecfe19ad769df9e0387467db7b62a9 100644 (file)
 
 namespace crea
 {
-  template <class T>
-
-  CREA_EXPORT vtkImageData* NewVtkImageDataFromRaw( T* data,
+  
+  template <typename T>
+  /*CREA_EXPORT*/ vtkImageData* NewVtkImageDataFromRaw( T* data,
                                                     int nx, 
                                                     int ny,
                                                     int nz,
                                                     bool do_not_desalloc = true);
+                                                                                                       
+                                                                                                       
   /*
     // Already provided by vtkTypeTraits<T>::VTKTypeID()
   template <class T>
index 91c250b19ad9b7931ecf46d0428482764c68a9d6..c83e758d6bb7ecbdcc5c8da594ff19fb24fbff2f 100644 (file)
@@ -46,7 +46,7 @@
 #include <creaMessageManager.h>
 namespace crea
 {  
-  template <class T>
+  template <typename T>
   /*CREA_EXPORT*/ vtkImageData* NewVtkImageDataFromRaw( T* data, 
                                                    int nx, 
                                                    int ny,