KiCad PCB EDA Suite
Loading...
Searching...
No Matches
odb_export_job.h
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
5 *
6 * This program is free software: you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation, either version 3 of the License, or (at your
9 * option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <https://www.gnu.org/licenses/>.
18 */
19
20#pragma once
21
22#include <functional>
23#include <vector>
24
25#include <wx/string.h>
26#include <layer_ids.h>
28
29class BOARD;
31class PCB_EDIT_FRAME;
33class REPORTER;
34
35
37{
38 bool m_ok = false;
39 std::vector<wxString> m_outputs;
40};
41
44{
45 int m_row = 0;
46 wxString m_context;
47 wxString m_type;
48 wxString m_name;
49 wxString m_polarity;
50 wxString m_startName;
51 wxString m_endName;
52 wxString m_addType;
53 wxString m_id;
54 wxString m_ref;
55 wxString m_cuTop;
56 wxString m_cuBottom;
58};
59
68
69
72 PCB_EDIT_FRAME* aParentFrame = nullptr,
73 PROGRESS_REPORTER* aProgressReporter = nullptr, REPORTER* aReporter = nullptr );
74
76std::vector<ODB_MATRIX_PREVIEW_ROW> PreviewOdbMatrix( BOARD* aBoard, const JOB_EXPORT_PCB_ODB& aJob );
77
79wxString UpdateOdbVariantOutputPath( const wxString& aPath, bool aDirectory, bool aSeparate,
80 bool aRemoveAutomaticSuffix );
81
83wxString OdbSectionKeyForSelection( FAB::MODE aMode, const FAB::SECTION_SET& aSelection );
84
87
89wxString OdbPreviewReferenceName( const wxString& aReference, const std::vector<ODB_MATRIX_PREVIEW_ROW>& aRows );
90
92bool OdbVariantFileTokensCollide( const std::vector<wxString>& aTokens,
93 const std::function<wxString( const wxString& )>& aLocaleFold );
Information pertinent to a Pcbnew printed circuit board.
Definition board.h:410
Set of schema sections.
The main frame for Pcbnew.
A progress reporter interface for use in multi-threaded environments.
A pure virtual class used to derive REPORTER objects from.
Definition reporter.h:73
PCB_LAYER_ID
A quick note on layer IDs:
Definition layer_ids.h:56
@ UNDEFINED_LAYER
Definition layer_ids.h:57
JOB_EXPORT_PCB_FAB::DATA_SET MODE
Columns of Table 4 The job owns the enum so that every layer shares one type.
wxString OdbPreviewReferenceName(const wxString &aReference, const std::vector< ODB_MATRIX_PREVIEW_ROW > &aRows)
Matrix name of the row whose ID is aReference.
wxString OdbSectionKeyForSelection(FAB::MODE aMode, const FAB::SECTION_SET &aSelection)
Use an empty section key when Customize matches the data set default.
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.
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.
ODB_EXPORT_RESULT GenerateODBPPFiles(const JOB_EXPORT_PCB_ODB &aJob, BOARD *aBoard, PCB_EDIT_FRAME *aParentFrame=nullptr, PROGRESS_REPORTER *aProgressReporter=nullptr, REPORTER *aReporter=nullptr)
Generate the ODB++ tree or archive and return the write status and the paths written.
bool OdbVariantFileTokensCollide(const std::vector< wxString > &aTokens, const std::function< wxString(const wxString &)> &aLocaleFold)
Check whether variant output tokens could name the same file.
FAB::SECTION_SET OdbDefaultSections(FAB::MODE aMode)
Sections a data set exports when no section key is given.
std::vector< wxString > m_outputs
One matrix row with its KiCad layer for the dialog's layer grid.
ODB_MATRIX_ROW m_matrix
One LAYER block of matrix/matrix.
wxString m_startName
wxString m_cuBottom
wxString m_dielectricType
wxString m_polarity