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

#include <jobs_output_archive.h>

Inheritance diagram for JOBS_OUTPUT_ARCHIVE:
JOBS_OUTPUT_HANDLER

Public Types

enum class  FORMAT { ZIP }
 

Public Member Functions

 JOBS_OUTPUT_ARCHIVE ()
 
bool HandleOutputs (const wxString &aBaseTempPath, PROJECT *aProject, const std::vector< wxString > &aPathsWithOverwriteDisallowed, const std::vector< JOB_OUTPUT > &aOutputsToHandle, std::optional< wxString > &aResolvedOutputPath) override
 
bool OutputPrecheck () override
 Checks if the output process can proceed before doing anything else This can include user prompts.
 
void FromJson (const nlohmann::json &j) override
 
void ToJson (nlohmann::json &j) const override
 
FORMAT GetFormat () const
 
void SetFormat (FORMAT format)
 
wxString GetDefaultDescription () const override
 
void SetOutputPath (const wxString &aPath)
 
wxString GetOutputPath () 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
 

Private Attributes

FORMAT m_format
 

Detailed Description

Definition at line 25 of file jobs_output_archive.h.

Member Enumeration Documentation

◆ FORMAT

enum class JOBS_OUTPUT_ARCHIVE::FORMAT
strong
Enumerator
ZIP 

Definition at line 30 of file jobs_output_archive.h.

Constructor & Destructor Documentation

◆ JOBS_OUTPUT_ARCHIVE()

JOBS_OUTPUT_ARCHIVE::JOBS_OUTPUT_ARCHIVE ( )

Definition at line 31 of file jobs_output_archive.cpp.

References JOBS_OUTPUT_HANDLER::JOBS_OUTPUT_HANDLER(), m_format, and ZIP.

Member Function Documentation

◆ FromJson()

void JOBS_OUTPUT_ARCHIVE::FromJson ( const nlohmann::json & j)
overridevirtual

Implements JOBS_OUTPUT_HANDLER.

Definition at line 105 of file jobs_output_archive.cpp.

References m_format, JOBS_OUTPUT_HANDLER::m_outputPath, and ZIP.

◆ GetDefaultDescription()

wxString JOBS_OUTPUT_ARCHIVE::GetDefaultDescription ( ) const
overridevirtual

Reimplemented from JOBS_OUTPUT_HANDLER.

Definition at line 119 of file jobs_output_archive.cpp.

References _.

◆ GetFormat()

FORMAT JOBS_OUTPUT_ARCHIVE::GetFormat ( ) const
inline

Definition at line 45 of file jobs_output_archive.h.

References m_format.

◆ GetOutputPath()

wxString JOBS_OUTPUT_HANDLER::GetOutputPath ( ) const
inlineinherited

Definition at line 57 of file jobs_output.h.

References m_outputPath.

◆ HandleOutputs()

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

◆ OutputPrecheck()

bool JOBS_OUTPUT_ARCHIVE::OutputPrecheck ( )
overridevirtual

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 from JOBS_OUTPUT_HANDLER.

Definition at line 38 of file jobs_output_archive.cpp.

References JOBS_OUTPUT_HANDLER::m_outputPath.

◆ ResolveOutputPath()

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

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

◆ SetFormat()

void JOBS_OUTPUT_ARCHIVE::SetFormat ( FORMAT format)
inline

Definition at line 46 of file jobs_output_archive.h.

References m_format.

Referenced by DIALOG_DESTINATION::TransferDataFromWindow().

◆ SetOutputPath()

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

◆ ToJson()

void JOBS_OUTPUT_ARCHIVE::ToJson ( nlohmann::json & j) const
overridevirtual

Implements JOBS_OUTPUT_HANDLER.

Definition at line 112 of file jobs_output_archive.cpp.

References JOBS_OUTPUT_HANDLER::m_outputPath.

Member Data Documentation

◆ m_format

FORMAT JOBS_OUTPUT_ARCHIVE::m_format
private

Definition at line 51 of file jobs_output_archive.h.

Referenced by FromJson(), GetFormat(), JOBS_OUTPUT_ARCHIVE(), and SetFormat().

◆ m_outputPath


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