KiCad PCB EDA Suite
DANGLING_END_ITEM Class Reference

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 VECTOR2I &aPosition)
 
 DANGLING_END_ITEM (DANGLING_END_T aType, EDA_ITEM *aItem, const VECTOR2I &aPosition, const EDA_ITEM *aParent)
 
bool operator== (const DANGLING_END_ITEM &aB) const
 
bool operator!= (const DANGLING_END_ITEM &aB) const
 
bool operator< (const DANGLING_END_ITEM &rhs) const
 
VECTOR2I GetPosition () const
 
EDA_ITEMGetItem () const
 
const EDA_ITEMGetParent () const
 
DANGLING_END_T GetType () const
 

Private Attributes

EDA_ITEMm_item
 
VECTOR2I m_pos
 A pointer to the connectable object. More...
 
DANGLING_END_T m_type
 The position of the connection point. More...
 
const EDA_ITEMm_parent
 The type of connection of m_item. More...
 

Detailed Description

Helper class used to store the state of schematic items that can be connected to other schematic items.

Definition at line 81 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 VECTOR2I aPosition 
)
inline

Definition at line 84 of file sch_item.h.

85 {
86 m_item = aItem;
87 m_type = aType;
88 m_pos = aPosition;
89 m_parent = aItem;
90 }
const EDA_ITEM * m_parent
The type of connection of m_item.
Definition: sch_item.h:132
DANGLING_END_T m_type
The position of the connection point.
Definition: sch_item.h:131
VECTOR2I m_pos
A pointer to the connectable object.
Definition: sch_item.h:130
EDA_ITEM * m_item
Definition: sch_item.h:129

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 VECTOR2I aPosition,
const EDA_ITEM aParent 
)
inline

Definition at line 92 of file sch_item.h.

94 {
95 m_item = aItem;
96 m_type = aType;
97 m_pos = aPosition;
98 m_parent = aParent;
99 }

References m_item, m_parent, m_pos, and m_type.

Member Function Documentation

◆ GetItem()

EDA_ITEM * DANGLING_END_ITEM::GetItem ( ) const
inline

◆ GetParent()

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

Definition at line 125 of file sch_item.h.

125{ return m_parent; }

References m_parent.

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

◆ GetPosition()

VECTOR2I DANGLING_END_ITEM::GetPosition ( ) const
inline

◆ GetType()

DANGLING_END_T DANGLING_END_ITEM::GetType ( ) const
inline

◆ operator!=()

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

Definition at line 109 of file sch_item.h.

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

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

◆ operator<()

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

Definition at line 117 of file sch_item.h.

118 {
119 return( m_pos.x < rhs.m_pos.x || ( m_pos.x == rhs.m_pos.x && m_pos.y < rhs.m_pos.y )
120 || ( m_pos == rhs.m_pos && m_item < rhs.m_item ) );
121 }

References m_item, m_pos, VECTOR2< T >::x, and VECTOR2< T >::y.

◆ operator==()

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

Definition at line 101 of file sch_item.h.

102 {
103 return GetItem() == aB.GetItem()
104 && GetPosition() == aB.GetPosition()
105 && GetType() == aB.GetType()
106 && GetParent() == aB.GetParent();
107 }

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

Member Data Documentation

◆ m_item

EDA_ITEM* DANGLING_END_ITEM::m_item
private

Definition at line 129 of file sch_item.h.

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

◆ m_parent

const EDA_ITEM* DANGLING_END_ITEM::m_parent
private

The type of connection of m_item.

Definition at line 132 of file sch_item.h.

Referenced by DANGLING_END_ITEM(), and GetParent().

◆ m_pos

VECTOR2I DANGLING_END_ITEM::m_pos
private

A pointer to the connectable object.

Definition at line 130 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 position of the connection point.

Definition at line 131 of file sch_item.h.

Referenced by DANGLING_END_ITEM(), and GetType().


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