Go to the documentation of this file.
23 const std::string &program,
26 : message_handler(_message_handler),
28 always_flush(always_flush),
39 out <<
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
46 program_xml.
name=
"program";
47 program_xml.
data=program;
65 const std::string &program)
68 cmdline.isset(
"xml-ui") || cmdline.isset(
"xml-interface")
70 : cmdline.isset(
"json-ui") || cmdline.isset(
"json-interface")
74 cmdline.isset(
"flush"),
75 cmdline.isset(
"timestamp") ? cmdline.get_value(
"timestamp") ==
"monotonic"
77 : cmdline.get_value(
"timestamp") ==
"wall"
85 util_make_unique<console_message_handlert>(
always_flush);
124 return "STATUS-MESSAGE";
137 std::stringstream ss;
138 const std::string timestamp =
time->stamp();
139 ss << timestamp << (timestamp.empty() ?
"" :
" ") <<
message;
169 INVARIANT(
false,
"Cannot print xml data on PLAIN UI");
176 INVARIANT(
false,
"Cannot print xml data on JSON UI");
191 INVARIANT(
false,
"Cannot print json data on PLAIN UI");
194 INVARIANT(
false,
"Cannot print json data on XML UI");
224 std::string tmp_message(
message);
226 if(!tmp_message.empty() && *tmp_message.rbegin()==
'\n')
227 tmp_message.resize(tmp_message.size()-1);
231 ui_msg(type, tmp_message, location);
239 const std::string &type,
240 const std::string &msg,
259 const std::string &type,
260 const std::string &msg1,
264 result.
name=
"message";
272 const std::string timestamp =
time->stamp();
273 if(!timestamp.empty())
281 const std::string &type,
282 const std::string &msg1,
290 result[
"sourceLocation"] =
json(location);
294 const std::string timestamp =
time->stamp();
295 if(!timestamp.empty())
virtual void ui_msg(const std::string &type, const std::string &msg, const source_locationt &location)
clockt
Derived types of timestampert.
virtual ~ui_message_handlert()
virtual void print(unsigned level, const std::string &message)=0
virtual uit get_ui() const
static const char * message(const static_verifier_resultt::statust &status)
Makes a status message string from a status.
std::unique_ptr< json_stream_arrayt > json_stream
virtual void json_ui_msg(const std::string &type, const std::string &msg, const source_locationt &location)
xmlt xml(const irep_idt &property_id, const property_infot &property_info)
std::unique_ptr< const timestampert > time
static void json(json_objectT &result, const irep_idt &property_id, const property_infot &property_info)
Provides methods for streaming JSON arrays.
std::unique_ptr< console_message_handlert > console_message_handler
void set_attribute(const std::string &attribute, unsigned value)
const char * level_string(unsigned level)
virtual void xml_ui_msg(const std::string &type, const std::string &msg, const source_locationt &location)
virtual void print(unsigned level, const std::string &message) override
virtual void flush(unsigned level) override
const irep_idt & get_file() const
virtual void flush(unsigned)=0
ui_message_handlert(const class cmdlinet &, const std::string &program)
Timestamp class hierarchy.
message_handlert * message_handler
xmlt & new_element(const std::string &key)