CBMC
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 "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  void print(unsigned, const xmlt &) override
33  {
34  }
35 
36  void print(unsigned, const jsont &) override
37  {
38  }
39 
40  // level 4 and upwards go to cout, level 1-3 to cerr
41  virtual void print(
42  unsigned level,
43  const std::string &message) override;
44 
45  virtual void flush(unsigned level) override;
46 
48  {
49  }
50 
52 
53  std::string command(unsigned c) const override;
54 
55 protected:
56  const bool always_flush;
57 
59  bool is_a_tty;
60 
62  bool use_SGR;
63 };
64 
65 #endif // CPROVER_UTIL_COUT_MESSAGE_H
void print(unsigned, const jsont &) override
Definition: cout_message.h:36
bool use_SGR
true if we use ECMA-48 SGR to render colors
Definition: cout_message.h:62
bool is_a_tty
true if we are outputting to a proper console
Definition: cout_message.h:59
std::string command(unsigned c) const override
Create an ECMA-48 SGR (Select Graphic Rendition) command with given code.
void print(unsigned, const xmlt &) override
Definition: cout_message.h:32
virtual void flush(unsigned level) override
Definition: json.h:27
Definition: xml.h:21