Commit e3c104d6 authored by Dick Hollenbeck's avatar Dick Hollenbeck
Browse files

Add <aliases> and <alias> to generic netlist XML format, required by new...

Add <aliases> and <alias> to generic netlist XML format, required by new bom_csv_grouped_by_value.py support.
parent 0ba6f998
Loading
Loading
Loading
Loading
+16 −0
Original line number Original line Diff line number Diff line
@@ -714,6 +714,8 @@ XNODE* NETLIST_EXPORT_TOOL::makeGenericLibParts()
    wxString    sLibpart  = wxT( "libpart" );
    wxString    sLibpart  = wxT( "libpart" );
    wxString    sLib      = wxT( "lib" );
    wxString    sLib      = wxT( "lib" );
    wxString    sPart     = wxT( "part" );
    wxString    sPart     = wxT( "part" );
    wxString    sAliases  = wxT( "aliases" );
    wxString    sAlias    = wxT( "alias" );
    wxString    sPins     = wxT( "pins" );      // key for library component pins list
    wxString    sPins     = wxT( "pins" );      // key for library component pins list
    wxString    sPin      = wxT( "pin" );       // key for one library component pin descr
    wxString    sPin      = wxT( "pin" );       // key for one library component pin descr
    wxString    sPinNum   = wxT( "num" );       // key for one library component pin num
    wxString    sPinNum   = wxT( "num" );       // key for one library component pin num
@@ -744,6 +746,20 @@ XNODE* NETLIST_EXPORT_TOOL::makeGenericLibParts()
        xlibpart->AddAttribute( sLib, library->GetLogicalName() );
        xlibpart->AddAttribute( sLib, library->GetLogicalName() );
        xlibpart->AddAttribute( sPart, lcomp->GetName()  );
        xlibpart->AddAttribute( sPart, lcomp->GetName()  );


        if( lcomp->GetAliasCount() )
        {
            wxArrayString aliases = lcomp->GetAliasNames( false );
            if( aliases.GetCount() )
            {
                XNODE*  xaliases = node( sAliases );
                xlibpart->AddChild( xaliases );
                for( unsigned i=0;  i<aliases.GetCount();  ++i )
                {
                    xaliases->AddChild( node( sAlias, aliases[i] ) );
                }
            }
        }

        //----- show the important properties -------------------------
        //----- show the important properties -------------------------
        if( !lcomp->GetAlias( 0 )->GetDescription().IsEmpty() )
        if( !lcomp->GetAlias( 0 )->GetDescription().IsEmpty() )
            xlibpart->AddChild( node( sDescr, lcomp->GetAlias( 0 )->GetDescription() ) );
            xlibpart->AddChild( node( sDescr, lcomp->GetAlias( 0 )->GetDescription() ) );