26 const std::string &program,
31 always_flush(always_flush),
42 out <<
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
68 const std::string &program)
71 cmdline.isset(
"xml-ui") || cmdline.isset(
"xml-interface")
73 : cmdline.isset(
"json-ui") || cmdline.isset(
"json-interface")
77 cmdline.isset(
"flush"),
78 cmdline.isset(
"timestamp") ? cmdline.get_value(
"timestamp") ==
"monotonic"
80 : cmdline.get_value(
"timestamp") ==
"wall"
88 std::make_unique<console_message_handlert>(
always_flush);
127 return "STATUS-MESSAGE";
132 const std::string &message)
140 std::stringstream
ss;
154 print(level, message, location);
172 INVARIANT(
false,
"Cannot print xml data on PLAIN UI");
179 INVARIANT(
false,
"Cannot print xml data on JSON UI");
194 INVARIANT(
false,
"Cannot print json data on PLAIN UI");
197 INVARIANT(
false,
"Cannot print json data on XML UI");
210 const std::string &message,
221 level, message, location);
242 const std::string &type,
243 const std::string &
msg,
262 const std::string &type,
263 const std::string &
msg1,
267 result.
name=
"message";
284 const std::string &type,
285 const std::string &
msg1,
293 result[
"sourceLocation"] =
json(location);
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
Provides methods for streaming JSON arrays.
json_objectt & make_object()
virtual void print(unsigned level, const std::string &message)=0
virtual void flush(unsigned)=0
const irep_idt & get_file() const
A way of representing nested key/value data.
Timestamp class hierarchy.
clockt
Derived types of timestampert.
void print(unsigned level, const structured_datat &data) override
virtual void json_ui_msg(const std::string &type, const std::string &msg, const source_locationt &location)
const char * level_string(unsigned level)
virtual uit get_ui() const
message_handlert * message_handler
std::unique_ptr< const timestampert > time
virtual void flush(unsigned level) override
virtual void xml_ui_msg(const std::string &type, const std::string &msg, const source_locationt &location)
std::unique_ptr< json_stream_arrayt > json_stream
virtual ~ui_message_handlert()
ui_message_handlert(const class cmdlinet &, const std::string &program)
virtual void ui_msg(const std::string &type, const std::string &msg, const source_locationt &location)
std::unique_ptr< console_message_handlert > console_message_handler
xmlt & new_element(const std::string &key)
void set_attribute(const std::string &attribute, unsigned value)
jsont to_json(const structured_datat &data)
Convert the structured_datat into an json object.
static void json(json_objectT &result, const irep_idt &property_id, const property_infot &property_info)
xmlt xml(const irep_idt &property_id, const property_infot &property_info)
#define INVARIANT(CONDITION, REASON)
This macro uses the wrapper function 'invariant_violated_string'.
std::string to_pretty(const structured_datat &data)
Convert the structured_data into plain text.
time_t time(time_t *tloc)
xmlt to_xml(const structured_datat &data)
Convert the structured_datat into an xml object.