Salome HOME
add method NameChanged to update title name
[modules/kernel.git] / src / Utils / Utils_SALOME_Exception.hxx
index c093e05c5caacd4134bab7ded4e26529b3792387..2cffe738e64600cf4c5fd13b5fb55dbaeda63736 100644 (file)
@@ -1,24 +1,25 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2016  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 Utils : general SALOME's definitions and tools
 //  File   : Utils_SALOME_Exception.hxx
 //  Author : Antoine YESSAYAN, EDF
 //therefore (temporary solution) defines are placed below
 
 #ifdef WIN32
-# ifdef UTILS_EXPORTS
+# if defined UTILS_EXPORTS || defined OpUtil_EXPORTS
 #  define UTILS_EXPORT __declspec( dllexport )
 # else
 #  define UTILS_EXPORT __declspec( dllimport )
+#  undef LOCALIZED
 #  define LOCALIZED(message) #message
 # endif
 #else
@@ -60,22 +62,24 @@ class SALOME_Exception;
 
 UTILS_EXPORT std::ostream& operator<<( std::ostream&, const SALOME_Exception& );
 
+UTILS_EXPORT const char *makeText( const char *text, const char *fileName, const unsigned int lineNumber );
+
 class UTILS_EXPORT SALOME_Exception : public std::exception
 {
 
 private :
-       SALOME_Exception( void );
+        SALOME_Exception( void );
 
 protected :
-       const char* _text ;     // non constant pointer but read only char variable
+        const char* _text ;     // non constant pointer but read only char variable
 
 public :
-       SALOME_Exception( const char *text, const char *fileName=0, const unsigned int lineNumber=0 );
-       SALOME_Exception( const SALOME_Exception &ex );
-       ~SALOME_Exception() throw ();
-       friend std::ostream & operator<<( std::ostream &os , const SALOME_Exception &ex );
-       virtual const char *what( void ) const throw () ;
+        SALOME_Exception( const char *text, const char *fileName=0, const unsigned int lineNumber=0 );
+        SALOME_Exception( const SALOME_Exception &ex );
+        virtual ~SALOME_Exception() throw ();
+        UTILS_EXPORT friend std::ostream & operator<<( std::ostream &os , const SALOME_Exception &ex );
+        virtual const char *what( void ) const throw () ;
 } ;
 
 
-#endif         /* #if !defined( __Utils_SALOME_Exception_hxx__ ) */
+#endif          /* #if !defined( __Utils_SALOME_Exception_hxx__ ) */