KiCad PCB EDA Suite
Loading...
Searching...
No Matches
odb_export_job.cpp File Reference
#include "odb_export_job.h"
#include "odb_entity.h"
#include "odb_util.h"
#include "pcb_io_odbpp.h"
#include <thread_pool.h>
#include <gestfich.h>
#include <algorithm>
#include <array>
#include <filesystem>
#include <set>
#include <wx/dir.h>
#include <board.h>
#include <reporter.h>
#include <confirm.h>
#include <kidialog.h>
#include <paths.h>
#include <pcb_edit_frame.h>
#include <progress_reporter.h>
#include <project.h>
#include <jobs/job_export_pcb_odb.h>
#include <locale_io.h>
#include <string_utils.h>

Go to the source code of this file.

Functions

bool OdbVariantFileTokensCollide (const std::vector< wxString > &aTokens, const std::function< wxString(const wxString &)> &aLocaleFold)
 Check whether variant output tokens could name the same file.
 
static ODB_EXPORT_RESULT generateOneODBPackage (const JOB_EXPORT_PCB_ODB &aJob, BOARD *aBoard, PCB_EDIT_FRAME *aParentFrame, PROGRESS_REPORTER *aProgressReporter, REPORTER *aReporter, wxString outputPath, const wxString &aVariant, const wxString &aProductName)
 
ODB_EXPORT_RESULT GenerateODBPPFiles (const JOB_EXPORT_PCB_ODB &aJob, BOARD *aBoard, PCB_EDIT_FRAME *aParentFrame, PROGRESS_REPORTER *aProgressReporter, REPORTER *aReporter)
 Generate the ODB++ tree or archive and return the write status and the paths written.
 
wxString UpdateOdbVariantOutputPath (const wxString &aPath, bool aDirectory, bool aSeparate, bool aRemoveAutomaticSuffix)
 Add or remove the automatic variant suffix on the file stem or final directory.
 
FAB::SECTION_SET OdbDefaultSections (FAB::MODE aMode)
 Sections a data set exports when no section key is given.
 
wxString OdbSectionKeyForSelection (FAB::MODE aMode, const FAB::SECTION_SET &aSelection)
 Use an empty section key when Customize matches the data set default.
 
wxString OdbPreviewReferenceName (const wxString &aReference, const std::vector< ODB_MATRIX_PREVIEW_ROW > &aRows)
 Matrix name of the row whose ID is aReference.
 
std::vector< ODB_MATRIX_PREVIEW_ROW > PreviewOdbMatrix (BOARD *aBoard, const JOB_EXPORT_PCB_ODB &aJob)
 Build export matrix rows without layer overrides or writing files.
 

Function Documentation

◆ GenerateODBPPFiles()

◆ generateOneODBPackage()

◆ OdbDefaultSections()

FAB::SECTION_SET OdbDefaultSections ( FAB::MODE aMode)

Sections a data set exports when no section key is given.

Definition at line 784 of file odb_export_job.cpp.

References FAB::DFX, FAB::RecommendedOptionalSections(), FAB::RequiredSections(), and FAB::SECTION_SET::Set().

Referenced by OdbSectionKeyForSelection(), and PANEL_FAB_EXPORT_CONTENT::ResolvedSections().

◆ OdbPreviewReferenceName()

wxString OdbPreviewReferenceName ( const wxString & aReference,
const std::vector< ODB_MATRIX_PREVIEW_ROW > & aRows )

Matrix name of the row whose ID is aReference.

Definition at line 811 of file odb_export_job.cpp.

Referenced by DIALOG_EXPORT_ODBPP::refreshLayerRows().

◆ OdbSectionKeyForSelection()

wxString OdbSectionKeyForSelection ( FAB::MODE aMode,
const FAB::SECTION_SET & aSelection )

Use an empty section key when Customize matches the data set default.

Definition at line 802 of file odb_export_job.cpp.

References OdbDefaultSections(), and FAB::SectionKeyString().

Referenced by PANEL_FAB_EXPORT_CONTENT::onCustomizeClick().

◆ OdbVariantFileTokensCollide()

bool OdbVariantFileTokensCollide ( const std::vector< wxString > & aTokens,
const std::function< wxString(const wxString &)> & aLocaleFold )

Check whether variant output tokens could name the same file.

Definition at line 316 of file odb_export_job.cpp.

Referenced by GenerateODBPPFiles().

◆ PreviewOdbMatrix()

◆ UpdateOdbVariantOutputPath()

wxString UpdateOdbVariantOutputPath ( const wxString & aPath,
bool aDirectory,
bool aSeparate,
bool aRemoveAutomaticSuffix )

Add or remove the automatic variant suffix on the file stem or final directory.

Definition at line 743 of file odb_export_job.cpp.

Referenced by DIALOG_EXPORT_ODBPP::updateVariantFilename().