20#ifndef JOB_IMPORT_UTILS_H
21#define JOB_IMPORT_UTILS_H
57 wxString m_sourceFile;
58 wxString m_sourceFormat;
59 wxString m_outputFile;
63 std::vector<std::pair<wxString, size_t>> m_statistics;
67 nlohmann::json m_extraJson = nlohmann::json::object();
69 std::vector<wxString> m_warnings;
70 std::vector<wxString> m_errors;
87 const wxString& aKiCadExt );
107 const wxString& aReportFile,
const IMPORT_REPORT_DATA& aData );
A pure virtual class used to derive REPORTER objects from.
KICOMMON_API 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...
KICOMMON_API bool LoadLayerMapFile(const wxString &aFile, std::map< wxString, wxString > &aMap, wxString &aError)
Load an explicit layer-mapping file into aMap.
NLOHMANN_JSON_SERIALIZE_ENUM(IMPORT_REPORT_FORMAT, { { IMPORT_REPORT_FORMAT::NONE, "none" }, { IMPORT_REPORT_FORMAT::JSON, "json" }, { IMPORT_REPORT_FORMAT::TEXT, "text" } }) struct KICOMMON_API IMPORT_REPORT_DATA
Data describing a completed import, rendered uniformly by WriteImportReport for both the board and sc...
KICOMMON_API bool ParseImportReportFormat(const wxString &aText, IMPORT_REPORT_FORMAT &aFormat)
Parse the user-facing report format name ("none", "json" or "text") into its enum.
KICOMMON_API 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 KiCa...
IMPORT_REPORT_FORMAT
Output format for the report shared by the board and schematic import jobs.