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

#include <job_export_pcb_odb.h>

Inheritance diagram for JOB_EXPORT_PCB_ODB:
JOB_EXPORT_PCB_FAB JOB

Public Types

enum class  ODB_COMPRESSION { NONE , ZIP , TGZ }
 
enum class  VARIANT_PACKAGING { SEPARATE , COMBINED }
 
enum class  ORIGIN { ABSOLUTE_COORDS , AUX , GRID }
 
enum class  UNITS { MM , INCH }
 
enum class  DATA_SET {
  USERDEF , BOM , STACKUP , FABRICATION ,
  ASSEMBLY , TEST , STENCIL , DFX ,
  COUNT
}
 Columns of the IPC-2581C function mode table, Table 4 p 80. More...
 
enum class  NET_NAMES { INCLUDE , ANONYMIZE }
 An anonymous name keeps the connections. More...
 

Public Member Functions

 JOB_EXPORT_PCB_ODB ()
 
wxString GetDefaultDescription () const override
 
wxString GetSettingsDialogTitle () const override
 
void SetDefaultOutputPath (const wxString &aReferenceName)
 
bool SupportsDataSet (DATA_SET aDataSet) const override
 
void FromJson (const nlohmann::json &aJson) override
 
void ToJson (nlohmann::json &aJson) const override
 
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)
 
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 DATA_SET DataSetFromToken (const wxString &aToken)
 Read a data set token in upper case or in lower case An empty token is USERDEF.
 
static std::string DataSetToken (DATA_SET aDataSet)
 Lower case token that the job file and the CLI use for aDataSet Empty when it has none.
 

Public Attributes

ODB_COMPRESSION m_compressionMode
 
VARIANT_PACKAGING m_variantPackaging = VARIANT_PACKAGING::SEPARATE
 
ORIGIN m_origin = ORIGIN::ABSOLUTE_COORDS
 
wxString m_productName
 
bool m_boardMetadata = true
 
std::vector< ODB_LAYER_OVERRIDE > m_layerOverrides
 
wxString m_filename
 
wxString m_drawingSheet
 
std::vector< wxString > m_variantNames
 
UNITS m_units = UNITS::MM
 
int m_precision = 6
 
bool m_checkZonesBeforeExport = false
 
wxString m_colMfgPn
 
DATA_SET m_dataSet = DATA_SET::USERDEF
 
std::optional< wxString > m_sections
 Section key that replaces the optional sections of the data set Unset lets the data set select them and an empty key selects none.
 
NET_NAMES m_netNames = NET_NAMES::INCLUDE
 

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 45 of file job_export_pcb_odb.h.

Member Enumeration Documentation

◆ DATA_SET

enum class JOB_EXPORT_PCB_FAB::DATA_SET
stronginherited

Columns of the IPC-2581C function mode table, Table 4 p 80.

The order indexes that table. COUNT also marks a token that no data set matches

Enumerator
USERDEF 
BOM 
STACKUP 
FABRICATION 
ASSEMBLY 
TEST 
STENCIL 
DFX 
COUNT 

Definition at line 44 of file job_export_pcb_fab.h.

◆ NET_NAMES

enum class JOB_EXPORT_PCB_FAB::NET_NAMES
stronginherited

An anonymous name keeps the connections.

Enumerator
INCLUDE 
ANONYMIZE 

Definition at line 59 of file job_export_pcb_fab.h.

◆ ODB_COMPRESSION

Enumerator
NONE 
ZIP 
TGZ 

Definition at line 56 of file job_export_pcb_odb.h.

◆ ORIGIN

enum class JOB_EXPORT_PCB_ODB::ORIGIN
strong
Enumerator
ABSOLUTE_COORDS 
AUX 
GRID 

Definition at line 69 of file job_export_pcb_odb.h.

◆ UNITS

enum class JOB_EXPORT_PCB_FAB::UNITS
stronginherited
Enumerator
MM 
INCH 

Definition at line 33 of file job_export_pcb_fab.h.

◆ VARIANT_PACKAGING

Enumerator
SEPARATE 
COMBINED 

Definition at line 63 of file job_export_pcb_odb.h.

Constructor & Destructor Documentation

◆ JOB_EXPORT_PCB_ODB()

JOB_EXPORT_PCB_ODB::JOB_EXPORT_PCB_ODB ( )

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

◆ DataSetFromToken()

JOB_EXPORT_PCB_FAB::DATA_SET JOB_EXPORT_PCB_FAB::DataSetFromToken ( const wxString & aToken)
staticinherited

Read a data set token in upper case or in lower case An empty token is USERDEF.

Definition at line 68 of file job_export_pcb_fab.cpp.

References COUNT, and USERDEF.

Referenced by CLI::PCB_EXPORT_BASE_COMMAND::applyFabExportArgs(), JOB_EXPORT_PCB_IPC2581::FromJson(), and FAB::ModeFromToken().

◆ DataSetToken()

std::string JOB_EXPORT_PCB_FAB::DataSetToken ( DATA_SET aDataSet)
staticinherited

Lower case token that the job file and the CLI use for aDataSet Empty when it has none.

Definition at line 79 of file job_export_pcb_fab.cpp.

Referenced by CLI::PCB_EXPORT_BASE_COMMAND::addFabExportArgs(), and BOOST_AUTO_TEST_CASE().

◆ FromJson()

void JOB_EXPORT_PCB_FAB::FromJson ( const nlohmann::json & aJson)
overridevirtualinherited

◆ GetConfiguredOutputPath()

◆ GetDefaultDescription()

wxString JOB_EXPORT_PCB_ODB::GetDefaultDescription ( ) const
overridevirtual

Reimplemented from JOB.

Definition at line 121 of file job_export_pcb_odb.cpp.

References _.

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

wxString JOB_EXPORT_PCB_ODB::GetSettingsDialogTitle ( ) const
overridevirtual

Reimplemented from JOB.

Definition at line 127 of file job_export_pcb_odb.cpp.

References _.

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

◆ SetDefaultOutputPath()

void JOB_EXPORT_PCB_ODB::SetDefaultOutputPath ( const wxString & aReferenceName)

Definition at line 133 of file job_export_pcb_odb.cpp.

References JOB::SetConfiguredOutputPath().

Referenced by JOB_EXPORT_PCB_ODB().

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

◆ SupportsDataSet()

bool JOB_EXPORT_PCB_ODB::SupportsDataSet ( DATA_SET aDataSet) const
overridevirtual

◆ ToJson()

Member Data Documentation

◆ m_boardMetadata

bool JOB_EXPORT_PCB_ODB::m_boardMetadata = true

◆ m_checkZonesBeforeExport

◆ m_colMfgPn

◆ m_compressionMode

◆ m_dataSet

◆ m_description

wxString JOB::m_description
protectedinherited

Definition at line 269 of file job.h.

Referenced by JOB().

◆ m_drawingSheet

wxString JOB_EXPORT_PCB_FAB::m_drawingSheet
inherited

◆ m_filename

◆ m_layerOverrides

◆ m_netNames

◆ m_origin

◆ 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_precision

◆ m_productName

◆ m_sections

std::optional<wxString> JOB_EXPORT_PCB_FAB::m_sections
inherited

◆ 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_units

◆ m_variantNames

◆ m_variantPackaging

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