CBMC
ui_message_handlert Class Reference

#include <ui_message.h>

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

Public Types

enum class  uit { PLAIN , XML_UI , 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 ()
 
void print (unsigned level, const structured_datat &data) override
 
- 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 21 of file ui_message.h.

Member Enumeration Documentation

◆ uit

Enumerator
PLAIN 
XML_UI 
JSON_UI 

Definition at line 24 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 66 of file ui_message.cpp.

◆ ui_message_handlert() [2/4]

ui_message_handlert::ui_message_handlert ( message_handlert message_handler)
explicit

Definition at line 93 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 99 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 23 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 97 of file ui_message.h.

◆ flush()

void ui_message_handlert::flush ( unsigned  level)
overridevirtual

Implements message_handlert.

Definition at line 302 of file ui_message.cpp.

◆ get_json_stream()

virtual json_stream_arrayt& ui_message_handlert::get_json_stream ( )
inlinevirtual

Definition at line 40 of file ui_message.h.

◆ get_ui()

virtual uit ui_message_handlert::get_ui ( ) const
inlinevirtual

Definition at line 33 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 283 of file ui_message.cpp.

◆ level_string()

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

Definition at line 120 of file ui_message.cpp.

◆ print() [1/5]

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

Implements message_handlert.

Definition at line 185 of file ui_message.cpp.

◆ print() [2/5]

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

Implements message_handlert.

Definition at line 130 of file ui_message.cpp.

◆ print() [3/5]

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

Reimplemented from message_handlert.

Definition at line 208 of file ui_message.cpp.

◆ print() [4/5]

void ui_message_handlert::print ( unsigned  level,
const structured_datat data 
)
overridevirtual

Reimplemented from message_handlert.

Definition at line 316 of file ui_message.cpp.

◆ print() [5/5]

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

Implements message_handlert.

Definition at line 163 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 241 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 261 of file ui_message.cpp.

Member Data Documentation

◆ _ui

uit ui_message_handlert::_ui
protected

Definition at line 50 of file ui_message.h.

◆ always_flush

const bool ui_message_handlert::always_flush
protected

Definition at line 51 of file ui_message.h.

◆ console_message_handler

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

Definition at line 48 of file ui_message.h.

◆ json_stream

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

Definition at line 54 of file ui_message.h.

◆ message_handler

message_handlert* ui_message_handlert::message_handler
protected

Definition at line 49 of file ui_message.h.

◆ out

std::ostream& ui_message_handlert::out
protected

Definition at line 53 of file ui_message.h.

◆ time

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

Definition at line 52 of file ui_message.h.


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