cprover
cout_message.h
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module:
4 
5 Author: Daniel Kroening, kroening@kroening.com
6 
7 \*******************************************************************/
8 
9 
10 #ifndef CPROVER_UTIL_COUT_MESSAGE_H
11 #define CPROVER_UTIL_COUT_MESSAGE_H
12 
13 #include "ui_message.h"
14 
16 {
17 public:
18  // all messages go to stdout
20 };
21 
23 {
24 public:
25  // all messages go to stderr
27 };
28 
30 {
31 public:
32  // level 4 and upwards go to cout, level 1-3 to cerr
33  virtual void print(
34  unsigned level,
35  const std::string &message) override;
36 
37  virtual void flush(unsigned level) override;
38 
40  {
41  }
42 
45  {
46  }
47 
48 protected:
49  const bool always_flush;
50 };
51 
53 {
54 public:
55  // aims to imitate the messages gcc prints
56  virtual void print(
57  unsigned level,
58  const std::string &message) override;
59 
60  virtual void print(
61  unsigned level,
62  const std::string &message,
63  int sequence_number,
64  const source_locationt &location) override;
65 };
66 
67 #endif // CPROVER_UTIL_COUT_MESSAGE_H
console_message_handlert(bool always_flush)
Definition: cout_message.h:43
virtual void flush(unsigned level) override
virtual void print(unsigned level, const std::string &message) override
virtual void print(unsigned level, const std::string &message) override