cprover
ui_message_handlert Class Reference

#include <ui_message.h>

+ Inheritance diagram for ui_message_handlert:
+ Collaboration diagram for ui_message_handlert:

Public Types

enum  uit { uit::PLAIN, uit::XML_UI, uit::JSON_UI }
 

Public Member Functions

 ui_message_handlert (const class cmdlinet &, const std::string &program)
 
 ui_message_handlert (message_handlert &)
 
 ui_message_handlert (ui_message_handlert &&)=default
 
virtual ~ui_message_handlert ()
 
virtual uit get_ui () const
 
virtual void flush (unsigned level) override
 
virtual json_stream_arraytget_json_stream ()
 
- Public Member Functions inherited from message_handlert
 message_handlert ()
 
virtual ~message_handlert ()
 
void set_verbosity (unsigned _verbosity)
 
unsigned get_verbosity () const
 
std::size_t get_message_count (unsigned level) const
 

Protected Member Functions

 ui_message_handlert (message_handlert *, uit, const std::string &program, const bool always_flush, timestampert::clockt clock_type)
 
virtual void print (unsigned level, const std::string &message) override
 
virtual void print (unsigned level, const std::string &message, const source_locationt &location) override
 
virtual void print (unsigned level, const xmlt &data) override
 
virtual void print (unsigned level, const jsont &data) override
 
virtual void xml_ui_msg (const std::string &type, const std::string &msg, const source_locationt &location)
 
virtual void json_ui_msg (const std::string &type, const std::string &msg, const source_locationt &location)
 
virtual void ui_msg (const std::string &type, const std::string &msg, const source_locationt &location)
 
const char * level_string (unsigned level)
 
std::string command (unsigned c) const override
 Create an ECMA-48 SGR (Select Graphic Rendition) command. More...
 

Protected Attributes

std::unique_ptr< console_message_handlertconsole_message_handler
 
message_handlertmessage_handler
 
uit _ui
 
const bool always_flush
 
std::unique_ptr< const timestamperttime
 
std::ostream & out
 
std::unique_ptr< json_stream_arraytjson_stream
 
- Protected Attributes inherited from message_handlert
unsigned verbosity
 
std::vector< std::size_t > message_count
 

Detailed Description

Definition at line 19 of file ui_message.h.

Member Enumeration Documentation

◆ uit

Enumerator
PLAIN 
XML_UI 
JSON_UI 

Definition at line 22 of file ui_message.h.

Constructor & Destructor Documentation

◆ ui_message_handlert() [1/4]

ui_message_handlert::ui_message_handlert ( const class cmdlinet cmdline,
const std::string &  program 
)

Definition at line 63 of file ui_message.cpp.

◆ ui_message_handlert() [2/4]

ui_message_handlert::ui_message_handlert ( message_handlert message_handler)
explicit

Definition at line 90 of file ui_message.cpp.

◆ ui_message_handlert() [3/4]

ui_message_handlert::ui_message_handlert ( ui_message_handlert &&  )
default

◆ ~ui_message_handlert()

ui_message_handlert::~ui_message_handlert ( )
virtual

Definition at line 96 of file ui_message.cpp.

◆ ui_message_handlert() [4/4]

ui_message_handlert::ui_message_handlert ( message_handlert _message_handler,
uit  __ui,
const std::string &  program,
const bool  always_flush,
timestampert::clockt  clock_type 
)
protected

Definition at line 20 of file ui_message.cpp.

Member Function Documentation

◆ command()

std::string ui_message_handlert::command ( unsigned  ) const
inlineoverrideprotectedvirtual

Create an ECMA-48 SGR (Select Graphic Rendition) command.

The default behavior is no action.

Reimplemented from message_handlert.

Definition at line 94 of file ui_message.h.

◆ flush()

void ui_message_handlert::flush ( unsigned  level)
overridevirtual

Implements message_handlert.

Definition at line 299 of file ui_message.cpp.

◆ get_json_stream()

virtual json_stream_arrayt& ui_message_handlert::get_json_stream ( )
inlinevirtual

Definition at line 38 of file ui_message.h.

◆ get_ui()

virtual uit ui_message_handlert::get_ui ( ) const
inlinevirtual

Definition at line 31 of file ui_message.h.

◆ json_ui_msg()

void ui_message_handlert::json_ui_msg ( const std::string &  type,
const std::string &  msg,
const source_locationt location 
)
protectedvirtual

Definition at line 280 of file ui_message.cpp.

◆ level_string()

const char * ui_message_handlert::level_string ( unsigned  level)
protected

Definition at line 117 of file ui_message.cpp.

◆ print() [1/4]

void ui_message_handlert::print ( unsigned  level,
const std::string &  message 
)
overrideprotectedvirtual

Implements message_handlert.

Definition at line 127 of file ui_message.cpp.

◆ print() [2/4]

void ui_message_handlert::print ( unsigned  level,
const std::string &  message,
const source_locationt location 
)
overrideprotectedvirtual

Reimplemented from message_handlert.

Definition at line 205 of file ui_message.cpp.

◆ print() [3/4]

void ui_message_handlert::print ( unsigned  level,
const xmlt data 
)
overrideprotectedvirtual

Implements message_handlert.

Definition at line 160 of file ui_message.cpp.

◆ print() [4/4]

void ui_message_handlert::print ( unsigned  level,
const jsont data 
)
overrideprotectedvirtual

Implements message_handlert.

Definition at line 182 of file ui_message.cpp.

◆ ui_msg()

void ui_message_handlert::ui_msg ( const std::string &  type,
const std::string &  msg,
const source_locationt location 
)
protectedvirtual

Definition at line 238 of file ui_message.cpp.

◆ xml_ui_msg()

void ui_message_handlert::xml_ui_msg ( const std::string &  type,
const std::string &  msg,
const source_locationt location 
)
protectedvirtual

Definition at line 258 of file ui_message.cpp.

Member Data Documentation

◆ _ui

uit ui_message_handlert::_ui
protected

Definition at line 47 of file ui_message.h.

◆ always_flush

const bool ui_message_handlert::always_flush
protected

Definition at line 48 of file ui_message.h.

◆ console_message_handler

std::unique_ptr<console_message_handlert> ui_message_handlert::console_message_handler
protected

Definition at line 45 of file ui_message.h.

◆ json_stream

std::unique_ptr<json_stream_arrayt> ui_message_handlert::json_stream
protected

Definition at line 51 of file ui_message.h.

◆ message_handler

message_handlert* ui_message_handlert::message_handler
protected

Definition at line 46 of file ui_message.h.

◆ out

std::ostream& ui_message_handlert::out
protected

Definition at line 50 of file ui_message.h.

◆ time

std::unique_ptr<const timestampert> ui_message_handlert::time
protected

Definition at line 49 of file ui_message.h.


The documentation for this class was generated from the following files: