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_
17 //these declarations for files don't using OCC includes (for example HDF)
20 # ifndef Standard_EXPORT
21 # define Standard_EXPORT __declspec( dllexport )
22 // For global variables :
23 # define Standard_EXPORTEXTERN __declspec( dllexport ) extern
24 # define Standard_EXPORTEXTERNC extern "C" __declspec( dllexport )
25 # endif /* Standard_EXPORT */
27 # ifndef Standard_IMPORT
28 # define Standard_IMPORT __declspec( dllimport ) extern
29 # define Standard_IMPORTC extern "C" __declspec( dllimport )
30 # endif /* Standard_IMPORT */
34 # ifndef Standard_EXPORT
35 # define Standard_EXPORT
36 // For global variables :
37 # define Standard_EXPORTEXTERN extern
38 # define Standard_EXPORTEXTERNC extern "C"
39 # endif /* Standard_EXPORT */
41 # ifndef Standard_IMPORT
42 # define Standard_IMPORT extern
43 # define Standard_IMPORTC extern "C"
44 # endif /* Standard_IMPORT */
48 class SALOME_Trace : public std::ostrstream
51 virtual ~SALOME_Trace();
52 static Standard_EXPORT SALOME_Trace& Instance();
53 // initializes Logger (if USE_LOGGER variable is set) and returns true, in case success
54 int Initialize(CORBA::ORB_ptr theOrb);
55 Standard_EXPORT void putMessage(std::ostream& msg);
57 //disable creation of instances. It's necessary to use static SALOME_Logger& Instance()
59 SALOME_Logger::Logger_var m_pInterfaceLogger;// object reference on Logger server.
63 #define GLogger SALOME_Trace::Instance()
65 #endif // !defined(AFX_LOGGER_H__96F2A3AB_F6F8_11D6_BFA6_000476A0958C__INCLUDED_)