1 // SALOME Logger : CORBA server managing trace output
3 // Copyright (C) 2003 CEA/DEN, EDF R&D
7 // File : SALOME_Trace.cxx
8 // Author : Vasily Rusyaev
11 #if !defined(AFX_LOGGER_H__96F2A3AB_F6F8_11D6_BFA6_000476A0958C__INCLUDED_)
12 #define AFX_LOGGER_H__96F2A3AB_F6F8_11D6_BFA6_000476A0958C__INCLUDED_
14 //these declarations for files don't using OCC includes (for example HDF)
17 # ifndef Standard_EXPORT
18 # define Standard_EXPORT __declspec( dllexport )
19 // For global variables :
20 # define Standard_EXPORTEXTERN __declspec( dllexport ) extern
21 # define Standard_EXPORTEXTERNC extern "C" __declspec( dllexport )
22 # endif /* Standard_EXPORT */
24 # ifndef Standard_IMPORT
25 # define Standard_IMPORT __declspec( dllimport ) extern
26 # define Standard_IMPORTC extern "C" __declspec( dllimport )
27 # endif /* Standard_IMPORT */
31 # ifndef Standard_EXPORT
32 # define Standard_EXPORT
33 // For global variables :
34 # define Standard_EXPORTEXTERN extern
35 # define Standard_EXPORTEXTERNC extern "C"
36 # endif /* Standard_EXPORT */
38 # ifndef Standard_IMPORT
39 # define Standard_IMPORT extern
40 # define Standard_IMPORTC extern "C"
41 # endif /* Standard_IMPORT */
45 #include <strstream.h>
50 class SALOME_Trace : public ostrstream
53 virtual ~SALOME_Trace();
54 static Standard_EXPORT SALOME_Trace& Instance();
55 // initializes Logger (if USE_LOGGER variable is set) and returns true, in case success
56 int Initialize(CORBA::ORB_ptr theOrb);
57 Standard_EXPORT void putMessage(std::ostream& msg);
59 //disable creation of instances. It's necessary to use static SALOME_Logger& Instance()
61 SALOME_Logger::Logger_var m_pInterfaceLogger;// object reference on Logger server.
65 #define GLogger SALOME_Trace::Instance()
67 #endif // !defined(AFX_LOGGER_H__96F2A3AB_F6F8_11D6_BFA6_000476A0958C__INCLUDED_)