KiCad PCB EDA Suite
DANGLING_END_ITEM Class Reference

DANGLING_END_ITEM is a helper class used to store the state of schematic items that can be connected to other schematic items. More...

#include <sch_item.h>

Public Member Functions

 DANGLING_END_ITEM (DANGLING_END_T aType, EDA_ITEM *aItem, const wxPoint &aPosition)
 
 DANGLING_END_ITEM (DANGLING_END_T aType, EDA_ITEM *aItem, const wxPoint &aPosition, const EDA_ITEM *aParent)
 
bool operator== (const DANGLING_END_ITEM &aB)
 
bool operator!= (const DANGLING_END_ITEM &aB)
 
bool operator< (const DANGLING_END_ITEM &rhs) const
 
wxPoint GetPosition () const
 
EDA_ITEMGetItem () const
 
const EDA_ITEMGetParent () const
 
DANGLING_END_T GetType () const
 

Private Attributes

EDA_ITEMm_item
 A pointer to the connectable object. More...
 
wxPoint m_pos
 The position of the connection point. More...
 
DANGLING_END_T m_type
 The type of connection of m_item. More...
 
const EDA_ITEMm_parent
 A pointer to the parent object (in the case of pins) More...
 

Detailed Description

DANGLING_END_ITEM is a helper class used to store the state of schematic items that can be connected to other schematic items.

Definition at line 67 of file sch_item.h.

Constructor & Destructor Documentation

◆ DANGLING_END_ITEM() [1/2]

DANGLING_END_ITEM::DANGLING_END_ITEM ( DANGLING_END_T  aType,
EDA_ITEM aItem,
const wxPoint aPosition 
)
inline

Definition at line 83 of file sch_item.h.

84  {
85  m_item = aItem;
86  m_type = aType;
87  m_pos = aPosition;
88  m_parent = aItem;
89  }
DANGLING_END_T m_type
The type of connection of m_item.
Definition: sch_item.h:77
EDA_ITEM * m_item
A pointer to the connectable object.
Definition: sch_item.h:71
wxPoint m_pos
The position of the connection point.
Definition: sch_item.h:74
const EDA_ITEM * m_parent
A pointer to the parent object (in the case of pins)
Definition: sch_item.h:80

References m_item, m_parent, m_pos, and m_type.

◆ DANGLING_END_ITEM() [2/2]

DANGLING_END_ITEM::DANGLING_END_ITEM ( DANGLING_END_T  aType,
EDA_ITEM aItem,
const wxPoint aPosition,
const EDA_ITEM aParent 
)
inline

Definition at line 91 of file sch_item.h.

93  {
94  m_item = aItem;
95  m_type = aType;
96  m_pos = aPosition;
97  m_parent = aParent;
98  }
DANGLING_END_T m_type
The type of connection of m_item.
Definition: sch_item.h:77
EDA_ITEM * m_item
A pointer to the connectable object.
Definition: sch_item.h:71
wxPoint m_pos
The position of the connection point.
Definition: sch_item.h:74
const EDA_ITEM * m_parent
A pointer to the parent object (in the case of pins)
Definition: sch_item.h:80

References m_item, m_parent, m_pos, and m_type.

Member Function Documentation

◆ GetItem()

EDA_ITEM* DANGLING_END_ITEM::GetItem ( ) const
inline

Definition at line 123 of file sch_item.h.

123 { return m_item; }
EDA_ITEM * m_item
A pointer to the connectable object.
Definition: sch_item.h:71

References m_item.

Referenced by operator!=(), operator<<(), operator==(), and SCH_TEXT::UpdateDanglingState().

◆ GetParent()

const EDA_ITEM* DANGLING_END_ITEM::GetParent ( void  ) const
inline

Definition at line 124 of file sch_item.h.

124 { return m_parent; }
const EDA_ITEM * m_parent
A pointer to the parent object (in the case of pins)
Definition: sch_item.h:80

References m_parent.

Referenced by operator!=(), operator<<(), and operator==().

◆ GetPosition()

wxPoint DANGLING_END_ITEM::GetPosition ( ) const
inline

Definition at line 122 of file sch_item.h.

122 { return m_pos; }
wxPoint m_pos
The position of the connection point.
Definition: sch_item.h:74

References m_pos.

Referenced by operator!=(), operator<<(), operator==(), and SCH_TEXT::UpdateDanglingState().

◆ GetType()

DANGLING_END_T DANGLING_END_ITEM::GetType ( ) const
inline

Definition at line 125 of file sch_item.h.

125 { return m_type; }
DANGLING_END_T m_type
The type of connection of m_item.
Definition: sch_item.h:77

References m_type.

Referenced by operator!=(), operator<<(), operator==(), and SCH_TEXT::UpdateDanglingState().

◆ operator!=()

bool DANGLING_END_ITEM::operator!= ( const DANGLING_END_ITEM aB)
inline

Definition at line 108 of file sch_item.h.

109  {
110  return GetItem() != aB.GetItem()
111  || GetPosition() != aB.GetPosition()
112  || GetType() != aB.GetType()
113  || GetParent() != aB.GetParent();;
114  }
wxPoint GetPosition() const
Definition: sch_item.h:122
const EDA_ITEM * GetParent() const
Definition: sch_item.h:124
EDA_ITEM * GetItem() const
Definition: sch_item.h:123
DANGLING_END_T GetType() const
Definition: sch_item.h:125

References GetItem(), GetParent(), GetPosition(), and GetType().

◆ operator<()

bool DANGLING_END_ITEM::operator< ( const DANGLING_END_ITEM rhs) const
inline

Definition at line 116 of file sch_item.h.

117  {
118  return( m_pos.x < rhs.m_pos.x || ( m_pos.x == rhs.m_pos.x && m_pos.y < rhs.m_pos.y )
119  || ( m_pos == rhs.m_pos && m_item < rhs.m_item ) );
120  }
EDA_ITEM * m_item
A pointer to the connectable object.
Definition: sch_item.h:71
wxPoint m_pos
The position of the connection point.
Definition: sch_item.h:74

References m_item, m_pos, wxPoint::x, and wxPoint::y.

◆ operator==()

bool DANGLING_END_ITEM::operator== ( const DANGLING_END_ITEM aB)
inline

Definition at line 100 of file sch_item.h.

101  {
102  return GetItem() == aB.GetItem()
103  && GetPosition() == aB.GetPosition()
104  && GetType() == aB.GetType()
105  && GetParent() == aB.GetParent();
106  }
wxPoint GetPosition() const
Definition: sch_item.h:122
const EDA_ITEM * GetParent() const
Definition: sch_item.h:124
EDA_ITEM * GetItem() const
Definition: sch_item.h:123
DANGLING_END_T GetType() const
Definition: sch_item.h:125

References GetItem(), GetParent(), GetPosition(), and GetType().

Member Data Documentation

◆ m_item

EDA_ITEM* DANGLING_END_ITEM::m_item
private

A pointer to the connectable object.

Definition at line 71 of file sch_item.h.

Referenced by DANGLING_END_ITEM(), GetItem(), and operator<().

◆ m_parent

const EDA_ITEM* DANGLING_END_ITEM::m_parent
private

A pointer to the parent object (in the case of pins)

Definition at line 80 of file sch_item.h.

Referenced by DANGLING_END_ITEM(), and GetParent().

◆ m_pos

wxPoint DANGLING_END_ITEM::m_pos
private

The position of the connection point.

Definition at line 74 of file sch_item.h.

Referenced by DANGLING_END_ITEM(), GetPosition(), and operator<().

◆ m_type

DANGLING_END_T DANGLING_END_ITEM::m_type
private

The type of connection of m_item.

Definition at line 77 of file sch_item.h.

Referenced by DANGLING_END_ITEM(), and GetType().


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