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

Public Member Functions

 diagnostic_sarif_format_buffer (sarif_builder &builder)
 
void dump (FILE *out, int indent) const final override
 
bool empty_p () const final override
 
void move_to (diagnostic_per_format_buffer &dest) final override
 
void clear () final override
 
void flush () final override
 
void add_result (std::unique_ptr< sarif_result > result)
 
size_t num_results () const
 
sarif_resultget_result (size_t idx)
 
void DEBUG_FUNCTION dump () const
 

Private Attributes

sarif_builderm_builder
 
std::vector< std::unique_ptr< sarif_result > > m_results
 

Friends

class sarif_output_format
 

Detailed Description

Concrete buffering implementation subclass for JSON output.   

Constructor & Destructor Documentation

◆ diagnostic_sarif_format_buffer()

diagnostic_sarif_format_buffer::diagnostic_sarif_format_buffer ( sarif_builder & builder)
inline

Member Function Documentation

◆ add_result()

void diagnostic_sarif_format_buffer::add_result ( std::unique_ptr< sarif_result > result)
inline

◆ clear()

void diagnostic_sarif_format_buffer::clear ( )
finaloverridevirtual

Implements diagnostic_per_format_buffer.

References m_results.

◆ dump() [1/2]

void DEBUG_FUNCTION diagnostic_per_format_buffer::dump ( ) const
inlineinherited

◆ dump() [2/2]

void diagnostic_sarif_format_buffer::dump ( FILE * out,
int indent ) const
finaloverridevirtual
class diagnostic_sarif_format_buffer : public diagnostic_per_format_buffer.   

Implements diagnostic_per_format_buffer.

References m_results.

◆ empty_p()

bool diagnostic_sarif_format_buffer::empty_p ( ) const
finaloverridevirtual

Implements diagnostic_per_format_buffer.

References m_results.

◆ flush()

void diagnostic_sarif_format_buffer::flush ( )
finaloverridevirtual

◆ get_result()

sarif_result & diagnostic_sarif_format_buffer::get_result ( size_t idx)
inline

References m_results.

◆ move_to()

void diagnostic_sarif_format_buffer::move_to ( diagnostic_per_format_buffer & dest)
finaloverridevirtual

Implements diagnostic_per_format_buffer.

References m_results.

◆ num_results()

size_t diagnostic_sarif_format_buffer::num_results ( ) const
inline

References m_results.

Friends And Related Symbol Documentation

◆ sarif_output_format

friend class sarif_output_format
friend

Field Documentation

◆ m_builder

sarif_builder& diagnostic_sarif_format_buffer::m_builder
private

Referenced by flush().

◆ m_results

std::vector<std::unique_ptr<sarif_result> > diagnostic_sarif_format_buffer::m_results
private

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