KiCad PCB EDA Suite
Loading...
Searching...
No Matches
JOBS_OUTPUT_HANDLER Class Referenceabstract

#include <jobs_output.h>

Inheritance diagram for JOBS_OUTPUT_HANDLER:
JOBS_OUTPUT_ARCHIVE JOBS_OUTPUT_FOLDER

Public Member Functions

 JOBS_OUTPUT_HANDLER ()
 
virtual ~JOBS_OUTPUT_HANDLER ()
 
virtual bool OutputPrecheck ()
 Checks if the output process can proceed before doing anything else This can include user prompts.
 
virtual bool HandleOutputs (const wxString &aBaseTempPath, PROJECT *aProject, const std::vector< wxString > &aPathsWithOverwriteDisallowed, const std::vector< JOB_OUTPUT > &aOutputsToHandle, std::optional< wxString > &aResolvedOutputPath)=0
 
virtual void FromJson (const nlohmann::json &j)=0
 
virtual void ToJson (nlohmann::json &j) const =0
 
void SetOutputPath (const wxString &aPath)
 
wxString GetOutputPath () const
 
virtual wxString GetDefaultDescription () const
 

Static Public Member Functions

static wxString ResolveOutputPath (const wxString &aPath, const PROJECT *aProject)
 Expand variables and a leading '~' in a destination path, then anchor a relative result at the project directory so the output lands in the same place whatever the working directory.
 

Protected Attributes

wxString m_outputPath
 

Detailed Description

Definition at line 30 of file jobs_output.h.

Constructor & Destructor Documentation

◆ JOBS_OUTPUT_HANDLER()

JOBS_OUTPUT_HANDLER::JOBS_OUTPUT_HANDLER ( )
inline

◆ ~JOBS_OUTPUT_HANDLER()

virtual JOBS_OUTPUT_HANDLER::~JOBS_OUTPUT_HANDLER ( )
inlinevirtual

Definition at line 37 of file jobs_output.h.

Member Function Documentation

◆ FromJson()

virtual void JOBS_OUTPUT_HANDLER::FromJson ( const nlohmann::json & j)
pure virtual

Implemented in JOBS_OUTPUT_ARCHIVE, and JOBS_OUTPUT_FOLDER.

Referenced by from_json().

◆ GetDefaultDescription()

virtual wxString JOBS_OUTPUT_HANDLER::GetDefaultDescription ( ) const
inlinevirtual

Reimplemented in JOBS_OUTPUT_ARCHIVE, and JOBS_OUTPUT_FOLDER.

Definition at line 69 of file jobs_output.h.

◆ GetOutputPath()

wxString JOBS_OUTPUT_HANDLER::GetOutputPath ( ) const
inline

Definition at line 57 of file jobs_output.h.

References m_outputPath.

◆ HandleOutputs()

virtual bool JOBS_OUTPUT_HANDLER::HandleOutputs ( const wxString & aBaseTempPath,
PROJECT * aProject,
const std::vector< wxString > & aPathsWithOverwriteDisallowed,
const std::vector< JOB_OUTPUT > & aOutputsToHandle,
std::optional< wxString > & aResolvedOutputPath )
pure virtual

◆ OutputPrecheck()

virtual bool JOBS_OUTPUT_HANDLER::OutputPrecheck ( )
inlinevirtual

Checks if the output process can proceed before doing anything else This can include user prompts.

Returns
true if the output process can proceed

Reimplemented in JOBS_OUTPUT_ARCHIVE, and JOBS_OUTPUT_FOLDER.

Definition at line 45 of file jobs_output.h.

Referenced by JOBS_RUNNER::RunJobsForDestination().

◆ ResolveOutputPath()

wxString JOBS_OUTPUT_HANDLER::ResolveOutputPath ( const wxString & aPath,
const PROJECT * aProject )
static

Expand variables and a leading '~' in a destination path, then anchor a relative result at the project directory so the output lands in the same place whatever the working directory.

Parameters
aPathis the destination path as stored in the jobset.
aProjectis the project used for variable expansion and as the base for relative paths. May be null, in which case a relative path is left relative.

Definition at line 24 of file jobs_output.cpp.

References path, and ResolveProjectPath().

Referenced by BOOST_AUTO_TEST_CASE(), JOBS_OUTPUT_ARCHIVE::HandleOutputs(), JOBS_OUTPUT_FOLDER::HandleOutputs(), and PANEL_DESTINATION::OnOpenOutput().

◆ SetOutputPath()

void JOBS_OUTPUT_HANDLER::SetOutputPath ( const wxString & aPath)
inline

◆ ToJson()

virtual void JOBS_OUTPUT_HANDLER::ToJson ( nlohmann::json & j) const
pure virtual

Implemented in JOBS_OUTPUT_ARCHIVE, and JOBS_OUTPUT_FOLDER.

Referenced by to_json().

Member Data Documentation

◆ m_outputPath


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