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

#include <job_fp_diff.h>

Inheritance diagram for JOB_FP_DIFF:
JOB_DIFF_BASE JOB

Public Types

enum class  OUTPUT_FORMAT { JSON , TEXT , PNG , SVG }
 

Public Member Functions

 JOB_FP_DIFF ()
 
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_inputA
 Reference document (file or directory)
 
wxString m_inputB
 Comparison document (file or directory)
 
OUTPUT_FORMAT m_format = OUTPUT_FORMAT::JSON
 
bool m_exitCodeOnly = false
 

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 31 of file job_fp_diff.h.

Member Enumeration Documentation

◆ OUTPUT_FORMAT

enum class JOB_DIFF_BASE::OUTPUT_FORMAT
stronginherited
Enumerator
JSON 
TEXT 
PNG 
SVG 

Definition at line 42 of file job_diff_base.h.

Constructor & Destructor Documentation

◆ JOB_FP_DIFF()

JOB_FP_DIFF::JOB_FP_DIFF ( )

Definition at line 27 of file job_fp_diff.cpp.

References JOB_DIFF_BASE::JOB_DIFF_BASE().

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_exitCodeOnly

bool JOB_DIFF_BASE::m_exitCodeOnly = false
inherited

◆ m_format

OUTPUT_FORMAT JOB_DIFF_BASE::m_format = OUTPUT_FORMAT::JSON
inherited

Definition at line 52 of file job_diff_base.h.

Referenced by KICAD_DIFF::MakeEmitOptions().

◆ m_inputA

wxString JOB_DIFF_BASE::m_inputA
inherited

◆ m_inputB

wxString JOB_DIFF_BASE::m_inputB
inherited

◆ 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_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: