1 // SALOME Logger : CORBA server managing trace output
3 // Copyright (C) 2003 CEA/DEN, EDF R&D
5 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
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_
15 #include <SALOMEconfig.h>
18 //these declarations for files don't using OCC includes (for example HDF)
21 # ifndef Standard_EXPORT
22 # define Standard_EXPORT __declspec( dllexport )
23 // For global variables :
24 # define Standard_EXPORTEXTERN __declspec( dllexport ) extern
25 # define Standard_EXPORTEXTERNC extern "C" __declspec( dllexport )
26 # endif /* Standard_EXPORT */
28 # ifndef Standard_IMPORT
29 # define Standard_IMPORT __declspec( dllimport ) extern
30 # define Standard_IMPORTC extern "C" __declspec( dllimport )
31 # endif /* Standard_IMPORT */
35 # ifndef Standard_EXPORT
36 # define Standard_EXPORT
37 // For global variables :
38 # define Standard_EXPORTEXTERN extern
39 # define Standard_EXPORTEXTERNC extern "C"
40 # endif /* Standard_EXPORT */
42 # ifndef Standard_IMPORT
43 # define Standard_IMPORT extern
44 # define Standard_IMPORTC extern "C"
45 # endif /* Standard_IMPORT */
49 class SALOME_Trace : public std::ostrstream
52 virtual ~SALOME_Trace();
53 static Standard_EXPORT SALOME_Trace& Instance();
54 // initializes Logger (if USE_LOGGER variable is set) and returns true, in case success
55 int Initialize(CORBA::ORB_ptr theOrb);
56 Standard_EXPORT void putMessage(std::ostream& msg);
58 //disable creation of instances. It's necessary to use static SALOME_Logger& Instance()
60 SALOME_Logger::Logger_var m_pInterfaceLogger;// object reference on Logger server.
64 #define GLogger SALOME_Trace::Instance()
66 #endif // !defined(AFX_LOGGER_H__96F2A3AB_F6F8_11D6_BFA6_000476A0958C__INCLUDED_)