26 #ifndef SHORE_PARALLEL_PARALLEL_LOG_HPP__
27 #define SHORE_PARALLEL_PARALLEL_LOG_HPP__
35 #include <boost/thread/thread.hpp>
36 #include <boost/thread/recursive_mutex.hpp>
37 #include <boost/thread/condition.hpp>
40 #include <boost/thread.hpp>
41 #include <boost/serialization/string.hpp>
42 #include <boost/serialization/vector.hpp>
43 #include <boost/archive/text_oarchive.hpp>
44 #include <boost/archive/text_iarchive.hpp>
58 typedef boost::recursive_mutex mutex_type;
59 typedef boost::recursive_mutex::scoped_lock lock_type;
60 typedef std::map<std::string,mutex_type *> mutexmap_t;
62 std::string m_filename;
66 friend class boost::serialization::access;
68 template<
class Archive>
69 void serialize(Archive& ar,
const unsigned int version)
81 void set_file(
const std::string &fn);
82 const std::string &get_file()
const;
83 std::string get_dir()
const;
87 log_lock lock()
const;
95 static mutex_type m_mastermutex;
96 static mutexmap_t m_mutexmap;
99 std::string m_filename;
110 log_lock(
const std::string &logfile);
112 log_lock(
const log_lock &other);
124 #endif // SHORE_PARALLEL_PARALLEL_LOG_HPP__