KiCad PCB EDA Suite
|
CN_ITEM represents a BOARD_CONNETED_ITEM in the connectivity system (ie: a pad, track/arc/via, or zone). More...
#include <connectivity_items.h>
Public Member Functions | |
void | Dump () |
CN_ITEM (BOARD_CONNECTED_ITEM *aParent, bool aCanChangeNet, int aAnchorCount=2) | |
virtual | ~CN_ITEM () |
std::shared_ptr< CN_ANCHOR > | AddAnchor (const VECTOR2I &aPos) |
std::vector< std::shared_ptr< CN_ANCHOR > > & | Anchors () |
void | SetValid (bool aValid) |
bool | Valid () const |
void | SetDirty (bool aDirty) |
bool | Dirty () const |
void | SetLayers (int aStartLayer, int aEndLayer) |
Set the layers spanned by the item to aStartLayer and aEndLayer. | |
void | SetLayer (int aLayer) |
Set the layers spanned by the item to a single layer aLayer. | |
int | StartLayer () const |
Return the contiguous set of layers spanned by the item. | |
int | EndLayer () const |
virtual int | Layer () const |
Return the item's layer, for single-layered items only. | |
PCB_LAYER_ID | GetBoardLayer () const |
When using CN_ITEM layers to compare against board items, use this function which correctly remaps the B_Cu layer. | |
const BOX2I & | BBox () |
BOARD_CONNECTED_ITEM * | Parent () const |
const std::vector< CN_ITEM * > & | ConnectedItems () const |
void | ClearConnections () |
void | SetVisited (bool aVisited) |
bool | Visited () const |
bool | CanChangeNet () const |
void | Connect (CN_ITEM *b) |
void | RemoveInvalidRefs () |
virtual int | AnchorCount () const |
virtual const VECTOR2I | GetAnchor (int n) const |
int | Net () const |
Protected Attributes | |
bool | m_dirty |
used to identify recently added item not yet scanned into the connectivity search | |
int | m_start_layer |
start layer of the item N.B. B_Cu is set to INT_MAX | |
int | m_end_layer |
end layer of the item N.B. B_Cu is set to INT_MAX | |
BOX2I | m_bbox |
bounding box for the item | |
Private Attributes | |
BOARD_CONNECTED_ITEM * | m_parent |
std::vector< CN_ITEM * > | m_connected |
list of physically touching items | |
std::vector< std::shared_ptr< CN_ANCHOR > > | m_anchors |
bool | m_canChangeNet |
can the net propagator modify the netcode? | |
bool | m_visited |
visited flag for the BFS scan | |
bool | m_valid |
used to identify garbage items (we use lazy removal) | |
std::mutex | m_listLock |
mutex protecting this item's connected_items set to | |
CN_ITEM represents a BOARD_CONNETED_ITEM in the connectivity system (ie: a pad, track/arc/via, or zone).
Definition at line 132 of file connectivity_items.h.
|
inline |
Definition at line 137 of file connectivity_items.h.
References m_anchors, m_canChangeNet, m_connected, m_dirty, m_end_layer, m_parent, m_start_layer, m_valid, and m_visited.
|
inlinevirtual |
Definition at line 150 of file connectivity_items.h.
Definition at line 156 of file connectivity_items.h.
References m_anchors.
Referenced by CN_LIST::Add().
|
virtual |
Reimplemented in CN_ZONE_LAYER.
Definition at line 35 of file connectivity_items.cpp.
References m_anchors, m_parent, m_valid, PCB_ARC_T, PCB_SHAPE_T, PCB_TRACE_T, and EDA_ITEM::Type().
Referenced by CN_VISITOR::checkZoneItemConnection(), and CN_ANCHOR::IsDangling().
|
inline |
Definition at line 162 of file connectivity_items.h.
References m_anchors.
Referenced by TRACKS_CLEANER::testTrackEndpointIsNode().
|
inline |
Definition at line 222 of file connectivity_items.h.
References EDA_ITEM::GetBoundingBox(), m_bbox, m_dirty, m_parent, and m_valid.
Referenced by CN_VISITOR::checkZoneZoneConnection(), and CN_LIST::FindNearby().
|
inline |
Definition at line 238 of file connectivity_items.h.
References m_canChangeNet.
Referenced by CN_VISITOR::operator()().
|
inline |
Definition at line 233 of file connectivity_items.h.
References m_connected.
|
inline |
Definition at line 240 of file connectivity_items.h.
References m_connected, and m_listLock.
Referenced by CN_VISITOR::checkZoneItemConnection(), CN_VISITOR::checkZoneZoneConnection(), and CN_VISITOR::operator()().
|
inline |
Definition at line 232 of file connectivity_items.h.
References m_connected.
Referenced by CN_ANCHOR::ConnectedItemsCount(), CONNECTIVITY_DATA::GetConnectedItemsAtAnchor(), CONNECTIVITY_DATA::GetConnectedPads(), CONNECTIVITY_DATA::GetConnectedPadsAndVias(), CONNECTIVITY_DATA::GetConnectedTracks(), CN_ZONE_LAYER::HasSingleConnection(), CONNECTIVITY_DATA::IsConnectedOnLayer(), CN_ANCHOR::IsDangling(), RN_NET::OptimizeRNEdges(), CN_CONNECTIVITY_ALGO::SearchClusters(), CONNECTIVITY_DATA::TestTrackEndpointDangling(), and uniquePathBetweenNodes().
|
inline |
Definition at line 168 of file connectivity_items.h.
References m_dirty.
Referenced by CN_ANCHOR::Dirty(), and CN_VISITOR::operator()().
void CN_ITEM::Dump | ( | ) |
Definition at line 85 of file connectivity_items.cpp.
References m_connected, EDA_ITEM::Type(), and Valid().
|
inline |
Definition at line 196 of file connectivity_items.h.
References m_end_layer.
Referenced by CN_LIST::FindNearby().
|
virtual |
Reimplemented in CN_ZONE_LAYER.
Definition at line 55 of file connectivity_items.cpp.
References EDA_ITEM::GetClass(), m_anchors, m_parent, m_valid, PCB_ARC_T, PCB_PAD_T, PCB_SHAPE_T, PCB_TRACE_T, PCB_VIA_T, EDA_ITEM::Type(), and UNIMPLEMENTED_FOR.
Referenced by CN_VISITOR::checkZoneItemConnection().
|
inline |
When using CN_ITEM layers to compare against board items, use this function which correctly remaps the B_Cu layer.
Definition at line 212 of file connectivity_items.h.
References B_Cu, Layer(), and ToLAYER_ID().
Referenced by RN_NET::OptimizeRNEdges().
|
inlinevirtual |
Return the item's layer, for single-layered items only.
N.B. This should only be used inside connectivity as B_Cu is mapped to a large int
Definition at line 203 of file connectivity_items.h.
References StartLayer().
Referenced by GetBoardLayer().
|
inline |
Definition at line 257 of file connectivity_items.h.
References BOARD_CONNECTED_ITEM::GetNetCode(), m_parent, and m_valid.
Referenced by CN_CLUSTER::Add(), CONNECTIVITY_DATA::GetNetItems(), CN_VISITOR::operator()(), NETCODE_CMP_LESS::operator()(), and CN_CONNECTIVITY_ALGO::SearchClusters().
|
inline |
Definition at line 230 of file connectivity_items.h.
References m_parent.
Referenced by CN_CLUSTER::Add(), CN_ZONE_LAYER::AnchorCount(), CN_VISITOR::checkZoneItemConnection(), CN_VISITOR::checkZoneZoneConnection(), CN_ZONE_LAYER::GetAnchor(), CONNECTIVITY_DATA::GetNetItems(), CONNECTIVITY_DATA::IsConnectedOnLayer(), CN_VISITOR::operator()(), CN_CLUSTER::OriginNetName(), and CN_ANCHOR::Parent().
void CN_ITEM::RemoveInvalidRefs | ( | ) |
Definition at line 136 of file connectivity_items.cpp.
References m_connected.
|
inline |
Definition at line 167 of file connectivity_items.h.
References m_dirty.
|
inline |
Set the layers spanned by the item to a single layer aLayer.
Definition at line 190 of file connectivity_items.h.
References SetLayers().
Referenced by CN_LIST::Add().
|
inline |
Set the layers spanned by the item to aStartLayer and aEndLayer.
Definition at line 173 of file connectivity_items.h.
References B_Cu, m_end_layer, and m_start_layer.
Referenced by CN_LIST::Add(), CN_ZONE_LAYER::CN_ZONE_LAYER(), and SetLayer().
|
inline |
Definition at line 164 of file connectivity_items.h.
References m_valid.
|
inline |
Definition at line 235 of file connectivity_items.h.
References m_visited.
Referenced by CN_CONNECTIVITY_ALGO::SearchClusters().
|
inline |
Return the contiguous set of layers spanned by the item.
Definition at line 195 of file connectivity_items.h.
References m_start_layer.
Referenced by CN_LIST::FindNearby(), and Layer().
|
inline |
Definition at line 165 of file connectivity_items.h.
References m_valid.
Referenced by CN_ZONE_LAYER::AnchorCount(), Dump(), CN_ZONE_LAYER::GetAnchor(), CONNECTIVITY_DATA::GetNetItems(), CN_VISITOR::operator()(), CN_CLUSTER::OriginNetName(), CN_ANCHOR::Parent(), CONNECTIVITY_DATA::TestTrackEndpointDangling(), TRACKS_CLEANER::testTrackEndpointIsNode(), and CN_ANCHOR::Valid().
|
inline |
Definition at line 236 of file connectivity_items.h.
References m_visited.
|
private |
Definition at line 273 of file connectivity_items.h.
Referenced by AddAnchor(), AnchorCount(), Anchors(), CN_ITEM(), GetAnchor(), and ~CN_ITEM().
|
protected |
bounding box for the item
Definition at line 267 of file connectivity_items.h.
Referenced by BBox().
|
private |
can the net propagator modify the netcode?
Definition at line 275 of file connectivity_items.h.
Referenced by CanChangeNet(), and CN_ITEM().
|
private |
list of physically touching items
Definition at line 272 of file connectivity_items.h.
Referenced by ClearConnections(), CN_ITEM(), Connect(), ConnectedItems(), Dump(), and RemoveInvalidRefs().
|
protected |
used to identify recently added item not yet scanned into the connectivity search
Definition at line 263 of file connectivity_items.h.
Referenced by BBox(), CN_ITEM(), Dirty(), and SetDirty().
|
protected |
end layer of the item N.B. B_Cu is set to INT_MAX
Definition at line 266 of file connectivity_items.h.
Referenced by CN_ITEM(), EndLayer(), and SetLayers().
|
private |
mutex protecting this item's connected_items set to
Definition at line 280 of file connectivity_items.h.
Referenced by Connect().
|
private |
Definition at line 270 of file connectivity_items.h.
Referenced by AnchorCount(), BBox(), CN_ITEM(), GetAnchor(), Net(), and Parent().
|
protected |
start layer of the item N.B. B_Cu is set to INT_MAX
Definition at line 265 of file connectivity_items.h.
Referenced by CN_ITEM(), SetLayers(), and StartLayer().
|
private |
used to identify garbage items (we use lazy removal)
Definition at line 278 of file connectivity_items.h.
Referenced by AnchorCount(), BBox(), CN_ITEM(), GetAnchor(), Net(), SetValid(), and Valid().
|
private |
visited flag for the BFS scan
Definition at line 277 of file connectivity_items.h.
Referenced by CN_ITEM(), SetVisited(), and Visited().