|
KiCad PCB EDA Suite
|
Reporter handed to an importer during an import job. More...
#include <job_import_utils.h>
Public Types | |
| enum | LOCATION { LOC_HEAD = 0 , LOC_BODY , LOC_TAIL } |
| Location where the message is to be reported. More... | |
Public Member Functions | |
| IMPORT_MESSAGE_COLLECTOR (REPORTER &aJobReporter) | |
| ~IMPORT_MESSAGE_COLLECTOR () override | |
| REPORTER & | Report (const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED) override |
| Report a string with a given severity. | |
| bool | HasMessage () const override |
| Returns true if any messages were reported. | |
| void | Clear () override |
| void | Flush (IMPORT_REPORT_FORMAT aFormat, IMPORT_REPORT_DATA &aData) |
Move the collected messages into aData when a report will be written, otherwise forward them to the job's reporter. | |
| 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 | 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 Member Functions | |
| void | forward () |
Private Attributes | |
| REPORTER & | m_jobReporter |
| std::vector< wxString > | m_warnings |
| std::vector< wxString > | m_errors |
| int | m_reportedSeverityMask |
Reporter handed to an importer during an import job.
It keeps the importer's warnings and errors so the job can place them in its report, and drops informational and debug messages. Messages still held when it is destroyed, e.g. after a failed load, are forwarded to the job's reporter.
Definition at line 78 of file job_import_utils.h.
|
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.
|
inlineexplicit |
Definition at line 81 of file job_import_utils.h.
References m_jobReporter, and REPORTER::REPORTER().
|
override |
Definition at line 134 of file job_import_utils.cpp.
References forward().
|
overridevirtual |
Reimplemented from REPORTER.
Definition at line 126 of file job_import_utils.cpp.
References REPORTER::Clear(), m_errors, and m_warnings.
|
inlinevirtualinherited |
Reimplemented in INFOBAR_REPORTER, and SYNC_REPORTER.
Definition at line 167 of file reporter.h.
| void IMPORT_MESSAGE_COLLECTOR::Flush | ( | IMPORT_REPORT_FORMAT | aFormat, |
| IMPORT_REPORT_DATA & | aData ) |
Move the collected messages into aData when a report will be written, otherwise forward them to the job's reporter.
Definition at line 152 of file job_import_utils.cpp.
References Clear(), forward(), m_errors, m_warnings, and NONE.
Referenced by EESCHEMA_JOBS_HANDLER::JobImport(), and PCBNEW_JOBS_HANDLER::JobImport().
|
private |
Definition at line 140 of file job_import_utils.cpp.
References Clear(), m_errors, m_jobReporter, m_warnings, RPT_SEVERITY_ERROR, and RPT_SEVERITY_WARNING.
Referenced by Flush(), and ~IMPORT_MESSAGE_COLLECTOR().
|
inlinevirtualinherited |
Reimplemented in KI_TEST::CAPTURING_REPORTER, SYNC_REPORTER, and WX_HTML_REPORT_BOX.
Definition at line 157 of file reporter.h.
References MM.
|
inlineoverridevirtual |
Returns true if any messages were reported.
Reimplemented from REPORTER.
Definition at line 89 of file job_import_utils.h.
References m_errors, and m_warnings.
|
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().
|
inlineinherited |
Definition at line 138 of file reporter.h.
References Report(), and REPORTER().
|
overridevirtual |
Report a string with a given severity.
| aText | is the string to report. |
| aSeverity | is an indicator ( RPT_UNDEFINED, RPT_INFO, RPT_WARNING, RPT_ERROR, RPT_ACTION ) used to filter and format messages |
Reimplemented from REPORTER.
Definition at line 110 of file job_import_utils.cpp.
References m_errors, m_warnings, REPORTER::Report(), REPORTER::REPORTER(), RPT_SEVERITY_ERROR, RPT_SEVERITY_WARNING, and text.
|
inherited |
Definition at line 79 of file reporter.cpp.
References From_UTF8(), Report(), and REPORTER().
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().
|
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().
|
inlinevirtualinherited |
Places the report at the end of the list, for objects that support report ordering.
Reimplemented in SYNC_REPORTER, and WX_HTML_PANEL_REPORTER.
Definition at line 121 of file reporter.h.
References Report(), REPORTER(), and RPT_SEVERITY_UNDEFINED.
Referenced by SCH_EDIT_FRAME::AnnotateSymbols(), EXCELLON_WRITER::CreateDrillandMapFilesSet(), GERBER_WRITER::CreateDrillandMapFilesSet(), SCH_PLOTTER::createDXFFiles(), SCH_PLOTTER::createPDFFile(), SCH_PLOTTER::createPNGFiles(), DIALOG_SYMBOL_REMAP::createProjectSymbolLibTable(), SCH_PLOTTER::createPSFiles(), SCH_PLOTTER::createSVGFiles(), SCH_SCREEN::UpdateSymbolLinks(), and SCH_EDIT_FRAME::WriteNetListFile().
|
private |
Definition at line 104 of file job_import_utils.h.
Referenced by Clear(), Flush(), forward(), HasMessage(), and Report().
|
private |
Definition at line 102 of file job_import_utils.h.
Referenced by forward(), and IMPORT_MESSAGE_COLLECTOR().
|
privateinherited |
Definition at line 170 of file reporter.h.
Referenced by Clear(), HasMessage(), HasMessageOfSeverity(), Report(), and REPORTER().
|
private |
Definition at line 103 of file job_import_utils.h.
Referenced by Clear(), Flush(), forward(), HasMessage(), and Report().