• Main Page
  • Related Pages
  • Modules
  • Namespaces
  • Classes
  • Files
  • Examples
  • File List

log.h

00001 /***************************************************************************
00002  *  include/stxxl/bits/common/log.h
00003  *
00004  *  Part of the STXXL. See http://stxxl.sourceforge.net
00005  *
00006  *  Copyright (C) 2004-2005 Roman Dementiev <dementiev@ira.uka.de>
00007  *
00008  *  Distributed under the Boost Software License, Version 1.0.
00009  *  (See accompanying file LICENSE_1_0.txt or copy at
00010  *  http://www.boost.org/LICENSE_1_0.txt)
00011  **************************************************************************/
00012 
00013 #ifndef STXXL_LOG_HEADER
00014 #define STXXL_LOG_HEADER
00015 
00016 #include <iostream>
00017 #include <fstream>
00018 
00019 #include <stxxl/bits/namespace.h>
00020 #include <stxxl/bits/singleton.h>
00021 
00022 
00023 __STXXL_BEGIN_NAMESPACE
00024 
00025 class logger : public singleton<logger>
00026 {
00027     friend class singleton<logger>;
00028 
00029     std::ofstream log_stream_;
00030     std::ofstream errlog_stream_;
00031     std::ofstream * waitlog_stream_;
00032 
00033     logger();
00034     ~logger();
00035 
00036 public:
00037     inline std::ofstream & log_stream()
00038     {
00039         return log_stream_;
00040     }
00041 
00042     inline std::ofstream & errlog_stream()
00043     {
00044         return errlog_stream_;
00045     }
00046 
00047     inline std::ofstream * waitlog_stream()
00048     {
00049         return waitlog_stream_;
00050     }
00051 };
00052 
00053 __STXXL_END_NAMESPACE
00054 
00055 #endif // !STXXL_LOG_HEADER

Generated on Sun Oct 17 2010 06:13:43 for Stxxl by  doxygen 1.7.1