Salome HOME
Initialisation de la base KERNEL avec la version operationnelle de KERNEL_SRC issue...
[modules/kernel.git] / src / Logger / SALOME_Trace.hxx
1 //=============================================================================
2 // File      : SALOME_Trace.cxx
3 // Created   : nov 18 10:28:17 2002
4 // Author    : Vasily Rusyaev
5 // Project   : SALOME/PRO
6 //=============================================================================
7
8 // SALOME_Trace.hxx: interface for the SALOME_Trace class.
9 //
10 //////////////////////////////////////////////////////////////////////
11
12 #if !defined(AFX_LOGGER_H__96F2A3AB_F6F8_11D6_BFA6_000476A0958C__INCLUDED_)
13 #define AFX_LOGGER_H__96F2A3AB_F6F8_11D6_BFA6_000476A0958C__INCLUDED_
14
15 //these declarations for files don't using OCC includes (for example HDF)
16 # ifdef WNT
17
18 #  ifndef Standard_EXPORT
19 #   define Standard_EXPORT __declspec( dllexport )
20 // For global variables :
21 #   define Standard_EXPORTEXTERN __declspec( dllexport ) extern
22 #   define Standard_EXPORTEXTERNC extern "C" __declspec( dllexport )
23 #  endif  /* Standard_EXPORT */
24
25 #  ifndef Standard_IMPORT
26 #   define Standard_IMPORT __declspec( dllimport ) extern
27 #   define Standard_IMPORTC extern "C" __declspec( dllimport )
28 #  endif  /* Standard_IMPORT */
29
30 # else  /* WNT */
31
32 #  ifndef Standard_EXPORT
33 #   define Standard_EXPORT
34 // For global variables :
35 #   define Standard_EXPORTEXTERN extern
36 #   define Standard_EXPORTEXTERNC extern "C"
37 #  endif  /* Standard_EXPORT */
38
39 #  ifndef Standard_IMPORT
40 #   define Standard_IMPORT extern
41 #   define Standard_IMPORTC extern "C"
42 #  endif  /* Standard_IMPORT */
43
44 # endif  /* WNT */
45
46 #include <strstream.h>
47 #include "Logger.hh"
48
49 class SALOME_Trace : public ostrstream  
50 {
51 public:
52         virtual ~SALOME_Trace();
53         static Standard_EXPORT SALOME_Trace& Instance();
54         Standard_EXPORT void putMessage(ostream& msg);
55 protected:
56         //disable creation of instances. It's necessary to use static SALOME_Logger& Instance()
57         SALOME_Trace();
58         SALOME_Logger::Logger_var m_pInterfaceLogger;// object reference on Logger server.
59 };
60
61 #define GLogger SALOME_Trace::Instance()
62
63 #endif // !defined(AFX_LOGGER_H__96F2A3AB_F6F8_11D6_BFA6_000476A0958C__INCLUDED_)