本文整理汇总了C++中SCH_SCREENS类的典型用法代码示例。如果您正苦于以下问题:C++ SCH_SCREENS类的具体用法?C++ SCH_SCREENS怎么用?C++ SCH_SCREENS使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了SCH_SCREENS类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: memcpy
void DIALOG_ERC::TestErc( wxArrayString* aMessagesList )
{
wxFileName fn;
if( !DiagErcTableInit )
{
memcpy( DiagErc, DefaultDiagErc, sizeof(DefaultDiagErc) );
DiagErcTableInit = true;
}
m_writeErcFile = m_WriteResultOpt->GetValue();
/* Build the whole sheet list in hierarchy (sheet, not screen) */
SCH_SHEET_LIST sheets;
sheets.AnnotatePowerSymbols();
if( m_parent->CheckAnnotate( aMessagesList, false ) )
{
if( aMessagesList )
{
wxString msg = _( "Annotation required!" );
msg += wxT( "\n" );
aMessagesList->Add( msg );
}
return;
}
SCH_SCREENS screens;
// Erase all previous DRC markers.
screens.DeleteAllMarkers( MARK_ERC );
for( SCH_SCREEN* screen = screens.GetFirst(); screen != NULL; screen = screens.GetNext() )
{
/* Ff wire list has changed, delete Undo Redo list to avoid pointers on deleted
* data problems.
*/
if( screen->SchematicCleanUp( NULL ) )
screen->ClearUndoRedoList();
}
/* Test duplicate sheet names inside a given sheet, one cannot have sheets with
* duplicate names (file names can be duplicated).
*/
TestDuplicateSheetNames( true );
NETLIST_OBJECT_LIST* objectsConnectedList = m_parent->BuildNetListBase();
// Reset the connection type indicator
objectsConnectedList->ResetConnectionsType();
unsigned lastNet;
unsigned nextNet = lastNet = 0;
int NetNbItems = 0;
int MinConn = NOC;
for( unsigned net = 0; net < objectsConnectedList->size(); net++ )
{
if( objectsConnectedList->GetItemNet( lastNet ) !=
objectsConnectedList->GetItemNet( net ) )
{
// New net found:
MinConn = NOC;
NetNbItems = 0;
nextNet = net;
}
switch( objectsConnectedList->GetItemType( net ) )
{
// These items do not create erc problems
case NET_ITEM_UNSPECIFIED:
case NET_SEGMENT:
case NET_BUS:
case NET_JUNCTION:
case NET_LABEL:
case NET_BUSLABELMEMBER:
case NET_PINLABEL:
case NET_GLOBLABEL:
case NET_GLOBBUSLABELMEMBER:
break;
case NET_HIERLABEL:
case NET_HIERBUSLABELMEMBER:
case NET_SHEETLABEL:
case NET_SHEETBUSLABELMEMBER:
// ERC problems when pin sheets do not match hierarchical labels.
// Each pin sheet must match a hierarchical label
// Each hierarchical label must match a pin sheet
TestLabel( objectsConnectedList, net, nextNet );
break;
case NET_NOCONNECT:
// ERC problems when a noconnect symbol is connected to more than one pin.
MinConn = NET_NC;
if( NetNbItems != 0 )
Diagnose( objectsConnectedList->GetItem( net ), NULL, MinConn, UNC );
//.........这里部分代码省略.........