KiCad PCB EDA Suite
Loading...
Searching...
No Matches
import_net_map.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#ifndef IMPORT_NET_MAP_H
21#define IMPORT_NET_MAP_H
22
23#include <kiid.h>
24#include <wx/string.h>
25#include <cstdint>
26#include <iosfwd>
27#include <map>
28#include <vector>
29
30class REPORTER;
31
41
43std::ostream& operator<<( std::ostream& aStream, IMPORT_NET_STATUS aStatus );
44
46{
48 int unit = 0;
49 uint32_t sourcePinId = 0;
50 wxString pinNumber;
51 unsigned duplicateIndex = 0;
52};
53
55{
56 wxString view;
57 std::vector<wxString> occurrence;
58 uint32_t sourceNetId = 0;
59 wxString originalName;
60 wxString generatedName;
61 wxString nameAtImport;
63 std::vector<IMPORT_NET_TERMINAL> terminals;
64 std::vector<KIID> itemUuids;
65};
66
75{
76 std::vector<IMPORT_NET_MAP_ENTRY> entries;
77};
78
86std::map<wxString, wxString> GetBoardNetNameMap( const IMPORT_NET_MAP& aMap, REPORTER& aReporter );
87
88#endif
Definition kiid.h:46
A pure virtual class used to derive REPORTER objects from.
Definition reporter.h:73
@ RESOLVED
Definition common.h:93
std::ostream & operator<<(std::ostream &aStream, IMPORT_NET_STATUS aStatus)
Name the status, so test diagnostics read as a status rather than an ordinal.
IMPORT_NET_STATUS
How completely a source net survived conversion.
@ BUS
the source net is carried by a bus
@ NO_CONNECT
the source marks the net as deliberately unconnected
@ SPLIT
the source net reaches more than one physical net
@ UNCONNECTED
the source net reaches no physical net
std::map< wxString, wxString > GetBoardNetNameMap(const IMPORT_NET_MAP &aMap, REPORTER &aReporter)
Reduce the map to the board net renames it justifies.
wxString generatedName
wxString originalName
std::vector< wxString > occurrence
wxString nameAtImport
std::vector< KIID > itemUuids
std::vector< IMPORT_NET_TERMINAL > terminals
wxString view
uint32_t sourceNetId
IMPORT_NET_STATUS status
Import provenance, held only for the lifetime of the importing SCHEMATIC.
std::vector< IMPORT_NET_MAP_ENTRY > entries