Salome HOME
#18963 Minimize compiler warnings
[modules/kernel.git] / src / Logger / SALOME_Logger_Server.hxx
index a206328578990dac120877775a2a92badd600dbf..c4a5182a228fee051ad6909359a0c0ffd0fd4b1b 100644 (file)
@@ -1,24 +1,25 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2020  CEA/DEN, EDF R&D, OPEN CASCADE
 //
-//  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
 //
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of the GNU Lesser General Public
-//  License as published by the Free Software Foundation; either
-//  version 2.1 of the License.
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
 //
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
 //
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
-//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SALOME Logger : CORBA server managing trace output
 //  File   : SALOME_Logger_Server.hxx
 //  Author : Vasily Rusyaev
@@ -37,7 +38,7 @@
 #include "Logger.hh"
 
 #ifdef WIN32
-# if defined LOGGER_EXPORTS
+# if defined LOGGER_EXPORTS || defined SalomeLoggerServer_EXPORTS
 #  define LOGGER_EXPORT __declspec( dllexport )
 # else
 #  define LOGGER_EXPORT __declspec( dllimport )
@@ -46,6 +47,9 @@
 # define LOGGER_EXPORT
 #endif
 
+#ifdef WIN32
+#pragma warning(disable:4275) // Disable warning interface non dll
+#endif
 
 class LOGGER_EXPORT Logger :
   public POA_SALOME_Logger::Logger
@@ -53,27 +57,26 @@ class LOGGER_EXPORT Logger :
 public:
         //constructor w/o parameters
         //all messages will be put into terminal via cout
-       Logger();
+               Logger();
         //constructor with parameter, filename is output file
         //all messages will be put into special file passed as parameter
-       Logger(const char *filename);
-       virtual ~Logger();
-       //put message into one special place for all servers
-       void putMessage(const char* message);
+        Logger(const char *filename);
+               virtual ~Logger();
+        //put message into one special place for all servers
+        void putMessage(const char* message);
         void ping();
         void SetOrb( CORBA::ORB_ptr orb ) { _orb = CORBA::ORB::_duplicate(orb); return; }
-       void shutdown() { if(!CORBA::is_nil(_orb)) _orb->shutdown(0); };  
+        void shutdown() { if(!CORBA::is_nil(_orb)) _orb->shutdown(0); };  
 private:
-       //if m_putIntoFile is true all messages will be put into special 
-       //otherwise all messages will be put into terminal via cout 
+        //if m_putIntoFile is true all messages will be put into special 
+        //otherwise all messages will be put into terminal via cout 
         bool m_putIntoFile;
-       //ofstream class specialized for disk file output
-       std::ofstream m_outputFile; 
-
-       //synchronisation object
-       static omni_mutex myLock;
+        //ofstream class specialized for disk file output
+        std::ofstream m_outputFile; 
+        //synchronisation object
+        static omni_mutex myLock;
 
-       CORBA::ORB_ptr _orb;
+        CORBA::ORB_ptr _orb;
 };
 
 #endif // !defined(SALOME_Logger_Server_include)