KiCad PCB EDA Suite
Loading...
Searching...
No Matches
drc_chain_topology.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 PCBNEW_DRC_CHAIN_TOPOLOGY_H
21#define PCBNEW_DRC_CHAIN_TOPOLOGY_H
22
23#include <set>
24#include <vector>
25
26#include <wx/string.h>
27
28#include <layer_ids.h>
29#include <math/vector2d.h>
30
31class BOARD;
33
34
56{
57public:
58 struct STUB
59 {
62 std::vector<BOARD_CONNECTED_ITEM*> items;
63 double length;
64 double delay;
65 };
66
75
76 CHAIN_TOPOLOGY( BOARD* aBoard, const wxString& aChainName,
77 const std::set<BOARD_CONNECTED_ITEM*>& aChainItems );
78
79 STATUS GetStatus() const { return m_status; }
80 bool IsValid() const { return m_status == STATUS::OK; }
81
82 double TrunkLength() const { return m_trunkLength; }
83 double TrunkDelay() const { return m_trunkDelay; }
84
85 const std::vector<STUB>& Stubs() const { return m_stubs; }
86
87 const wxString& GetChainName() const { return m_chainName; }
88
89private:
90 wxString m_chainName;
92 double m_trunkLength = 0.0;
93 double m_trunkDelay = 0.0;
94 std::vector<STUB> m_stubs;
95};
96
97#endif // PCBNEW_DRC_CHAIN_TOPOLOGY_H
A base class derived from BOARD_ITEM for items that can be connected and have a net,...
Information pertinent to a Pcbnew printed circuit board.
Definition board.h:372
const std::vector< STUB > & Stubs() const
STATUS GetStatus() const
const wxString & GetChainName() const
CHAIN_TOPOLOGY(BOARD *aBoard, const wxString &aChainName, const std::set< BOARD_CONNECTED_ITEM * > &aChainItems)
double TrunkLength() const
bool IsValid() const
double TrunkDelay() const
std::vector< STUB > m_stubs
PCB_LAYER_ID
A quick note on layer IDs:
Definition layer_ids.h:56
std::vector< BOARD_CONNECTED_ITEM * > items
VECTOR2< int32_t > VECTOR2I
Definition vector2d.h:683