00001 #ifndef __STDAIR_BAS_BASLOGPARAMS_HPP 00002 #define __STDAIR_BAS_BASLOGPARAMS_HPP 00003 00004 // ////////////////////////////////////////////////////////////////////// 00005 // Import section 00006 // ////////////////////////////////////////////////////////////////////// 00007 // STL 00008 #include <iosfwd> 00009 #include <string> 00010 // Stdair 00011 #include <stdair/stdair_log.hpp> 00012 #include <stdair/basic/StructAbstract.hpp> 00013 00014 namespace stdair { 00015 00019 struct BasLogParams : public StructAbstract { 00020 friend class Logger; 00021 public: 00022 // ///////// Getters //////// 00026 const LOG::EN_LogLevel& getLogLevel() const { 00027 return _logLevel; 00028 } 00029 00033 std::ostream& getLogStream() const { 00034 return _logStream; 00035 } 00036 00040 const bool getForcedInitialisationFlag() const { 00041 return _forceMultipleInit; 00042 } 00043 00044 00045 // ///////// Setters ////////// 00049 void setForcedInitialisationFlag (const bool iForceMultipleInstance) { 00050 _forceMultipleInit = iForceMultipleInstance; 00051 } 00052 00053 00054 public: 00055 // ///////// Busines methods //////// 00059 bool check() const; 00060 00061 00062 public: 00063 // ///////// Display methods //////// 00067 const std::string describe() const; 00068 00072 std::string toShortString() const; 00073 00077 std::string toString() const; 00078 00079 00080 public: 00089 BasLogParams (const LOG::EN_LogLevel iLogLevel, 00090 std::ostream& ioLogOutputStream, 00091 const bool iForceMultipleInstance = false); 00092 00096 BasLogParams (const BasLogParams&); 00097 00101 ~BasLogParams(); 00102 00103 private: 00107 BasLogParams(); 00108 00109 00110 private: 00111 // /////// Attributes ///////// 00115 const LOG::EN_LogLevel _logLevel; 00116 00120 std::ostream& _logStream; 00121 00135 bool _forceMultipleInit; 00136 }; 00137 00138 } 00139 #endif // __STDAIR_BAS_BASLOGPARAMS_HPP