KiCad PCB EDA Suite
Loading...
Searching...
No Matches
SIM_SEVERITY_STRING_REPORTER Class Reference

A REPORTER that keeps each line's severity so the console can be filtered. More...

Inheritance diagram for SIM_SEVERITY_STRING_REPORTER:
REPORTER

Public Types

enum  LOCATION { LOC_HEAD = 0 , LOC_BODY , LOC_TAIL }
 Location where the message is to be reported. More...
 

Public Member Functions

REPORTER & Report (const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED) override
 Report a string with a given severity.
 
void Clear () override
 
std::vector< SIM_CONSOLE_ENTRY > TakePendingEntries ()
 
virtual REPORTER & Report (const KI_ERROR &aError)
 Report a structured KI_ERROR.
 
REPORTER & Report (const char *aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED)
 
virtual REPORTER & ReportTail (const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED)
 Places the report at the end of the list, for objects that support report ordering.
 
virtual REPORTER & ReportHead (const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED)
 Places the report at the beginning of the list for objects that support ordering.
 
REPORTER & operator<< (const wxString &aText)
 
virtual bool HasMessage () const
 Returns true if any messages were reported.
 
virtual bool HasMessageOfSeverity (int aSeverityMask) const
 Returns true if the reporter has one or more messages matching the specified severity mask.
 
virtual EDA_UNITS GetUnits () const
 
virtual void Finalize ()
 

Private Attributes

std::vector< SIM_CONSOLE_ENTRY > m_entries
 
int m_reportedSeverityMask
 

Detailed Description

A REPORTER that keeps each line's severity so the console can be filtered.

Definition at line 68 of file simulator_frame.cpp.

Member Enumeration Documentation

◆ LOCATION

enum REPORTER::LOCATION
inherited

Location where the message is to be reported.

LOC_HEAD messages are printed before all others (typically intro messages) LOC_BODY messages are printed in the middle LOC_TAIL messages are printed after all others (typically status messages)

Enumerator
LOC_HEAD 
LOC_BODY 
LOC_TAIL 

Definition at line 88 of file reporter.h.

Member Function Documentation

◆ Clear()

void SIM_SEVERITY_STRING_REPORTER::Clear ( )
inlineoverridevirtual

Reimplemented from REPORTER.

Definition at line 80 of file simulator_frame.cpp.

References REPORTER::Clear(), and m_entries.

◆ Finalize()

virtual void REPORTER::Finalize ( )
inlinevirtualinherited

Reimplemented in INFOBAR_REPORTER, and SYNC_REPORTER.

Definition at line 167 of file reporter.h.

◆ GetUnits()

virtual EDA_UNITS REPORTER::GetUnits ( ) const
inlinevirtualinherited

Reimplemented in KI_TEST::CAPTURING_REPORTER, SYNC_REPORTER, and WX_HTML_REPORT_BOX.

Definition at line 157 of file reporter.h.

References MM.

◆ HasMessage()

◆ HasMessageOfSeverity()

virtual bool REPORTER::HasMessageOfSeverity ( int aSeverityMask) const
inlinevirtualinherited

Returns true if the reporter has one or more messages matching the specified severity mask.

Reimplemented in SYNC_REPORTER, and WX_HTML_PANEL_REPORTER.

Definition at line 152 of file reporter.h.

References m_reportedSeverityMask.

Referenced by DRC_ENGINE::compileRules(), DIALOG_SIM_MODEL< T >::loadLibrary(), NETLIST_EXPORTER_SPICE::ReadSchematicAndLibraries(), SIM_LIB_MGR::SetLibrary(), and SIMULATOR_FRAME::showNetlistErrors().

◆ operator<<()

REPORTER & REPORTER::operator<< ( const wxString & aText)
inlineinherited

Definition at line 138 of file reporter.h.

References Report(), and REPORTER().

◆ Report() [1/3]

REPORTER & REPORTER::Report ( const char * aText,
SEVERITY aSeverity = RPT_SEVERITY_UNDEFINED )
inherited

Definition at line 79 of file reporter.cpp.

References From_UTF8(), Report(), and REPORTER().

◆ Report() [2/3]

REPORTER & REPORTER::Report ( const KI_ERROR & aError)
virtualinherited

Report a structured KI_ERROR.

The default implementation flattens the error onto Report(const wxString&, SEVERITY). Reporters that want to render the title / description / debug hierarchy separately override this.

Reimplemented in STATUSBAR_WARNING_REPORTER, and WX_HTML_REPORT_BOX.

Definition at line 86 of file reporter.cpp.

References KI_ERROR::AsString(), KI_ERROR::GetSeverity(), Report(), and REPORTER().

◆ Report() [3/3]

REPORTER & SIM_SEVERITY_STRING_REPORTER::Report ( const wxString & aText,
SEVERITY aSeverity = RPT_SEVERITY_UNDEFINED )
inlineoverridevirtual

Report a string with a given severity.

Parameters
aTextis the string to report.
aSeverityis an indicator ( RPT_UNDEFINED, RPT_INFO, RPT_WARNING, RPT_ERROR, RPT_ACTION ) used to filter and format messages

Reimplemented from REPORTER.

Definition at line 71 of file simulator_frame.cpp.

References m_entries, REPORTER::Report(), REPORTER::REPORTER(), and RPT_SEVERITY_UNDEFINED.

◆ ReportHead()

virtual REPORTER & REPORTER::ReportHead ( const wxString & aText,
SEVERITY aSeverity = RPT_SEVERITY_UNDEFINED )
inlinevirtualinherited

Places the report at the beginning of the list for objects that support ordering.

Reimplemented in SYNC_REPORTER, and WX_HTML_PANEL_REPORTER.

Definition at line 130 of file reporter.h.

References Report(), REPORTER(), and RPT_SEVERITY_UNDEFINED.

Referenced by BACK_ANNOTATE::applyChangelist(), and SCH_EDIT_FRAME::WriteNetListFile().

◆ ReportTail()

◆ TakePendingEntries()

std::vector< SIM_CONSOLE_ENTRY > SIM_SEVERITY_STRING_REPORTER::TakePendingEntries ( )
inline

Definition at line 86 of file simulator_frame.cpp.

References m_entries.

Member Data Documentation

◆ m_entries

std::vector<SIM_CONSOLE_ENTRY> SIM_SEVERITY_STRING_REPORTER::m_entries
private

Definition at line 94 of file simulator_frame.cpp.

Referenced by Clear(), Report(), and TakePendingEntries().

◆ m_reportedSeverityMask

int REPORTER::m_reportedSeverityMask
privateinherited

Definition at line 170 of file reporter.h.

Referenced by Clear(), HasMessage(), HasMessageOfSeverity(), Report(), and REPORTER().


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