1 //=============================================================================
2 // File : SALOME_Trace.cxx
3 // Created : nov 18 10:28:17 2002
4 // Author : Vasily Rusyaev
5 // Project : SALOME/PRO
6 //=============================================================================
8 // SALOME_Trace.hxx: interface for the SALOME_Trace class.
10 //////////////////////////////////////////////////////////////////////
12 #if !defined(AFX_LOGGER_H__96F2A3AB_F6F8_11D6_BFA6_000476A0958C__INCLUDED_)
13 #define AFX_LOGGER_H__96F2A3AB_F6F8_11D6_BFA6_000476A0958C__INCLUDED_
15 //these declarations for files don't using OCC includes (for example HDF)
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 */
25 # ifndef Standard_IMPORT
26 # define Standard_IMPORT __declspec( dllimport ) extern
27 # define Standard_IMPORTC extern "C" __declspec( dllimport )
28 # endif /* Standard_IMPORT */
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 */
39 # ifndef Standard_IMPORT
40 # define Standard_IMPORT extern
41 # define Standard_IMPORTC extern "C"
42 # endif /* Standard_IMPORT */
46 #include <strstream.h>
49 class SALOME_Trace : public ostrstream
52 virtual ~SALOME_Trace();
53 static Standard_EXPORT SALOME_Trace& Instance();
54 Standard_EXPORT void putMessage(ostream& msg);
56 //disable creation of instances. It's necessary to use static SALOME_Logger& Instance()
58 SALOME_Logger::Logger_var m_pInterfaceLogger;// object reference on Logger server.
61 #define GLogger SALOME_Trace::Instance()
63 #endif // !defined(AFX_LOGGER_H__96F2A3AB_F6F8_11D6_BFA6_000476A0958C__INCLUDED_)