UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
hds_messenger_file.hpp
1 /* hds_messenger_file.hpp */
2 /* $Id$ */
3 #ifndef __hds_messenger_file_hpp
4 #define __hds_messenger_file_hpp
5 
6 #include <QFile>
7 #include <QTextStream>
8 
9 #include <hds_batch/defines.hpp>
10 #include <hds_batch/errors.hpp>
11 #include <hds_batch/hds_messenger.hpp>
12 
14 namespace hds
15 {
18  {
19  public:
20 
23  MessengerFile(const QString &log_file_name);
24 
26  virtual ~MessengerFile();
27 
28 
31  virtual void sendMsg(const hds::Messenger::Message &msg) const;
32 
34  virtual hds::Messenger::Message getMsg() const;
35 
36 
38  bool isReady() const {return m_is_ready;}
39 
41  void flush() const;
42 
43  protected:
44 
46  QFile m_log_file;
47 
49  mutable QTextStream m_log_stream;
50 
52  bool m_is_ready;
53 
55  bool prepare(const QString &log_file_name);
56  };
57 };
58 
59 #endif /* hds_messenger_file.hpp */
MessengerFile(const QString &log_file_name)
void flush() const
Definition: hds_messenger_file.hpp:17
Definition: hds_messenger.hpp:16
virtual void sendMsg(const hds::Messenger::Message &msg) const
bool prepare(const QString &log_file_name)
virtual hds::Messenger::Message getMsg() const
QFile m_log_file
Definition: hds_messenger_file.hpp:46
bool isReady() const
Definition: hds_messenger_file.hpp:38
bool m_is_ready
Definition: hds_messenger_file.hpp:52
virtual ~MessengerFile()
Definition: hds_messenger.hpp:38