|
KiCad PCB EDA Suite
|
#include <jobs/job_import_utils.h>#include <reporter.h>#include <string_utils.h>#include <wx/file.h>#include <wx/ffile.h>#include <wx/filename.h>#include <wx/intl.h>Go to the source code of this file.
Functions | |
| bool | ParseImportReportFormat (const wxString &aText, IMPORT_REPORT_FORMAT &aFormat) |
| Parse the user-facing report format name ("none", "json" or "text") into its enum. | |
| wxString | DefaultImportOutputPath (const wxString &aInputFile, const wxString &aKiCadExt) |
| Build the default output path for an import by swapping the input file's extension for the given KiCad extension, keeping it in the input file's directory. | |
| bool | LoadLayerMapFile (const wxString &aFile, std::map< wxString, wxString > &aMap, wxString &aError) |
Load an explicit layer-mapping file into aMap. | |
| void | WriteImportReport (REPORTER *aReporter, IMPORT_REPORT_FORMAT aFormat, const wxString &aReportFile, const IMPORT_REPORT_DATA &aData) |
Emit an import report in the requested format to aReportFile, or to aReporter (at INFO severity) when no file is given. | |
| wxString DefaultImportOutputPath | ( | const wxString & | aInputFile, |
| const wxString & | aKiCadExt ) |
Build the default output path for an import by swapping the input file's extension for the given KiCad extension, keeping it in the input file's directory.
Definition at line 44 of file job_import_utils.cpp.
Referenced by EESCHEMA_JOBS_HANDLER::JobImport(), and PCBNEW_JOBS_HANDLER::JobImport().
| bool LoadLayerMapFile | ( | const wxString & | aFile, |
| std::map< wxString, wxString > & | aMap, | ||
| wxString & | aError ) |
Load an explicit layer-mapping file into aMap.
The file is a flat JSON object whose keys are source (foreign) layer names and whose values are KiCad layer names, e.g.
aMap untouched and a human-readable reason in aError. Definition at line 53 of file job_import_utils.cpp.
References _, and From_UTF8().
Referenced by CLI::IMPORT_COMMAND::doPerform(), and CLI::PCB_IMPORT_COMMAND::doPerform().
| bool ParseImportReportFormat | ( | const wxString & | aText, |
| IMPORT_REPORT_FORMAT & | aFormat ) |
Parse the user-facing report format name ("none", "json" or "text") into its enum.
aFormat untouched. Definition at line 29 of file job_import_utils.cpp.
References JSON, NONE, and TEXT.
Referenced by CLI::PCB_IMPORT_COMMAND::doPerform(), and CLI::SCH_IMPORT_COMMAND::doPerform().
| void WriteImportReport | ( | REPORTER * | aReporter, |
| IMPORT_REPORT_FORMAT | aFormat, | ||
| const wxString & | aReportFile, | ||
| const IMPORT_REPORT_DATA & | aData ) |
Emit an import report in the requested format to aReportFile, or to aReporter (at INFO severity) when no file is given.
A NONE format is a no-op.
Definition at line 110 of file job_import_utils.cpp.
References _, JSON, NONE, output, REPORTER::Report(), RPT_SEVERITY_ERROR, and RPT_SEVERITY_INFO.
Referenced by EESCHEMA_JOBS_HANDLER::JobImport(), and PCBNEW_JOBS_HANDLER::JobImport().