![]() |
KiCad PCB EDA Suite
|
#include <connectivity_items.h>
Public Types | |
using | CONNECTED_ITEMS = std::vector< CN_ITEM * > |
Public Member Functions | |
void | Dump () |
CN_ITEM (BOARD_CONNECTED_ITEM *aParent, bool aCanChangeNet, int aAnchorCount=2) | |
virtual | ~CN_ITEM () |
void | AddAnchor (const VECTOR2I &aPos) |
CN_ANCHORS & | Anchors () |
void | SetValid (bool aValid) |
bool | Valid () const |
void | SetDirty (bool aDirty) |
bool | Dirty () const |
void | SetLayers (const LAYER_RANGE &aLayers) |
Set the layers spanned by the item to aLayers. More... | |
void | SetLayer (int aLayer) |
Set the layers spanned by the item to a single layer aLayer. More... | |
const LAYER_RANGE & | Layers () const |
Return the contiguous set of layers spanned by the item. More... | |
virtual int | Layer () const |
Return the item's layer, for single-layered items only. More... | |
const BOX2I & | BBox () |
BOARD_CONNECTED_ITEM * | Parent () const |
const CONNECTED_ITEMS & | 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 |
allow parallel connection threads More... | |
Protected Attributes | |
bool | m_dirty |
used to identify recently added item not yet scanned into the connectivity search More... | |
LAYER_RANGE | m_layers |
layer range over which the item exists More... | |
BOX2I | m_bbox |
bounding box for the item More... | |
Private Attributes | |
BOARD_CONNECTED_ITEM * | m_parent |
CONNECTED_ITEMS | m_connected |
list of items physically connected (touching) More... | |
CN_ANCHORS | m_anchors |
bool | m_canChangeNet |
can the net propagator modify the netcode? More... | |
bool | m_visited |
visited flag for the BFS scan More... | |
bool | m_valid |
used to identify garbage items (we use lazy removal) More... | |
std::mutex | m_listLock |
mutex protecting this item's connected_items set to More... | |
Definition at line 168 of file connectivity_items.h.
using CN_ITEM::CONNECTED_ITEMS = std::vector<CN_ITEM*> |
Definition at line 171 of file connectivity_items.h.
|
inline |
Definition at line 175 of file connectivity_items.h.
References m_anchors, m_canChangeNet, m_connected, m_dirty, m_layers, m_parent, m_valid, m_visited, and PCB_LAYER_ID_COUNT.
|
inlinevirtual |
Definition at line 187 of file connectivity_items.h.
|
inline |
Definition at line 189 of file connectivity_items.h.
References m_anchors.
Referenced by CN_LIST::Add().
|
virtual |
Reimplemented in CN_ZONE_LAYER.
Definition at line 31 of file connectivity_items.cpp.
References m_parent, m_valid, PCB_ARC_T, PCB_PAD_T, PCB_TRACE_T, and EDA_ITEM::Type().
Referenced by CN_VISITOR::checkZoneItemConnection(), CN_ANCHOR::IsDangling(), and CN_VISITOR::operator()().
|
inline |
Definition at line 194 of file connectivity_items.h.
References m_anchors.
Referenced by CONNECTIVITY_DATA::TestTrackEndpointDangling().
|
inline |
Definition at line 234 of file connectivity_items.h.
References EDA_ITEM::GetBoundingBox(), EDA_RECT::GetPosition(), EDA_RECT::GetSize(), m_bbox, m_dirty, m_parent, and m_valid.
Referenced by CN_VISITOR::checkZoneItemConnection(), and CN_LIST::FindNearby().
|
inline |
Definition at line 255 of file connectivity_items.h.
References m_canChangeNet.
Referenced by CN_VISITOR::checkZoneItemConnection().
|
inline |
Definition at line 250 of file connectivity_items.h.
References m_connected.
|
inline |
Definition at line 257 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 249 of file connectivity_items.h.
References m_connected.
Referenced by TRACKS_CLEANER::cleanup(), CN_ANCHOR::ConnectedItemsCount(), CONNECTIVITY_DATA::GetConnectedPads(), CONNECTIVITY_DATA::IsConnectedOnLayer(), CN_ANCHOR::IsDangling(), CN_CONNECTIVITY_ALGO::SearchClusters(), CONNECTIVITY_DATA::TestTrackEndpointDangling(), and uniquePathBetweenNodes().
|
inline |
Definition at line 200 of file connectivity_items.h.
References m_dirty.
Referenced by CN_VISITOR::operator()().
void CN_ITEM::Dump | ( | ) |
Definition at line 153 of file connectivity_items.cpp.
References m_connected, EDA_ITEM::Type(), and Valid().
|
virtual |
Reimplemented in CN_ZONE_LAYER.
Definition at line 49 of file connectivity_items.cpp.
References PAD::GetEffectivePolygon(), PAD::GetOrientation(), PAD::GetPosition(), PAD::GetShape(), PAD::GetSize(), SHAPE_LINE_CHAIN::Intersect(), KI_FALLTHROUGH, m_parent, m_valid, PAD_SHAPE_CHAMFERED_RECT, PAD_SHAPE_CIRCLE, PAD_SHAPE_CUSTOM, PAD_SHAPE_OVAL, PAD_SHAPE_RECT, PAD_SHAPE_ROUNDRECT, PAD_SHAPE_TRAPEZOID, PCB_ARC_T, PCB_PAD_T, PCB_TRACE_T, PCB_VIA_T, RotatePoint(), PAD::ShapePos(), EDA_ITEM::Type(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by CN_VISITOR::checkZoneItemConnection(), and CN_VISITOR::operator()().
|
inlinevirtual |
Return the item's layer, for single-layered items only.
Definition at line 229 of file connectivity_items.h.
References Layers(), and LAYER_RANGE::Start().
Referenced by CN_VISITOR::checkZoneZoneConnection().
|
inline |
Return the contiguous set of layers spanned by the item.
Definition at line 221 of file connectivity_items.h.
References m_layers.
Referenced by CN_LIST::FindNearby(), and Layer().
|
inline |
allow parallel connection threads
Definition at line 274 of file connectivity_items.h.
References BOARD_CONNECTED_ITEM::GetNetCode(), m_parent, and m_valid.
Referenced by CN_CLUSTER::Add(), CN_VISITOR::checkZoneItemConnection(), CN_VISITOR::checkZoneZoneConnection(), CONNECTIVITY_DATA::GetNetItems(), NETCODE_CMP_LESS::operator()(), and CN_CONNECTIVITY_ALGO::SearchClusters().
|
inline |
Definition at line 244 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::ContainsPoint(), CN_ZONE_LAYER::GetAnchor(), CONNECTIVITY_DATA::GetNetItems(), CN_VISITOR::operator()(), CN_CLUSTER::OriginNetName(), and CN_ANCHOR::Parent().
void CN_ITEM::RemoveInvalidRefs | ( | ) |
Definition at line 189 of file connectivity_items.cpp.
References m_connected.
|
inline |
Definition at line 199 of file connectivity_items.h.
References m_dirty.
|
inline |
Set the layers spanned by the item to a single layer aLayer.
Definition at line 213 of file connectivity_items.h.
References m_layers.
Referenced by CN_LIST::Add().
|
inline |
Set the layers spanned by the item to aLayers.
Definition at line 205 of file connectivity_items.h.
References m_layers.
|
inline |
Definition at line 196 of file connectivity_items.h.
References m_valid.
|
inline |
Definition at line 252 of file connectivity_items.h.
References m_visited.
Referenced by CN_CONNECTIVITY_ALGO::SearchClusters().
|
inline |
Definition at line 197 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(), and CN_ANCHOR::Valid().
|
inline |
|
private |
Definition at line 289 of file connectivity_items.h.
Referenced by AddAnchor(), Anchors(), and CN_ITEM().
|
protected |
bounding box for the item
Definition at line 283 of file connectivity_items.h.
Referenced by BBox(), and CN_ZONE_LAYER::BBox().
|
private |
can the net propagator modify the netcode?
Definition at line 291 of file connectivity_items.h.
Referenced by CanChangeNet(), and CN_ITEM().
|
private |
list of items physically connected (touching)
Definition at line 288 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 280 of file connectivity_items.h.
Referenced by BBox(), CN_ZONE_LAYER::BBox(), CN_ITEM(), Dirty(), and SetDirty().
|
protected |
layer range over which the item exists
Definition at line 282 of file connectivity_items.h.
Referenced by CN_ITEM(), Layers(), SetLayer(), and SetLayers().
|
private |
mutex protecting this item's connected_items set to
Definition at line 296 of file connectivity_items.h.
Referenced by Connect().
|
private |
Definition at line 286 of file connectivity_items.h.
Referenced by AnchorCount(), BBox(), CN_ITEM(), GetAnchor(), Net(), and Parent().
|
private |
used to identify garbage items (we use lazy removal)
Definition at line 294 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 293 of file connectivity_items.h.
Referenced by CN_ITEM(), SetVisited(), and Visited().