1 // SALOME Utils : general SALOME's definitions and tools
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
24 // File : SALOME_Log.hxx
25 // Author : Vasily Rusyaev (OCN), Paul RASCLE (EDF)
29 #ifndef _SALOME_LOG_HXX_
30 #define _SALOME_LOG_HXX_
32 //these declarations for files don't using OCC includes (for example HDF)
35 # ifndef Standard_EXPORT
36 # define Standard_EXPORT __declspec( dllexport )
37 // For global variables :
38 # define Standard_EXPORTEXTERN __declspec( dllexport ) extern
39 # define Standard_EXPORTEXTERNC extern "C" __declspec( dllexport )
40 # endif /* Standard_EXPORT */
42 # ifndef Standard_IMPORT
43 # define Standard_IMPORT __declspec( dllimport ) extern
44 # define Standard_IMPORTC extern "C" __declspec( dllimport )
45 # endif /* Standard_IMPORT */
49 # ifndef Standard_EXPORT
50 # define Standard_EXPORT
51 // For global variables :
52 # define Standard_EXPORTEXTERN extern
53 # define Standard_EXPORTEXTERNC extern "C"
54 # endif /* Standard_EXPORT */
56 # ifndef Standard_IMPORT
57 # define Standard_IMPORT extern
58 # define Standard_IMPORTC extern "C"
59 # endif /* Standard_IMPORT */
70 class SALOME_Log : public ostrstream
73 virtual ~SALOME_Log();
74 static Standard_EXPORT SALOME_Log& Instance();
75 Standard_EXPORT void putMessage(std::ostream& msg);
78 //disable creation of instances: force use static SALOME_Log& Instance()
83 #define SLog SALOME_Log::Instance()