KiCad PCB EDA Suite
DIALOG_NET_INSPECTOR::LIST_ITEM Class Reference

Public Member Functions

 LIST_ITEM (unsigned int aGroupNumber, const wxString &aGroupName)
 
 LIST_ITEM (NETINFO_ITEM *aNet)
 
LIST_ITEMoperator= (const LIST_ITEM &)=delete
 
bool GetIsGroup () const
 
auto ChildrenBegin () const
 
auto ChildrenEnd () const
 
unsigned int ChildrenCount () const
 
NETINFO_ITEMGetNet () const
 
int GetNetCode () const
 
const wxString & GetNetName () const
 
const wxString & GetGroupName () const
 
void ResetColumnChangedBits ()
 
 gen (m_pad_count, 0, GetPadCount, SetPadCount, AddPadCount, SubPadCount, PadCountChanged)
 
 gen (m_via_count, 1, GetViaCount, SetViaCount, AddViaCount, SubViaCount, ViaCountChanged)
 
 gen (m_via_length, 2, GetViaLength, SetViaLength, AddViaLength, SubViaLength, ViaLengthChanged)
 
 gen (m_board_wire_length, 3, GetBoardWireLength, SetBoardWireLength, AddBoardWireLength, SubBoardWireLength, BoardWireLengthChanged)
 
 gen (m_chip_wire_length, 4, GetChipWireLength, SetChipWireLength, AddChipWireLength, SubChipWireLength, ChipWireLengthChanged)
 
unsigned long long int GetTotalLength () const
 
bool TotalLengthChanged () const
 
LIST_ITEMParent () const
 
void SetParent (LIST_ITEM *aParent)
 

Private Attributes

LIST_ITEMm_parent = nullptr
 
std::vector< LIST_ITEM * > m_children
 
bool m_is_group = false
 
unsigned int m_group_number = 0
 
NETINFO_ITEMm_net = nullptr
 
unsigned int m_pad_count = 0
 
unsigned int m_via_count = 0
 
uint64_t m_via_length = 0
 
uint64_t m_board_wire_length = 0
 
uint64_t m_chip_wire_length = 0
 
std::bitset< 5 > m_column_changed
 
wxString m_net_name
 

Detailed Description

Definition at line 88 of file dialog_net_inspector.cpp.

Constructor & Destructor Documentation

◆ LIST_ITEM() [1/2]

DIALOG_NET_INSPECTOR::LIST_ITEM::LIST_ITEM ( unsigned int  aGroupNumber,
const wxString &  aGroupName 
)
inline

Definition at line 113 of file dialog_net_inspector.cpp.

113  :
114  m_is_group( true ),
115  m_group_number( aGroupNumber ),
116  m_net_name( aGroupName )
117  {
118  }

◆ LIST_ITEM() [2/2]

DIALOG_NET_INSPECTOR::LIST_ITEM::LIST_ITEM ( NETINFO_ITEM aNet)
inline

Definition at line 120 of file dialog_net_inspector.cpp.

120  :
121  m_net( aNet )
122  {
123  m_net_name = UnescapeString( aNet->GetNetname() );
124  }
const wxString & GetNetname() const
Definition: netinfo.h:121
wxString UnescapeString(const wxString &aSource)

References NETINFO_ITEM::GetNetname(), m_net_name, and UnescapeString().

Member Function Documentation

◆ ChildrenBegin()

auto DIALOG_NET_INSPECTOR::LIST_ITEM::ChildrenBegin ( ) const
inline

◆ ChildrenCount()

unsigned int DIALOG_NET_INSPECTOR::LIST_ITEM::ChildrenCount ( ) const
inline

◆ ChildrenEnd()

auto DIALOG_NET_INSPECTOR::LIST_ITEM::ChildrenEnd ( ) const
inline

◆ gen() [1/5]

DIALOG_NET_INSPECTOR::LIST_ITEM::gen ( m_pad_count  ,
,
GetPadCount  ,
SetPadCount  ,
AddPadCount  ,
SubPadCount  ,
PadCountChanged   
)

◆ gen() [2/5]

DIALOG_NET_INSPECTOR::LIST_ITEM::gen ( m_via_count  ,
,
GetViaCount  ,
SetViaCount  ,
AddViaCount  ,
SubViaCount  ,
ViaCountChanged   
)

◆ gen() [3/5]

DIALOG_NET_INSPECTOR::LIST_ITEM::gen ( m_via_length  ,
,
GetViaLength  ,
SetViaLength  ,
AddViaLength  ,
SubViaLength  ,
ViaLengthChanged   
)

◆ gen() [4/5]

DIALOG_NET_INSPECTOR::LIST_ITEM::gen ( m_board_wire_length  ,
,
GetBoardWireLength  ,
SetBoardWireLength  ,
AddBoardWireLength  ,
SubBoardWireLength  ,
BoardWireLengthChanged   
)

◆ gen() [5/5]

DIALOG_NET_INSPECTOR::LIST_ITEM::gen ( m_chip_wire_length  ,
,
GetChipWireLength  ,
SetChipWireLength  ,
AddChipWireLength  ,
SubChipWireLength  ,
ChipWireLengthChanged   
)

◆ GetGroupName()

const wxString& DIALOG_NET_INSPECTOR::LIST_ITEM::GetGroupName ( ) const
inline

Definition at line 142 of file dialog_net_inspector.cpp.

References m_net_name.

Referenced by DIALOG_NET_INSPECTOR::onDeleteNet().

◆ GetIsGroup()

◆ GetNet()

NETINFO_ITEM* DIALOG_NET_INSPECTOR::LIST_ITEM::GetNet ( ) const
inline

Definition at line 134 of file dialog_net_inspector.cpp.

134 { return m_net; }

References m_net.

Referenced by DIALOG_NET_INSPECTOR::onRenameNet().

◆ GetNetCode()

int DIALOG_NET_INSPECTOR::LIST_ITEM::GetNetCode ( ) const
inline

◆ GetNetName()

const wxString& DIALOG_NET_INSPECTOR::LIST_ITEM::GetNetName ( ) const
inline

Definition at line 141 of file dialog_net_inspector.cpp.

References m_net_name.

Referenced by DIALOG_NET_INSPECTOR::DATA_MODEL::Compare().

◆ GetTotalLength()

unsigned long long int DIALOG_NET_INSPECTOR::LIST_ITEM::GetTotalLength ( ) const
inline

Definition at line 201 of file dialog_net_inspector.cpp.

202  {
203  return GetBoardWireLength() + GetViaLength() + GetChipWireLength();
204  }

Referenced by DIALOG_NET_INSPECTOR::DATA_MODEL::Compare().

◆ operator=()

LIST_ITEM& DIALOG_NET_INSPECTOR::LIST_ITEM::operator= ( const LIST_ITEM )
delete

◆ Parent()

LIST_ITEM* DIALOG_NET_INSPECTOR::LIST_ITEM::Parent ( ) const
inline

◆ ResetColumnChangedBits()

void DIALOG_NET_INSPECTOR::LIST_ITEM::ResetColumnChangedBits ( )
inline

Definition at line 144 of file dialog_net_inspector.cpp.

145  {
146  m_column_changed.reset();
147  }

References m_column_changed.

◆ SetParent()

void DIALOG_NET_INSPECTOR::LIST_ITEM::SetParent ( LIST_ITEM aParent)
inline

Definition at line 216 of file dialog_net_inspector.cpp.

217  {
218  if( m_parent == aParent )
219  return;
220 
221  if( m_parent != nullptr )
222  {
223  m_parent->SubPadCount( GetPadCount() );
224  m_parent->SubViaCount( GetViaCount() );
225  m_parent->SubViaLength( GetViaLength() );
226  m_parent->SubBoardWireLength( GetBoardWireLength() );
227  m_parent->SubChipWireLength( GetChipWireLength() );
228 
229  m_parent->m_children.erase( std::find( m_parent->m_children.begin(),
230  m_parent->m_children.end(), this ) );
231  }
232 
233  m_parent = aParent;
234 
235  if( m_parent != nullptr )
236  {
237  m_parent->AddPadCount( GetPadCount() );
238  m_parent->AddViaCount( GetViaCount() );
239  m_parent->AddViaLength( GetViaLength() );
240  m_parent->AddBoardWireLength( GetBoardWireLength() );
241  m_parent->AddChipWireLength( GetChipWireLength() );
242 
243  m_parent->m_children.push_back( this );
244  }
245  }
std::vector< LIST_ITEM * > m_children

References m_children, and m_parent.

Referenced by DIALOG_NET_INSPECTOR::DATA_MODEL::deleteItem().

◆ TotalLengthChanged()

bool DIALOG_NET_INSPECTOR::LIST_ITEM::TotalLengthChanged ( ) const
inline

Definition at line 206 of file dialog_net_inspector.cpp.

207  {
208  return BoardWireLengthChanged() || ViaLengthChanged() || ChipWireLengthChanged();
209  }

Referenced by DIALOG_NET_INSPECTOR::DATA_MODEL::itemColumnChanged().

Member Data Documentation

◆ m_board_wire_length

uint64_t DIALOG_NET_INSPECTOR::LIST_ITEM::m_board_wire_length = 0
private

Definition at line 102 of file dialog_net_inspector.cpp.

◆ m_children

std::vector<LIST_ITEM*> DIALOG_NET_INSPECTOR::LIST_ITEM::m_children
private

Definition at line 94 of file dialog_net_inspector.cpp.

Referenced by ChildrenBegin(), ChildrenCount(), ChildrenEnd(), and SetParent().

◆ m_chip_wire_length

uint64_t DIALOG_NET_INSPECTOR::LIST_ITEM::m_chip_wire_length = 0
private

Definition at line 103 of file dialog_net_inspector.cpp.

◆ m_column_changed

std::bitset<5> DIALOG_NET_INSPECTOR::LIST_ITEM::m_column_changed
private

Definition at line 107 of file dialog_net_inspector.cpp.

Referenced by ResetColumnChangedBits().

◆ m_group_number

unsigned int DIALOG_NET_INSPECTOR::LIST_ITEM::m_group_number = 0
private

Definition at line 97 of file dialog_net_inspector.cpp.

Referenced by GetNetCode().

◆ m_is_group

bool DIALOG_NET_INSPECTOR::LIST_ITEM::m_is_group = false
private

Definition at line 96 of file dialog_net_inspector.cpp.

Referenced by GetIsGroup().

◆ m_net

NETINFO_ITEM* DIALOG_NET_INSPECTOR::LIST_ITEM::m_net = nullptr
private

Definition at line 98 of file dialog_net_inspector.cpp.

Referenced by GetNet(), and GetNetCode().

◆ m_net_name

wxString DIALOG_NET_INSPECTOR::LIST_ITEM::m_net_name
private

Definition at line 110 of file dialog_net_inspector.cpp.

Referenced by GetGroupName(), GetNetName(), and LIST_ITEM().

◆ m_pad_count

unsigned int DIALOG_NET_INSPECTOR::LIST_ITEM::m_pad_count = 0
private

Definition at line 99 of file dialog_net_inspector.cpp.

◆ m_parent

LIST_ITEM* DIALOG_NET_INSPECTOR::LIST_ITEM::m_parent = nullptr
private

Definition at line 93 of file dialog_net_inspector.cpp.

Referenced by Parent(), and SetParent().

◆ m_via_count

unsigned int DIALOG_NET_INSPECTOR::LIST_ITEM::m_via_count = 0
private

Definition at line 100 of file dialog_net_inspector.cpp.

◆ m_via_length

uint64_t DIALOG_NET_INSPECTOR::LIST_ITEM::m_via_length = 0
private

Definition at line 101 of file dialog_net_inspector.cpp.


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