本文整理汇总了C++中NETLIST_OBJECT::ConvertBusToNetListItems方法的典型用法代码示例。如果您正苦于以下问题:C++ NETLIST_OBJECT::ConvertBusToNetListItems方法的具体用法?C++ NETLIST_OBJECT::ConvertBusToNetListItems怎么用?C++ NETLIST_OBJECT::ConvertBusToNetListItems使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NETLIST_OBJECT
的用法示例。
在下文中一共展示了NETLIST_OBJECT::ConvertBusToNetListItems方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetNetListItem
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 );
}
}
示例2: GetNetListItem
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 );
}
}