GCC Middle and Back End API Reference
json_output_format Class Referenceabstract
Inheritance diagram for json_output_format:
Collaboration diagram for json_output_format:

Public Member Functions

void dump (FILE *out, int indent) const override
 
std::unique_ptr< diagnostic_per_format_buffermake_per_format_buffer () final override
 
void set_buffer (diagnostic_per_format_buffer *base_buffer) final override
 
void on_begin_group () final override
 
void on_end_group () final override
 
void on_report_diagnostic (const diagnostic_info &diagnostic, diagnostic_t orig_diag_kind) final override
 
void on_diagram (const diagnostic_diagram &) final override
 
void after_diagnostic (const diagnostic_info &) final override
 
void update_printer () final override
 
bool follows_reference_printer_p () const final override
 
void DEBUG_FUNCTION dump () const
 
virtual void on_report_verbatim (text_info &)
 
virtual bool machine_readable_stderr_p () const =0
 
diagnostic_contextget_context () const
 
pretty_printerget_printer () const
 
text_art::theme * get_diagram_theme () const
 

Protected Member Functions

 json_output_format (diagnostic_context &context, bool formatted)
 
void flush_to_file (FILE *outf)
 

Protected Attributes

diagnostic_contextm_context
 
std::unique_ptr< pretty_printerm_printer
 

Private Attributes

diagnostic_json_format_bufferm_buffer
 
std::unique_ptr< json::arraym_toplevel_array
 
json::objectm_cur_group
 
json::arraym_cur_children_array
 
bool m_formatted
 

Friends

class diagnostic_json_format_buffer
 

Detailed Description

Subclass of diagnostic_output_format for JSON output.   

Constructor & Destructor Documentation

◆ json_output_format()

json_output_format::json_output_format ( diagnostic_context & context,
bool formatted )
inlineprotected

Member Function Documentation

◆ after_diagnostic()

void json_output_format::after_diagnostic ( const diagnostic_info & )
inlinefinaloverridevirtual

◆ dump() [1/2]

◆ dump() [2/2]

void json_output_format::dump ( FILE * out,
int indent ) const
inlineoverridevirtual

◆ flush_to_file()

void json_output_format::flush_to_file ( FILE * outf)
inlineprotected

◆ follows_reference_printer_p()

bool json_output_format::follows_reference_printer_p ( ) const
inlinefinaloverridevirtual

◆ get_context()

◆ get_diagram_theme()

text_art::theme * diagnostic_output_format::get_diagram_theme ( ) const
inlineinherited

◆ get_printer()

◆ machine_readable_stderr_p()

virtual bool diagnostic_output_format::machine_readable_stderr_p ( ) const
pure virtualinherited

◆ make_per_format_buffer()

std::unique_ptr< diagnostic_per_format_buffer > json_output_format::make_per_format_buffer ( )
inlinefinaloverridevirtual

◆ on_begin_group()

void json_output_format::on_begin_group ( )
inlinefinaloverridevirtual

◆ on_diagram()

void json_output_format::on_diagram ( const diagnostic_diagram & )
inlinefinaloverridevirtual

◆ on_end_group()

void json_output_format::on_end_group ( )
inlinefinaloverridevirtual

◆ on_report_diagnostic()

void json_output_format::on_report_diagnostic ( const diagnostic_info & diagnostic,
diagnostic_t orig_diag_kind )
finaloverridevirtual

◆ on_report_verbatim()

void diagnostic_output_format::on_report_verbatim ( text_info & )
virtualinherited

Reimplemented in diagnostic_text_output_format.

◆ set_buffer()

void json_output_format::set_buffer ( diagnostic_per_format_buffer * base_buffer)
inlinefinaloverridevirtual

◆ update_printer()

void json_output_format::update_printer ( )
inlinefinaloverridevirtual

Implements diagnostic_output_format.

References pp_show_color().

Friends And Related Symbol Documentation

◆ diagnostic_json_format_buffer

friend class diagnostic_json_format_buffer
friend

Field Documentation

◆ m_buffer

diagnostic_json_format_buffer* json_output_format::m_buffer
private

◆ m_context

◆ m_cur_children_array

json::array* json_output_format::m_cur_children_array
private

◆ m_cur_group

json::object* json_output_format::m_cur_group
private

◆ m_formatted

bool json_output_format::m_formatted
private

◆ m_printer

std::unique_ptr<pretty_printer> diagnostic_output_format::m_printer
protectedinherited

◆ m_toplevel_array

std::unique_ptr<json::array> json_output_format::m_toplevel_array
private

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