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

#include <job_sch_downgrade.h>

Inheritance diagram for JOB_SCH_DOWNGRADE:
JOB

Public Member Functions

 JOB_SCH_DOWNGRADE ()
 
const std::string & GetType () const
 
const std::map< wxString, wxString > & GetVarOverrides () const
 
void SetVarOverrides (const std::map< wxString, wxString > &aVarOverrides)
 
void SetTitleBlock (const TITLE_BLOCK &aTitleBlock)
 
virtual void FromJson (const nlohmann::json &j)
 
virtual void ToJson (nlohmann::json &j) const
 
virtual wxString GetDefaultDescription () const
 
virtual wxString GetSettingsDialogTitle () const
 
const std::vector< JOB_PARAM_BASE * > & GetParams ()
 
void ClearExistingOutputs ()
 
const std::vector< JOB_OUTPUT > & GetOutputs ()
 
void AddOutput (wxString aOutputPath)
 
void SetTempOutputDirectory (const wxString &aBase)
 Sets the temporary output directory for the job, this is used to prefix with a given output path when GetFullOutputPath is called.
 
void SetConfiguredOutputPath (const wxString &aPath)
 Sets the configured output path for the job, this path is always saved to file.
 
wxString GetConfiguredOutputPath () const
 Returns the configured output path for the job.
 
void SetWorkingOutputPath (const wxString &aPath)
 Sets a transient output path for the job, it takes priority over the configured output path when GetFullOutputPath is called.
 
wxString GetWorkingOutputPath () const
 Returns the working output path for the job, if one has been set.
 
wxString GetFullOutputPath (PROJECT *aProject) const
 Returns the full output path for the job, taking into account the configured output path, any configured working path and the temporary output directory.
 
wxString ResolveOutputPath (const wxString &aPath, bool aPathIsDirectory, PROJECT *aProject) const
 
bool GetOutputPathIsDirectory () const
 

Public Attributes

wxString m_filename
 Root schematic file (may be empty to downgrade only libraries)
 
wxString m_outputDir
 Write downgraded sheets under this fresh folder.
 
wxString m_target
 Target release name or id, e.g. "KiCad 10.0" or "10.0". Empty means the newest.
 
wxString m_libraryDir
 If set, downgrade every .kicad_sym symbol library under this folder too.
 
wxString m_variant
 Flatten this variant into the export. Empty means the base design.
 
bool m_force
 Export even when features must be dropped or approximated.
 
bool m_dryRun
 Only classify and fill m_report, do not write anything.
 
bool m_dropInsteadOfApproximate
 Omit features that would otherwise be approximated.
 
bool m_inPlace
 Internal only: convert the coordinator's already-copied export files.
 
COMPATIBILITY_REPORT m_report
 Filled by the handler so the caller can show it.
 
std::vector< wxString > m_foundVariants
 Variant names found in the schematic when the target drops variants.
 

Protected Attributes

std::string m_type
 
std::map< wxString, wxString > m_varOverrides
 
TITLE_BLOCK m_titleBlock
 
wxString m_tempOutputDirectory
 
wxString m_outputPath
 
bool m_outputPathIsDirectory
 
wxString m_description
 
wxString m_workingOutputPath
 The working output path is a transient path that takes priority over the configured output path when determining where to write output files.
 
std::vector< JOB_PARAM_BASE * > m_params
 
std::vector< JOB_OUTPUT > m_outputs
 

Detailed Description

Definition at line 27 of file job_sch_downgrade.h.

Constructor & Destructor Documentation

◆ JOB_SCH_DOWNGRADE()

JOB_SCH_DOWNGRADE::JOB_SCH_DOWNGRADE ( )

Member Function Documentation

◆ AddOutput()

◆ ClearExistingOutputs()

void JOB::ClearExistingOutputs ( )
inlineinherited

Definition at line 214 of file job.h.

References m_outputs.

Referenced by JOB_DISPATCHER::RunJob().

◆ FromJson()

◆ GetConfiguredOutputPath()

◆ GetDefaultDescription()

◆ GetFullOutputPath()

◆ GetOutputPathIsDirectory()

bool JOB::GetOutputPathIsDirectory ( ) const
inlineinherited

Definition at line 258 of file job.h.

References m_outputPathIsDirectory.

Referenced by GenerateODBPPFiles(), and EESCHEMA_JOBS_HANDLER::JobExportPlot().

◆ GetOutputs()

const std::vector< JOB_OUTPUT > & JOB::GetOutputs ( )
inlineinherited

Definition at line 215 of file job.h.

References m_outputs.

Referenced by ExecuteBoardJob(), and ExecuteSchematicJob().

◆ GetParams()

const std::vector< JOB_PARAM_BASE * > & JOB::GetParams ( )
inlineinherited

Definition at line 212 of file job.h.

References m_params.

◆ GetSettingsDialogTitle()

◆ GetType()

const std::string & JOB::GetType ( ) const
inlineinherited

◆ GetVarOverrides()

◆ GetWorkingOutputPath()

wxString JOB::GetWorkingOutputPath ( ) const
inlineinherited

Returns the working output path for the job, if one has been set.

Definition at line 246 of file job.h.

References m_workingOutputPath.

Referenced by BOOST_AUTO_TEST_CASE(), GenerateODBPPFiles(), PCBNEW_JOBS_HANDLER::JobExportStackup(), and PCBNEW_JOBS_HANDLER::JobExportStats().

◆ ResolveOutputPath()

◆ SetConfiguredOutputPath()

void JOB::SetConfiguredOutputPath ( const wxString & aPath)
inherited

Sets the configured output path for the job, this path is always saved to file.

Any transient working output path is cleared so the new configured path takes precedence on the next call to GetFullOutputPath().

Definition at line 157 of file job.cpp.

References m_outputPath, and m_workingOutputPath.

Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), CLI::IMPORT_COMMAND::doPerform(), API_HANDLER_PCB::handleRunBoardJobExport3D(), API_HANDLER_PCB::handleRunBoardJobExportDrill(), API_HANDLER_PCB::handleRunBoardJobExportDxf(), API_HANDLER_PCB::handleRunBoardJobExportGencad(), API_HANDLER_PCB::handleRunBoardJobExportGerbers(), API_HANDLER_PCB::handleRunBoardJobExportIdf(), API_HANDLER_PCB::handleRunBoardJobExportIpc2581(), API_HANDLER_PCB::handleRunBoardJobExportIpcD356(), API_HANDLER_PCB::handleRunBoardJobExportODB(), API_HANDLER_PCB::handleRunBoardJobExportPdf(), API_HANDLER_PCB::handleRunBoardJobExportPng(), API_HANDLER_PCB::handleRunBoardJobExportPosition(), API_HANDLER_PCB::handleRunBoardJobExportPs(), API_HANDLER_PCB::handleRunBoardJobExportRender(), API_HANDLER_PCB::handleRunBoardJobExportStats(), API_HANDLER_PCB::handleRunBoardJobExportSvg(), API_HANDLER_SCH::handleRunSchematicJobExportBOM(), API_HANDLER_SCH::handleRunSchematicJobExportNetlist(), EESCHEMA_JOBS_HANDLER::JobExportBom(), PCBNEW_JOBS_HANDLER::JobExportBom(), EESCHEMA_JOBS_HANDLER::JobExportNetlist(), EESCHEMA_JOBS_HANDLER::JobExportPlot(), EESCHEMA_JOBS_HANDLER::JobExportPythonBom(), CLI::PCB_EXPORT_GERBER_COMMAND::populateJob(), DIALOG_EXPORT_ODBPP::populateJob(), JOBS_RUNNER::runSpecialArchive(), JOBS_RUNNER::runSpecialExecute(), DIALOG_FIELDS_TABLE::saveJobSettings(), JOB_EXPORT_PCB_IDF::SetDefaultOutputPath(), JOB_EXPORT_PCB_IPC2581::SetDefaultOutputPath(), JOB_EXPORT_PCB_IPCD356::SetDefaultOutputPath(), JOB_EXPORT_PCB_ODB::SetDefaultOutputPath(), and JOB_EXPORT_PCB_POS::SetDefaultOutputPath().

◆ SetTempOutputDirectory()

void JOB::SetTempOutputDirectory ( const wxString & aBase)
inherited

Sets the temporary output directory for the job, this is used to prefix with a given output path when GetFullOutputPath is called.

This is intended for use with running jobsets and otherwise has no impact on individual job runs outside jobsets.

Definition at line 86 of file job.cpp.

References m_tempOutputDirectory.

◆ SetTitleBlock()

◆ SetVarOverrides()

void JOB::SetVarOverrides ( const std::map< wxString, wxString > & aVarOverrides)
inlineinherited

Definition at line 199 of file job.h.

References m_varOverrides.

Referenced by CLI::PCB_EXPORT_GERBER_COMMAND::populateJob().

◆ SetWorkingOutputPath()

◆ ToJson()

Member Data Documentation

◆ m_description

wxString JOB::m_description
protectedinherited

Definition at line 269 of file job.h.

Referenced by JOB().

◆ m_dropInsteadOfApproximate

bool JOB_SCH_DOWNGRADE::m_dropInsteadOfApproximate

◆ m_dryRun

bool JOB_SCH_DOWNGRADE::m_dryRun

◆ m_filename

◆ m_force

◆ m_foundVariants

std::vector<wxString> JOB_SCH_DOWNGRADE::m_foundVariants

Variant names found in the schematic when the target drops variants.

Filled by a dry run, so a caller can offer a picker before the real export.

Definition at line 46 of file job_sch_downgrade.h.

Referenced by BOOST_FIXTURE_TEST_CASE(), ClassifyProjectForDowngrade(), and EESCHEMA_JOBS_HANDLER::JobDowngrade().

◆ m_inPlace

bool JOB_SCH_DOWNGRADE::m_inPlace

Internal only: convert the coordinator's already-copied export files.

Definition at line 40 of file job_sch_downgrade.h.

Referenced by BOOST_AUTO_TEST_CASE(), ExportProjectForDowngrade(), JOB_SCH_DOWNGRADE(), and EESCHEMA_JOBS_HANDLER::JobDowngrade().

◆ m_libraryDir

wxString JOB_SCH_DOWNGRADE::m_libraryDir

If set, downgrade every .kicad_sym symbol library under this folder too.

Definition at line 35 of file job_sch_downgrade.h.

Referenced by ClassifyProjectForDowngrade(), ExportProjectForDowngrade(), JOB_SCH_DOWNGRADE(), and EESCHEMA_JOBS_HANDLER::JobDowngrade().

◆ m_outputDir

◆ m_outputPath

wxString JOB::m_outputPath
protectedinherited

Definition at line 267 of file job.h.

Referenced by GetConfiguredOutputPath(), GetFullOutputPath(), JOB(), and SetConfiguredOutputPath().

◆ m_outputPathIsDirectory

bool JOB::m_outputPathIsDirectory
protectedinherited

Definition at line 268 of file job.h.

Referenced by GetFullOutputPath(), GetOutputPathIsDirectory(), and JOB().

◆ m_outputs

std::vector<JOB_OUTPUT> JOB::m_outputs
protectedinherited

Definition at line 279 of file job.h.

Referenced by AddOutput(), ClearExistingOutputs(), and GetOutputs().

◆ m_params

◆ m_report

◆ m_target

◆ m_tempOutputDirectory

wxString JOB::m_tempOutputDirectory
protectedinherited

Definition at line 265 of file job.h.

Referenced by JOB(), ResolveOutputPath(), and SetTempOutputDirectory().

◆ m_titleBlock

TITLE_BLOCK JOB::m_titleBlock
protectedinherited

Definition at line 263 of file job.h.

Referenced by ResolveOutputPath(), and SetTitleBlock().

◆ m_type

std::string JOB::m_type
protectedinherited

Definition at line 261 of file job.h.

Referenced by GetType(), and JOB().

◆ m_variant

wxString JOB_SCH_DOWNGRADE::m_variant

Flatten this variant into the export. Empty means the base design.

Definition at line 36 of file job_sch_downgrade.h.

Referenced by BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), ClassifyProjectForDowngrade(), ExportProjectForDowngrade(), JOB_SCH_DOWNGRADE(), and EESCHEMA_JOBS_HANDLER::JobDowngrade().

◆ m_varOverrides

std::map<wxString, wxString> JOB::m_varOverrides
protectedinherited

Definition at line 262 of file job.h.

Referenced by GetVarOverrides(), JOB(), and SetVarOverrides().

◆ m_workingOutputPath

wxString JOB::m_workingOutputPath
protectedinherited

The working output path is a transient path that takes priority over the configured output path when determining where to write output files.

Definition at line 275 of file job.h.

Referenced by GetFullOutputPath(), GetWorkingOutputPath(), JOB(), SetConfiguredOutputPath(), and SetWorkingOutputPath().


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