Commit 463c17b8 authored by Dick Hollenbeck's avatar Dick Hollenbeck
Browse files

fix EDA_ITEM::Show() prototype bug, fix KICAD_PLUGIN::Save() problem with netclasses.

parent 02bb2111
Loading
Loading
Loading
Loading
+13 −2
Original line number Diff line number Diff line
@@ -80,6 +80,10 @@ public:
    S3D_MATERIAL* Back() const { return (S3D_MATERIAL*) Pback; }

    void SetMaterial();

#if defined(DEBUG)
    void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override
#endif
};


@@ -131,6 +135,10 @@ public:
    int  ReadAppearance( FILE* file, int* LineNum );
    int  ReadGeometry( FILE* file, int* LineNum );
    void Set_Object_Coords( std::vector< S3D_Vertex >& aVertices );

#if defined(DEBUG)
    void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override
#endif
};


@@ -150,6 +158,10 @@ public:
    Struct3D_Shape* Back() const { return (Struct3D_Shape*) Pback; }

    int ReadData( FILE* file, int* LineNum );

#if defined(DEBUG)
    void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override
#endif
};


@@ -185,5 +197,4 @@ public:
    void       SetToolTip( const wxString& text );
};


#endif /* STRUCT_3D_H */
#endif // STRUCT_3D_H
+1 −1
Original line number Diff line number Diff line
@@ -516,7 +516,7 @@ void BASE_SCREEN::InsertItem( EDA_ITEMS::iterator aIter, EDA_ITEM* aItem )

#if defined(DEBUG)

void BASE_SCREEN::Show( int nestLevel, std::ostream& os )
void BASE_SCREEN::Show( int nestLevel, std::ostream& os ) const
{
    EDA_ITEM* item = m_drawList;

+4 −6
Original line number Diff line number Diff line
@@ -215,7 +215,6 @@ bool EDA_ITEM::operator<( const EDA_ITEM& aItem ) const

#if defined(DEBUG)


// A function that should have been in wxWidgets
std::ostream& operator<<( std::ostream& out, const wxSize& size )
{
@@ -232,12 +231,12 @@ std::ostream& operator<<( std::ostream& out, const wxPoint& pt )
}


void EDA_ITEM::Show( int nestLevel, std::ostream& os ) const
void EDA_ITEM::ShowDummy( std::ostream& os ) const
{
    // XML output:
    wxString s = GetClass();

    NestedSpace( nestLevel, os ) << '<' << s.Lower().mb_str() << ">"
    os << '<' << s.Lower().mb_str() << ">"
       << " Need ::Show() override for this class "
       << "</" << s.Lower().mb_str() << ">\n";
}
@@ -253,7 +252,6 @@ std::ostream& EDA_ITEM::NestedSpace( int nestLevel, std::ostream& os )
    return os;
}


#endif


+8 −1
Original line number Diff line number Diff line
@@ -167,6 +167,10 @@ public:
    }

    bool operator==( const LIB_ALIAS* aAlias ) const { return this == aAlias; }

#if defined(DEBUG)
    void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override
#endif
};

extern bool operator<( const LIB_ALIAS& aItem1, const LIB_ALIAS& aItem2 );
@@ -672,7 +676,10 @@ public:
    bool ShowPinNumbers() { return m_showPinNumbers; }

    bool operator==( const LIB_COMPONENT* aComponent ) const { return this == aComponent; }
};

#if defined(DEBUG)
    void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override
#endif
};

#endif  //  CLASS_LIBENTRY_H
+3 −1
Original line number Diff line number Diff line
@@ -94,7 +94,7 @@ const char* ShowType( NETLIST_ITEM_T aType )
}


void NETLIST_OBJECT::Show( std::ostream& out, int ndx )
void NETLIST_OBJECT::Show( std::ostream& out, int ndx ) const
{
    wxString path = m_SheetList.PathHumanReadable();

@@ -114,8 +114,10 @@ void NETLIST_OBJECT::Show( std::ostream& out, int ndx )
    switch( m_Type )
    {
    case NET_PIN:
        /* GetRef() needs to be const
        out << " <refOfComp>" << ((SCH_COMPONENT*)m_Link)->GetRef(&m_SheetList).mb_str()
            << "</refOfComp>\n";
        */

        if( m_Comp )
            m_Comp->Show( 1, out );
Loading