LAMA
/home/brandes/workspace/LAMA/src/lama/solver/logger/FileLogger.hpp
Go to the documentation of this file.
00001 
00035 #ifndef LAMA_FILELOGGER_HPP_
00036 #define LAMA_FILELOGGER_HPP_
00037 
00038 // for dll_import
00039 #include <lama/config.hpp>
00040 
00041 // base classes
00042 #include <lama/NonCopyable.hpp>
00043 
00044 #include <string>
00045 #include <fstream>
00046 
00047 namespace lama
00048 {
00049 
00053 class LAMA_DLL_IMPORTEXPORT FileLogger : private NonCopyable
00054 {
00055 public:
00056 
00060     virtual ~FileLogger();
00061 
00070     static FileLogger& getFileLogger();
00071 
00077     void logMessage(const std::string& message);
00078 
00086     void setLogFile(const std::string& logFileName);
00087 
00091     void closeLogFile();
00092 
00093 private:
00094 
00098     std::fstream mFileStream;
00099 
00103     std::string mFileName;
00104 
00110     FileLogger();
00111 };
00112 
00113 } // namespace lama
00114 
00115 #endif // LAMA_FILELOGGER_HPP_