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, you may find one here:
18 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
19 */
20
21#ifndef PCBNEW_DRC_CHAIN_TOPOLOGY_H
22#define PCBNEW_DRC_CHAIN_TOPOLOGY_H
23
24#include <set>
25#include <vector>
26
27#include <wx/string.h>
28
29#include <layer_ids.h>
30#include <math/vector2d.h>
31
32class BOARD;
34
35
57{
58public:
59 struct STUB
60 {
63 std::vector<BOARD_CONNECTED_ITEM*> items;
64 double length;
65 double delay;
66 };
67
76
77 CHAIN_TOPOLOGY( BOARD* aBoard, const wxString& aChainName,
78 const std::set<BOARD_CONNECTED_ITEM*>& aChainItems );
79
80 STATUS GetStatus() const { return m_status; }
81 bool IsValid() const { return m_status == STATUS::OK; }
82
83 double TrunkLength() const { return m_trunkLength; }
84 double TrunkDelay() const { return m_trunkDelay; }
85
86 const std::vector<STUB>& Stubs() const { return m_stubs; }
87
88 const wxString& GetChainName() const { return m_chainName; }
89
90private:
91 wxString m_chainName;
93 double m_trunkLength = 0.0;
94 double m_trunkDelay = 0.0;
95 std::vector<STUB> m_stubs;
96};
97
98#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:323
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:60
std::vector< BOARD_CONNECTED_ITEM * > items
VECTOR2< int32_t > VECTOR2I
Definition vector2d.h:687