void SCH_TEXT::GetNetListItem( NETLIST_OBJECT_LIST& aNetListItems, SCH_SHEET_PATH* aSheetPath ) { if( GetLayer() == LAYER_NOTES || GetLayer() == LAYER_SHEETLABEL ) return; NETLIST_OBJECT* item = new NETLIST_OBJECT(); item->m_SheetPath = *aSheetPath; item->m_SheetPathInclude = *aSheetPath; item->m_Comp = (SCH_ITEM*) this; item->m_Type = NET_LABEL; if( GetLayer() == LAYER_GLOBLABEL ) item->m_Type = NET_GLOBLABEL; else if( GetLayer() == LAYER_HIERLABEL ) item->m_Type = NET_HIERLABEL; item->m_Label = m_Text; item->m_Start = item->m_End = GetTextPos(); aNetListItems.push_back( item ); // If a bus connects to label if( Connection( *aSheetPath )->IsBusLabel( m_Text ) ) { item->ConvertBusToNetListItems( aNetListItems ); } }
void SCH_SHEET::GetNetListItem( NETLIST_OBJECT_LIST& aNetListItems, SCH_SHEET_PATH* aSheetPath ) { SCH_SHEET_PATH sheetPath = *aSheetPath; sheetPath.push_back( this ); for( size_t i = 0; i < m_pins.size(); i++ ) { NETLIST_OBJECT* item = new NETLIST_OBJECT(); item->m_SheetPathInclude = sheetPath; item->m_SheetPath = *aSheetPath; item->m_Comp = &m_pins[i]; item->m_Link = this; item->m_Type = NET_SHEETLABEL; item->m_Label = m_pins[i].GetText(); item->m_Start = item->m_End = m_pins[i].GetPosition(); aNetListItems.push_back( item ); if( IsBusLabel( m_pins[i].GetText() ) ) item->ConvertBusToNetListItems( aNetListItems ); } }