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

An simple container class that lets us dispatch output jobs to kifaces. More...

#include <job.h>

Inheritance diagram for JOB:
JOB_EXPORT_PCB_3D JOB_EXPORT_PCB_DRILL JOB_EXPORT_PCB_GENCAD JOB_EXPORT_PCB_IPC2581 JOB_EXPORT_PCB_PLOT JOB_EXPORT_PCB_POS JOB_EXPORT_SCH_BOM JOB_EXPORT_SCH_NETLIST JOB_EXPORT_SCH_PLOT JOB_EXPORT_SCH_PYTHONBOM JOB_FP_EXPORT_SVG JOB_FP_UPGRADE JOB_PCB_DRC JOB_PCB_RENDER JOB_SCH_ERC JOB_SPECIAL_EXECUTE JOB_SYM_EXPORT_SVG JOB_SYM_UPGRADE

Public Member Functions

 JOB (const std::string &aType, bool aOutputIsDirectory)
 
virtual ~JOB ()
 
const std::string & GetType () const
 
const std::map< wxString, wxString > & GetVarOverrides () const
 
void SetVarOverrides (const std::map< wxString, wxString > &aVarOverrides)
 
virtual void FromJson (const nlohmann::json &j)
 
virtual void ToJson (nlohmann::json &j) const
 
virtual wxString GetDescription ()
 
const std::vector< JOB_PARAM_BASE * > & GetParams ()
 
void ClearExistingOutputs ()
 
const std::vector< JOB_OUTPUT > & GetOutputs ()
 
void AddOutput (wxString aOutputPath)
 
void SetTempOutputDirectory (const wxString &aBase)
 
void SetOutputPath (const wxString &aPath)
 
wxString GetOutputPath () const
 
wxString GetFullOutputPath () const
 
bool OutputPathFullSpecified () const
 

Protected Attributes

std::string m_type
 
std::map< wxString, wxString > m_varOverrides
 
wxString m_tempOutputDirectory
 
wxString m_outputPath
 
bool m_outputPathIsDirectory
 
std::vector< JOB_PARAM_BASE * > m_params
 
std::vector< JOB_OUTPUTm_outputs
 

Detailed Description

An simple container class that lets us dispatch output jobs to kifaces.

Definition at line 78 of file job.h.

Constructor & Destructor Documentation

◆ JOB()

JOB::JOB ( const std::string &  aType,
bool  aOutputIsDirectory 
)

Definition at line 24 of file job.cpp.

References m_outputPath, m_outputPathIsDirectory, and m_params.

◆ ~JOB()

JOB::~JOB ( )
virtual

Definition at line 44 of file job.cpp.

References m_params.

Member Function Documentation

◆ AddOutput()

void JOB::AddOutput ( wxString  aOutputPath)
inline

Definition at line 111 of file job.h.

Referenced by PCBNEW_JOBS_HANDLER::JobExportPos().

◆ ClearExistingOutputs()

void JOB::ClearExistingOutputs ( )
inline

Definition at line 103 of file job.h.

Referenced by JOB_DISPATCHER::RunJob().

◆ FromJson()

void JOB::FromJson ( const nlohmann::json &  j)
virtual

Definition at line 53 of file job.cpp.

References m_params.

Referenced by from_json().

◆ GetDescription()

◆ GetFullOutputPath()

◆ GetOutputPath()

◆ GetOutputs()

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

Definition at line 107 of file job.h.

◆ GetParams()

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

Definition at line 99 of file job.h.

◆ GetType()

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

Definition at line 85 of file job.h.

Referenced by JOB_DISPATCHER::HandleJobConfig(), and JOB_DISPATCHER::RunJob().

◆ GetVarOverrides()

◆ OutputPathFullSpecified()

bool JOB::OutputPathFullSpecified ( ) const

Definition at line 135 of file job.cpp.

References m_outputPath, and m_outputPathIsDirectory.

Referenced by PCBNEW_JOBS_HANDLER::JobExportIpc2581().

◆ SetOutputPath()

◆ SetTempOutputDirectory()

void JOB::SetTempOutputDirectory ( const wxString &  aBase)

Definition at line 73 of file job.cpp.

References m_tempOutputDirectory.

◆ SetVarOverrides()

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

Definition at line 89 of file job.h.

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

◆ ToJson()

void JOB::ToJson ( nlohmann::json &  j) const
virtual

Definition at line 60 of file job.cpp.

References m_params.

Referenced by to_json().

Member Data Documentation

◆ m_outputPath

wxString JOB::m_outputPath
protected

Definition at line 131 of file job.h.

Referenced by GetFullOutputPath(), JOB(), OutputPathFullSpecified(), and SetOutputPath().

◆ m_outputPathIsDirectory

bool JOB::m_outputPathIsDirectory
protected

Definition at line 132 of file job.h.

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

◆ m_outputs

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

Definition at line 136 of file job.h.

◆ m_params

◆ m_tempOutputDirectory

wxString JOB::m_tempOutputDirectory
protected

Definition at line 129 of file job.h.

Referenced by GetFullOutputPath(), and SetTempOutputDirectory().

◆ m_type

std::string JOB::m_type
protected

Definition at line 126 of file job.h.

◆ m_varOverrides

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

Definition at line 127 of file job.h.


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