KiCad PCB EDA Suite
CONNECTED_POINT Class Reference

#include <connect.h>

Public Member Functions

 CONNECTED_POINT (TRACK *aTrack, const wxPoint &aPoint)
 
 CONNECTED_POINT (D_PAD *aPad, const wxPoint &aPoint)
 
TRACKGetTrack () const
 Function GetTrack. More...
 
D_PADGetPad () const
 Function GetPad. More...
 
const wxPointGetPoint () const
 

Private Attributes

BOARD_CONNECTED_ITEMm_item
 
wxPoint m_point
 

Detailed Description

Definition at line 46 of file connect.h.

Constructor & Destructor Documentation

CONNECTED_POINT::CONNECTED_POINT ( TRACK aTrack,
const wxPoint aPoint 
)
inline

Definition at line 54 of file connect.h.

55  {
56  m_item = aTrack;
57  m_point = aPoint;
58  }
wxPoint m_point
Definition: connect.h:50
BOARD_CONNECTED_ITEM * m_item
Definition: connect.h:49
CONNECTED_POINT::CONNECTED_POINT ( D_PAD aPad,
const wxPoint aPoint 
)
inline

Definition at line 61 of file connect.h.

62  {
63  m_item = aPad;
64  m_point = aPoint;
65  }
wxPoint m_point
Definition: connect.h:50
BOARD_CONNECTED_ITEM * m_item
Definition: connect.h:49

Member Function Documentation

D_PAD* CONNECTED_POINT::GetPad ( ) const
inline

Function GetPad.

Returns
the parent pad of this connected point, or null if the parent is a track or via

Definition at line 82 of file connect.h.

References PCB_PAD_T, and EDA_ITEM::Type().

Referenced by CONNECTIONS::SearchConnectionsPadsToIntersectingPads().

83  {
84  return m_item->Type() == PCB_PAD_T ? (D_PAD*) m_item : NULL;
85  }
KICAD_T Type() const
Function Type()
Definition: base_struct.h:198
class D_PAD, a pad in a footprint
Definition: typeinfo.h:102
BOARD_CONNECTED_ITEM * m_item
Definition: connect.h:49
TRACK* CONNECTED_POINT::GetTrack ( ) const
inline

Function GetTrack.

Returns
the parent track or via of this connected point, or null if the parent is a pad

Definition at line 72 of file connect.h.

References PCB_PAD_T, and EDA_ITEM::Type().

Referenced by CONNECTIONS::SearchTracksConnectedToPads().

73  {
74  return m_item->Type() != PCB_PAD_T ? (TRACK*) m_item : NULL ;
75  }
KICAD_T Type() const
Function Type()
Definition: base_struct.h:198
class D_PAD, a pad in a footprint
Definition: typeinfo.h:102
BOARD_CONNECTED_ITEM * m_item
Definition: connect.h:49

Member Data Documentation

BOARD_CONNECTED_ITEM* CONNECTED_POINT::m_item
private

Definition at line 49 of file connect.h.

wxPoint CONNECTED_POINT::m_point
private

Definition at line 50 of file connect.h.

Referenced by GetPoint().


The documentation for this class was generated from the following file: