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 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
 
virtual bool machine_readable_stderr_p () const =0
 

Protected Member Functions

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

Protected Attributes

diagnostic_contextm_context
 

Private Attributes

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

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

◆ flush_to_file()

void json_output_format::flush_to_file ( FILE * outf)
inlineprotected

◆ machine_readable_stderr_p()

virtual bool diagnostic_output_format::machine_readable_stderr_p ( ) const
pure virtualinherited

◆ 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()

Field Documentation

◆ 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

Referenced by flush_to_file().

◆ 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: