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

#include <job_fp_downgrade.h>

Inheritance diagram for JOB_FP_DOWNGRADE:
JOB

Public Member Functions

 JOB_FP_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
 

Static Public Member Functions

static wxString AppendDefaultFileName (const wxString &aPath, const wxString &aDefaultName)
 Complete a resolved file output path that names a folder, either by a trailing separator or by being an existing directory, with a default file name.
 

Public Attributes

wxString m_libraryPath
 The .pretty footprint library to convert.
 
wxString m_outputLibraryPath
 Where to write the converted copy.
 
wxString m_target
 Target release name or id, e.g. "KiCad 9.0". Empty means the newest.
 
bool m_force
 Convert 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.
 
COMPATIBILITY_REPORT m_report
 Filled by the handler so the caller can show it.
 

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_fp_downgrade.h.

Constructor & Destructor Documentation

◆ JOB_FP_DOWNGRADE()

JOB_FP_DOWNGRADE::JOB_FP_DOWNGRADE ( )

Member Function Documentation

◆ AddOutput()

◆ AppendDefaultFileName()

wxString JOB::AppendDefaultFileName ( const wxString & aPath,
const wxString & aDefaultName )
staticinherited

Complete a resolved file output path that names a folder, either by a trailing separator or by being an existing directory, with a default file name.

Returns
aPath unchanged when it already names a file.

Definition at line 152 of file job.cpp.

Referenced by EESCHEMA_JOBS_HANDLER::JobExportBom(), EESCHEMA_JOBS_HANDLER::JobExportNetlist(), EESCHEMA_JOBS_HANDLER::JobExportPlot(), EESCHEMA_JOBS_HANDLER::JobExportPythonBom(), EESCHEMA_JOBS_HANDLER::JobSchErc(), and JOBS_RUNNER::runSpecialExecute().

◆ 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

◆ 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()

wxString JOB::ResolveOutputPath ( const wxString & aPath,
bool aPathIsDirectory,
PROJECT * aProject ) const
inherited

◆ 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 181 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(), 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::handleRunBoardJobExportSpecctraDsn(), 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(), 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.

Referenced by BOOST_AUTO_TEST_CASE().

◆ 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 277 of file job.h.

Referenced by JOB().

◆ m_dropInsteadOfApproximate

bool JOB_FP_DOWNGRADE::m_dropInsteadOfApproximate

Omit features that would otherwise be approximated.

Definition at line 37 of file job_fp_downgrade.h.

Referenced by JOB_FP_DOWNGRADE(), and PCBNEW_JOBS_HANDLER::JobFpDowngrade().

◆ m_dryRun

bool JOB_FP_DOWNGRADE::m_dryRun

Only classify and fill m_report, do not write anything.

Definition at line 36 of file job_fp_downgrade.h.

Referenced by JOB_FP_DOWNGRADE(), and PCBNEW_JOBS_HANDLER::JobFpDowngrade().

◆ m_force

bool JOB_FP_DOWNGRADE::m_force

Convert even when features must be dropped or approximated.

Definition at line 35 of file job_fp_downgrade.h.

Referenced by JOB_FP_DOWNGRADE(), and PCBNEW_JOBS_HANDLER::JobFpDowngrade().

◆ m_libraryPath

wxString JOB_FP_DOWNGRADE::m_libraryPath

The .pretty footprint library to convert.

Definition at line 32 of file job_fp_downgrade.h.

Referenced by FOOTPRINT_EDITOR_CONTROL::ExportForOlderVersion(), JOB_FP_DOWNGRADE(), and PCBNEW_JOBS_HANDLER::JobFpDowngrade().

◆ m_outputLibraryPath

wxString JOB_FP_DOWNGRADE::m_outputLibraryPath

Where to write the converted copy.

Definition at line 33 of file job_fp_downgrade.h.

Referenced by FOOTPRINT_EDITOR_CONTROL::ExportForOlderVersion(), JOB_FP_DOWNGRADE(), and PCBNEW_JOBS_HANDLER::JobFpDowngrade().

◆ m_outputPath

wxString JOB::m_outputPath
protectedinherited

Definition at line 275 of file job.h.

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

◆ m_outputPathIsDirectory

bool JOB::m_outputPathIsDirectory
protectedinherited

Definition at line 276 of file job.h.

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

◆ m_outputs

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

Definition at line 287 of file job.h.

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

◆ m_params

◆ m_report

COMPATIBILITY_REPORT JOB_FP_DOWNGRADE::m_report

Filled by the handler so the caller can show it.

Definition at line 39 of file job_fp_downgrade.h.

Referenced by PCBNEW_JOBS_HANDLER::JobFpDowngrade().

◆ m_target

wxString JOB_FP_DOWNGRADE::m_target

Target release name or id, e.g. "KiCad 9.0". Empty means the newest.

Definition at line 34 of file job_fp_downgrade.h.

Referenced by JOB_FP_DOWNGRADE(), and PCBNEW_JOBS_HANDLER::JobFpDowngrade().

◆ m_tempOutputDirectory

wxString JOB::m_tempOutputDirectory
protectedinherited

Definition at line 273 of file job.h.

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

◆ m_titleBlock

TITLE_BLOCK JOB::m_titleBlock
protectedinherited

Definition at line 271 of file job.h.

Referenced by ResolveOutputPath(), and SetTitleBlock().

◆ m_type

std::string JOB::m_type
protectedinherited

Definition at line 269 of file job.h.

Referenced by GetType(), and JOB().

◆ m_varOverrides

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

Definition at line 270 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 283 of file job.h.

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


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