KiCad PCB EDA Suite
Loading...
Searching...
No Matches
altium_project_variants.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
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU 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#ifndef ALTIUM_PROJECT_VARIANTS_H
21#define ALTIUM_PROJECT_VARIANTS_H
22
23#include <map>
24#include <vector>
25#include <wx/string.h>
26
27#include <kiid.h>
28
29class PROJECT;
30
39{
40 wxString designator;
41
42 // Component's own unique id (final segment of the Altium path); the value used for matching.
43 wxString uniqueId;
44
45 int kind = 0;
46 std::map<wxString, wxString> alternateFields;
47};
48
49
56{
57 wxString name;
58 wxString description;
59 std::vector<ALTIUM_VARIANT_ENTRY> variations;
60};
61
62
68ALTIUM_VARIANT_ENTRY ParseVariationString( const wxString& aValue );
69
70
77std::vector<ALTIUM_PROJECT_VARIANT> ParseAltiumProjectVariants( const wxString& aPrjPcbPath );
78
79
91std::map<wxString, wxString> ParseAltiumProjectParameters( const wxString& aPrjPcbPath );
92
93
101bool AltiumPowerPortNamesTakePriority( const wxString& aPrjPcbPath );
102
103
112 const std::map<wxString, wxString>& aParameters );
113
114
124KIID AltiumUniqueIdToKiid( const wxString& aUniqueId );
125
126#endif // ALTIUM_PROJECT_VARIANTS_H
std::vector< ALTIUM_PROJECT_VARIANT > ParseAltiumProjectVariants(const wxString &aPrjPcbPath)
Parse all [ProjectVariantN] sections from an Altium .PrjPcb project file.
std::map< wxString, wxString > ParseAltiumProjectParameters(const wxString &aPrjPcbPath)
Parse all [ParameterN] sections from an Altium .PrjPcb project file.
ALTIUM_VARIANT_ENTRY ParseVariationString(const wxString &aValue)
Parse a single pipe-delimited Altium "Variation" string into its component entry.
bool AltiumPowerPortNamesTakePriority(const wxString &aPrjPcbPath)
Read the project's Power Port Names Take Priority netlist option.
KIID AltiumUniqueIdToKiid(const wxString &aUniqueId)
Derive a stable KIID from an Altium component unique id.
void ApplyAltiumProjectParametersToProject(PROJECT *aProject, const std::map< wxString, wxString > &aParameters)
Register Altium project parameters as KiCad project text variables so that imported board text refere...
Definition kiid.h:46
Container for project specific data.
Definition project.h:63
A project-level assembly variant parsed from an Altium .PrjPcb file.
std::vector< ALTIUM_VARIANT_ENTRY > variations
A single component variation within an Altium project variant.
int kind
wxString uniqueId
wxString designator
std::map< wxString, wxString > alternateFields