kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #28765
[PATCH] Kill EDA_ITEM::Show() and both users.
---
common/base_screen.cpp | 20 ------
common/base_struct.cpp | 46 ------------
eeschema/class_libentry.h | 8 ---
eeschema/class_netlist_object.cpp | 107 ----------------------------
eeschema/class_netlist_object.h | 17 -----
eeschema/class_sch_screen.h | 4 --
eeschema/lib_draw_item.h | 4 --
eeschema/lib_pin.cpp | 14 ----
eeschema/lib_pin.h | 4 --
eeschema/netlist.cpp | 17 -----
eeschema/sch_bitmap.cpp | 13 ----
eeschema/sch_bitmap.h | 4 --
eeschema/sch_bus_entry.h | 4 --
eeschema/sch_component.cpp | 32 ---------
eeschema/sch_component.h | 4 --
eeschema/sch_field.h | 4 --
eeschema/sch_junction.cpp | 11 ---
eeschema/sch_junction.h | 4 --
eeschema/sch_line.cpp | 17 -----
eeschema/sch_line.h | 4 --
eeschema/sch_marker.cpp | 11 ---
eeschema/sch_marker.h | 4 --
eeschema/sch_no_connect.h | 4 --
eeschema/sch_screen.cpp | 16 -----
eeschema/sch_sheet.cpp | 22 ------
eeschema/sch_sheet.h | 8 ---
eeschema/sch_sheet_pin.cpp | 17 -----
eeschema/sch_text.cpp | 19 -----
eeschema/sch_text.h | 4 --
gerbview/class_gerber_draw_item.cpp | 21 ------
gerbview/class_gerber_draw_item.h | 4 --
include/base_struct.h | 25 -------
include/class_base_screen.h | 4 --
include/origin_viewitem.h | 6 --
include/preview_items/bright_box.h | 6 --
include/preview_items/ruler_item.h | 7 --
include/preview_items/simple_overlay_item.h | 6 --
include/worksheet_viewitem.h | 7 --
pagelayout_editor/pl_editor_undo_redo.cpp | 5 --
pcbnew/basepcbframe.cpp | 4 --
pcbnew/class_board.h | 4 --
pcbnew/class_dimension.h | 4 --
pcbnew/class_drawsegment.h | 4 --
pcbnew/class_edge_mod.h | 5 --
pcbnew/class_marker_pcb.h | 4 --
pcbnew/class_mire.h | 4 --
pcbnew/class_module.h | 4 --
pcbnew/class_netinfo.h | 6 --
pcbnew/class_pad.h | 5 --
pcbnew/class_pcb_text.h | 4 --
pcbnew/class_text_mod.h | 4 --
pcbnew/class_track.h | 5 --
pcbnew/class_zone.h | 6 --
pcbnew/files.cpp | 5 --
pcbnew/ratsnest_viewitem.h | 7 --
pcbnew/router/router_preview_item.h | 4 --
pcbnew/tools/edit_points.h | 6 --
tools/container_test.cpp | 8 ---
58 files changed, 627 deletions(-)
diff --git a/common/base_screen.cpp b/common/base_screen.cpp
index 8fa0b7db8..38b38f574 100644
--- a/common/base_screen.cpp
+++ b/common/base_screen.cpp
@@ -449,23 +449,3 @@ PICKED_ITEMS_LIST* BASE_SCREEN::PopCommandFromRedoList( )
{
return m_RedoList.PopCommand( );
}
-
-
-#if defined(DEBUG)
-
-void BASE_SCREEN::Show( int nestLevel, std::ostream& os ) const
-{
- // for now, make it look like XML, expand on this later.
- NestedSpace( nestLevel, os ) << '<' << GetClass().Lower().mb_str() << ">\n";
-
- /* this class will eventually go away, but here's a place holder until then.
- for( EDA_ITEM* item = m_drawList; item; item = item->Next() )
- {
- item->Show( nestLevel+1, os );
- }
- */
-
- NestedSpace( nestLevel, os ) << "</" << GetClass().Lower().mb_str() << ">\n";
-}
-
-#endif
diff --git a/common/base_struct.cpp b/common/base_struct.cpp
index 76f51fba7..280081a96 100644
--- a/common/base_struct.cpp
+++ b/common/base_struct.cpp
@@ -111,11 +111,6 @@ void EDA_ITEM::SetModified()
const EDA_RECT EDA_ITEM::GetBoundingBox() const
{
-#if defined(DEBUG)
- printf( "Missing GetBoundingBox()\n" );
- Show( 0, std::cout ); // tell me which classes still need GetBoundingBox support
-#endif
-
// return a zero-sized box per default. derived classes should override
// this
return EDA_RECT( wxPoint( 0, 0 ), wxSize( 0, 0 ) );
@@ -284,47 +279,6 @@ BITMAP_DEF EDA_ITEM::GetMenuImage() const
return dummy_xpm;
}
-#if defined(DEBUG)
-
-// A function that should have been in wxWidgets
-std::ostream& operator<<( std::ostream& out, const wxSize& size )
-{
- out << " width=\"" << size.GetWidth() << "\" height=\"" << size.GetHeight() << "\"";
- return out;
-}
-
-
-// A function that should have been in wxWidgets
-std::ostream& operator<<( std::ostream& out, const wxPoint& pt )
-{
- out << " x=\"" << pt.x << "\" y=\"" << pt.y << "\"";
- return out;
-}
-
-
-void EDA_ITEM::ShowDummy( std::ostream& os ) const
-{
- // XML output:
- wxString s = GetClass();
-
- os << '<' << s.Lower().mb_str() << ">"
- << " Need ::Show() override for this class "
- << "</" << s.Lower().mb_str() << ">\n";
-}
-
-
-std::ostream& EDA_ITEM::NestedSpace( int nestLevel, std::ostream& os )
-{
- for( int i = 0; i<nestLevel; ++i )
- os << " ";
-
- // number of spaces here controls indent per nest level
-
- return os;
-}
-
-#endif
-
/******************/
/* Class EDA_RECT */
diff --git a/eeschema/class_libentry.h b/eeschema/class_libentry.h
index 485d6e9e6..47b84c9f7 100644
--- a/eeschema/class_libentry.h
+++ b/eeschema/class_libentry.h
@@ -164,10 +164,6 @@ public:
}
bool operator==( const LIB_ALIAS* aAlias ) const { return this == aAlias; }
-
-#if defined(DEBUG)
- void Show( int nestLevel, std::ostream& os ) const override { ShowDummy( os ); }
-#endif
};
extern bool operator<( const LIB_ALIAS& aItem1, const LIB_ALIAS& aItem2 );
@@ -783,10 +779,6 @@ public:
bool ShowPinNumbers() { return m_showPinNumbers; }
bool operator==( const LIB_PART* aPart ) const { return this == aPart; }
-
-#if defined(DEBUG)
- void Show( int nestLevel, std::ostream& os ) const override { ShowDummy( os ); }
-#endif
};
#endif // CLASS_LIBENTRY_H
diff --git a/eeschema/class_netlist_object.cpp b/eeschema/class_netlist_object.cpp
index 2403d8bf2..4a8d6067e 100644
--- a/eeschema/class_netlist_object.cpp
+++ b/eeschema/class_netlist_object.cpp
@@ -55,113 +55,6 @@ bool IsBusLabel( const wxString& aLabel )
}
-#if defined(DEBUG)
-
-#include <iostream>
-const char* ShowType( NETLIST_ITEM_T aType )
-{
- const char* ret;
-
- switch( aType )
- {
- case NET_SEGMENT:
- ret = "segment"; break;
-
- case NET_BUS:
- ret = "bus"; break;
-
- case NET_JUNCTION:
- ret = "junction"; break;
-
- case NET_LABEL:
- ret = "label"; break;
-
- case NET_HIERLABEL:
- ret = "hierlabel"; break;
-
- case NET_GLOBLABEL:
- ret = "glabel"; break;
-
- case NET_BUSLABELMEMBER:
- ret = "buslblmember"; break;
-
- case NET_HIERBUSLABELMEMBER:
- ret = "hierbuslblmember"; break;
-
- case NET_GLOBBUSLABELMEMBER:
- ret = "gbuslblmember"; break;
-
- case NET_SHEETBUSLABELMEMBER:
- ret = "sbuslblmember"; break;
-
- case NET_SHEETLABEL:
- ret = "sheetlabel"; break;
-
- case NET_PINLABEL:
- ret = "pinlabel"; break;
-
- case NET_PIN:
- ret = "pin"; break;
-
- case NET_NOCONNECT:
- ret = "noconnect"; break;
-
- default:
- ret = "??"; break;
- }
-
- return ret;
-}
-
-
-void NETLIST_OBJECT::Show( std::ostream& out, int ndx ) const
-{
- wxString path = m_SheetPath.PathHumanReadable();
-
- out << "<netItem ndx=\"" << ndx << '"' <<
- " type=\"" << ShowType( m_Type ) << '"' <<
- " netCode=\"" << GetNet() << '"' <<
- " sheet=\"" << TO_UTF8( path ) << '"' <<
- ">\n";
-
- out << " <start " << m_Start << "/> <end " << m_End << "/>\n";
-
- if( !m_Label.IsEmpty() )
- out << " <label>" << m_Label.mb_str() << "</label>\n";
-
- out << " <sheetpath>" << m_SheetPath.PathHumanReadable().mb_str() << "</sheetpath>\n";
-
- switch( m_Type )
- {
- case NET_PIN:
- /* GetRef() needs to be const
- out << " <refOfComp>" << GetComponentParent()->GetRef(&m_SheetPath).mb_str()
- << "</refOfComp>\n";
- */
-
- if( m_Comp )
- m_Comp->Show( 1, out );
-
- break;
-
- default:
- // not all the m_Comp classes have working Show functions.
- ;
- }
-
-/* was segfault-ing
- if( m_Comp )
- m_Comp->Show( 1, out ); // labels may not have good Show() funcs?
- else
- out << " m_Comp==NULL\n";
-*/
-
- out << "</netItem>\n";
-}
-
-#endif
-
-
NETLIST_OBJECT::NETLIST_OBJECT()
{
m_Type = NET_ITEM_UNSPECIFIED; /* Type of this item (see NETLIST_ITEM_T enum) */
diff --git a/eeschema/class_netlist_object.h b/eeschema/class_netlist_object.h
index 81c3d93a7..5f2221da1 100644
--- a/eeschema/class_netlist_object.h
+++ b/eeschema/class_netlist_object.h
@@ -130,11 +130,6 @@ private:
public:
-#if defined(DEBUG)
- void Show( std::ostream& out, int ndx ) const;
-
-#endif
-
NETLIST_OBJECT();
NETLIST_OBJECT( NETLIST_OBJECT& aSource ); // Copy constructor
@@ -407,18 +402,6 @@ public:
*/
void TestforSimilarLabels();
-
- #if defined(DEBUG)
- void DumpNetTable()
- {
- for( unsigned idx = 0; idx < size(); ++idx )
- {
- GetItem( idx )->Show( std::cout, idx );
- }
- }
-
- #endif
-
private:
/*
* Propagate aNewNetCode to items having an internal netcode aOldNetCode
diff --git a/eeschema/class_sch_screen.h b/eeschema/class_sch_screen.h
index b9ef7fef8..9b6ac8f2d 100644
--- a/eeschema/class_sch_screen.h
+++ b/eeschema/class_sch_screen.h
@@ -519,10 +519,6 @@ public:
* @return The number of items in the pick list.
*/
int UpdatePickList();
-
-#if defined(DEBUG)
- void Show( int nestLevel, std::ostream& os ) const override;
-#endif
};
diff --git a/eeschema/lib_draw_item.h b/eeschema/lib_draw_item.h
index f1c0f8604..6e3f4db5b 100644
--- a/eeschema/lib_draw_item.h
+++ b/eeschema/lib_draw_item.h
@@ -420,10 +420,6 @@ public:
FILL_T GetFillMode() const { return m_Fill; }
-#if defined(DEBUG)
- void Show( int nestLevel, std::ostream& os ) const override { ShowDummy( os ); }
-#endif
-
private:
/**
diff --git a/eeschema/lib_pin.cpp b/eeschema/lib_pin.cpp
index 6a7cd337b..417a8b1b7 100644
--- a/eeschema/lib_pin.cpp
+++ b/eeschema/lib_pin.cpp
@@ -2379,17 +2379,3 @@ bool LIB_PIN::Matches( wxFindReplaceData& aSearchData, void* aAuxData, wxPoint*
return false;
}
-
-
-#if defined(DEBUG)
-
-void LIB_PIN::Show( int nestLevel, std::ostream& os ) const
-{
- NestedSpace( nestLevel, os ) << '<' << GetClass().Lower().mb_str()
- << " num=\"" << GetNumberString().mb_str()
- << '"' << "/>\n";
-
-// NestedSpace( nestLevel, os ) << "</" << GetClass().Lower().mb_str() << ">\n";
-}
-
-#endif
diff --git a/eeschema/lib_pin.h b/eeschema/lib_pin.h
index 1d9ffe60f..27e65972e 100644
--- a/eeschema/lib_pin.h
+++ b/eeschema/lib_pin.h
@@ -111,10 +111,6 @@ public:
return wxT( "LIB_PIN" );
}
-#if defined(DEBUG)
- void Show( int nestLevel, std::ostream& os ) const override;
-#endif
-
bool Save( OUTPUTFORMATTER& aFormatter ) override;
bool Load( LINE_READER& aLineReader, wxString& aErrorMsg ) override;
diff --git a/eeschema/netlist.cpp b/eeschema/netlist.cpp
index f84fcdf60..e4f47c643 100644
--- a/eeschema/netlist.cpp
+++ b/eeschema/netlist.cpp
@@ -121,8 +121,6 @@ bool SCH_EDIT_FRAME::CreateNetlist( int aFormat, const wxString& aFullFileName,
}
-//#define NETLIST_DEBUG
-
NETLIST_OBJECT_LIST::~NETLIST_OBJECT_LIST()
{
Clear();
@@ -303,11 +301,6 @@ bool NETLIST_OBJECT_LIST::BuildNetListInfo( SCH_SHEET_LIST& aSheets )
}
}
-#if defined(NETLIST_DEBUG) && defined(DEBUG)
- std::cout << "\n\nafter sheet local\n\n";
- DumpNetTable();
-#endif
-
// Updating the Bus Labels Netcode connected by Bus
connectBusLabels();
@@ -342,11 +335,6 @@ bool NETLIST_OBJECT_LIST::BuildNetListInfo( SCH_SHEET_LIST& aSheets )
}
}
-#if defined(NETLIST_DEBUG) && defined(DEBUG)
- std::cout << "\n\nafter sheet global\n\n";
- DumpNetTable();
-#endif
-
// Connection between hierarchy sheets
for( unsigned ii = 0; ii < size(); ii++ )
{
@@ -358,11 +346,6 @@ bool NETLIST_OBJECT_LIST::BuildNetListInfo( SCH_SHEET_LIST& aSheets )
// Sort objects by NetCode
SortListbyNetcode();
-#if defined(NETLIST_DEBUG) && defined(DEBUG)
- std::cout << "\n\nafter qsort()\n";
- DumpNetTable();
-#endif
-
// Compress numbers of Netcode having consecutive values.
int NetCode = 0;
m_lastNetCode = 0;
diff --git a/eeschema/sch_bitmap.cpp b/eeschema/sch_bitmap.cpp
index 25da8498a..4c6c62549 100644
--- a/eeschema/sch_bitmap.cpp
+++ b/eeschema/sch_bitmap.cpp
@@ -271,19 +271,6 @@ bool SCH_BITMAP::IsSelectStateChanged( const wxRect& aRect )
}
-#if defined(DEBUG)
-void SCH_BITMAP::Show( int nestLevel, std::ostream& os ) const
-{
- // XML output:
- wxString s = GetClass();
-
- NestedSpace( nestLevel, os ) << '<' << s.Lower().mb_str() << m_pos << "/>\n";
-}
-
-
-#endif
-
-
bool SCH_BITMAP::HitTest( const wxPoint& aPosition, int aAccuracy ) const
{
EDA_RECT rect = GetBoundingBox();
diff --git a/eeschema/sch_bitmap.h b/eeschema/sch_bitmap.h
index a3eef7573..26a699310 100644
--- a/eeschema/sch_bitmap.h
+++ b/eeschema/sch_bitmap.h
@@ -143,10 +143,6 @@ public:
void Plot( PLOTTER* aPlotter ) override;
EDA_ITEM* Clone() const override;
-
-#if defined(DEBUG)
- void Show( int nestLevel, std::ostream& os ) const override;
-#endif
};
diff --git a/eeschema/sch_bus_entry.h b/eeschema/sch_bus_entry.h
index df073d9f8..36cdc9204 100644
--- a/eeschema/sch_bus_entry.h
+++ b/eeschema/sch_bus_entry.h
@@ -124,10 +124,6 @@ public:
bool HitTest( const EDA_RECT& aRect, bool aContained = false, int aAccuracy = 0 ) const override;
void Plot( PLOTTER* aPlotter ) override;
-
-#if defined(DEBUG)
- void Show( int nestLevel, std::ostream& os ) const override { ShowDummy( os ); }
-#endif
};
/**
diff --git a/eeschema/sch_component.cpp b/eeschema/sch_component.cpp
index 0182a3cb9..a2c8024d8 100644
--- a/eeschema/sch_component.cpp
+++ b/eeschema/sch_component.cpp
@@ -1049,38 +1049,6 @@ wxPoint SCH_COMPONENT::GetScreenCoord( const wxPoint& aPoint )
}
-#if defined(DEBUG)
-
-void SCH_COMPONENT::Show( int nestLevel, std::ostream& os ) const
-{
- // for now, make it look like XML:
- NestedSpace( nestLevel, os ) << '<' << GetClass().Lower().mb_str()
- << " ref=\"" << TO_UTF8( GetField( 0 )->GetName() )
- << '"' << " chipName=\""
- << GetLibId().Format() << '"' << m_Pos
- << " layer=\"" << m_Layer
- << '"' << ">\n";
-
- // skip the reference, it's been output already.
- for( int i = 1; i < GetFieldCount(); ++i )
- {
- wxString value = GetField( i )->GetText();
-
- if( !value.IsEmpty() )
- {
- NestedSpace( nestLevel + 1, os ) << "<field" << " name=\""
- << TO_UTF8( GetField( i )->GetName() )
- << '"' << " value=\""
- << TO_UTF8( value ) << "\"/>\n";
- }
- }
-
- NestedSpace( nestLevel, os ) << "</" << TO_UTF8( GetClass().Lower() ) << ">\n";
-}
-
-#endif
-
-
bool SCH_COMPONENT::Save( FILE* f ) const
{
std::string name1;
diff --git a/eeschema/sch_component.h b/eeschema/sch_component.h
index 66c260925..051060792 100644
--- a/eeschema/sch_component.h
+++ b/eeschema/sch_component.h
@@ -558,10 +558,6 @@ public:
EDA_ITEM* Clone() const override;
-#if defined(DEBUG)
- void Show( int nestLevel, std::ostream& os ) const override;
-#endif
-
private:
bool doIsConnected( const wxPoint& aPosition ) const override;
};
diff --git a/eeschema/sch_field.h b/eeschema/sch_field.h
index fc13b01d4..cdacbce7c 100644
--- a/eeschema/sch_field.h
+++ b/eeschema/sch_field.h
@@ -199,10 +199,6 @@ public:
void Plot( PLOTTER* aPlotter ) override;
EDA_ITEM* Clone() const override;
-
-#if defined(DEBUG)
- void Show( int nestLevel, std::ostream& os ) const override { ShowDummy( os ); }
-#endif
};
diff --git a/eeschema/sch_junction.cpp b/eeschema/sch_junction.cpp
index 3c2e1fdb5..d729553d1 100644
--- a/eeschema/sch_junction.cpp
+++ b/eeschema/sch_junction.cpp
@@ -186,17 +186,6 @@ void SCH_JUNCTION::GetNetListItem( NETLIST_OBJECT_LIST& aNetListItems,
}
-#if defined(DEBUG)
-void SCH_JUNCTION::Show( int nestLevel, std::ostream& os ) const
-{
- // XML output:
- wxString s = GetClass();
-
- NestedSpace( nestLevel, os ) << '<' << s.Lower().mb_str() << m_pos << "/>\n";
-}
-#endif
-
-
bool SCH_JUNCTION::HitTest( const wxPoint& aPosition, int aAccuracy ) const
{
EDA_RECT rect = GetBoundingBox();
diff --git a/eeschema/sch_junction.h b/eeschema/sch_junction.h
index bd3133b6d..2dd0357dd 100644
--- a/eeschema/sch_junction.h
+++ b/eeschema/sch_junction.h
@@ -101,10 +101,6 @@ public:
EDA_ITEM* Clone() const override;
-#if defined(DEBUG)
- void Show( int nestLevel, std::ostream& os ) const override;
-#endif
-
private:
bool doIsConnected( const wxPoint& aPosition ) const override;
};
diff --git a/eeschema/sch_line.cpp b/eeschema/sch_line.cpp
index 0d56ccb40..eaebe36c4 100644
--- a/eeschema/sch_line.cpp
+++ b/eeschema/sch_line.cpp
@@ -95,23 +95,6 @@ void SCH_LINE::Move( const wxPoint& aOffset )
}
-#if defined(DEBUG)
-
-void SCH_LINE::Show( int nestLevel, std::ostream& os ) const
-{
- NestedSpace( nestLevel, os ) << '<' << GetClass().Lower().mb_str()
- << " layer=\"" << m_Layer << '"'
- << " startIsDangling=\"" << m_startIsDangling
- << '"' << " endIsDangling=\""
- << m_endIsDangling << '"' << ">"
- << " <start" << m_start << "/>"
- << " <end" << m_end << "/>" << "</"
- << GetClass().Lower().mb_str() << ">\n";
-}
-
-#endif
-
-
const EDA_RECT SCH_LINE::GetBoundingBox() const
{
int width = 25;
diff --git a/eeschema/sch_line.h b/eeschema/sch_line.h
index 30435c6c1..4a0acc1f6 100644
--- a/eeschema/sch_line.h
+++ b/eeschema/sch_line.h
@@ -145,10 +145,6 @@ public:
EDA_ITEM* Clone() const override;
-#if defined(DEBUG)
- void Show( int nestLevel, std::ostream& os ) const override;
-#endif
-
private:
bool doIsConnected( const wxPoint& aPosition ) const override;
};
diff --git a/eeschema/sch_marker.cpp b/eeschema/sch_marker.cpp
index ff817df5f..956a9ebaf 100644
--- a/eeschema/sch_marker.cpp
+++ b/eeschema/sch_marker.cpp
@@ -61,17 +61,6 @@ EDA_ITEM* SCH_MARKER::Clone() const
}
-#if defined(DEBUG)
-
-void SCH_MARKER::Show( int nestLevel, std::ostream& os ) const
-{
- // for now, make it look like XML:
- NestedSpace( nestLevel, os ) << '<' << GetClass().Lower().mb_str()
- << GetPos() << "/>\n";
-}
-
-#endif
-
/**
* Function Save (do nothing : markers are no more saved in files )
* writes the data structures for this object out to a FILE in "*.brd" format.
diff --git a/eeschema/sch_marker.h b/eeschema/sch_marker.h
index 24c9fcccd..f29b12d10 100644
--- a/eeschema/sch_marker.h
+++ b/eeschema/sch_marker.h
@@ -108,10 +108,6 @@ public:
bool HitTest( const wxPoint& aPosition, int aAccuracy ) const override;
EDA_ITEM* Clone() const override;
-
-#if defined(DEBUG)
- void Show( int nestLevel, std::ostream& os ) const override;
-#endif
};
#endif // TYPE_SCH_MARKER_H_
diff --git a/eeschema/sch_no_connect.h b/eeschema/sch_no_connect.h
index 321eedbca..49561137f 100644
--- a/eeschema/sch_no_connect.h
+++ b/eeschema/sch_no_connect.h
@@ -103,10 +103,6 @@ public:
EDA_ITEM* Clone() const override;
-#if defined(DEBUG)
- void Show( int nestLevel, std::ostream& os ) const override { ShowDummy( os ); }
-#endif
-
private:
bool doIsConnected( const wxPoint& aPosition ) const override;
};
diff --git a/eeschema/sch_screen.cpp b/eeschema/sch_screen.cpp
index 6f48374c6..a1ae34a97 100644
--- a/eeschema/sch_screen.cpp
+++ b/eeschema/sch_screen.cpp
@@ -1527,19 +1527,3 @@ void SCH_SCREENS::TestDanglingEnds()
for( SCH_SCREEN* screen = GetFirst(); screen; screen = GetNext() )
screen->TestDanglingEnds();
}
-
-
-#if defined(DEBUG)
-void SCH_SCREEN::Show( int nestLevel, std::ostream& os ) const
-{
- // for now, make it look like XML, expand on this later.
- NestedSpace( nestLevel, os ) << '<' << GetClass().Lower().mb_str() << ">\n";
-
- for( EDA_ITEM* item = m_drawList.begin(); item; item = item->Next() )
- {
- item->Show( nestLevel+1, os );
- }
-
- NestedSpace( nestLevel, os ) << "</" << GetClass().Lower().mb_str() << ">\n";
-}
-#endif
diff --git a/eeschema/sch_sheet.cpp b/eeschema/sch_sheet.cpp
index 8b58509ba..1d7325dd4 100644
--- a/eeschema/sch_sheet.cpp
+++ b/eeschema/sch_sheet.cpp
@@ -1245,25 +1245,3 @@ SCH_ITEM& SCH_SHEET::operator=( const SCH_ITEM& aItem )
return *this;
}
-
-
-#if defined(DEBUG)
-
-void SCH_SHEET::Show( int nestLevel, std::ostream& os ) const
-{
- // XML output:
- wxString s = GetClass();
-
- NestedSpace( nestLevel, os ) << '<' << s.Lower().mb_str() << ">" << " sheet_name=\""
- << TO_UTF8( m_name ) << '"' << ">\n";
-
- // show all the pins, and check the linked list integrity
- for( const SCH_SHEET_PIN& label : m_pins )
- {
- label.Show( nestLevel + 1, os );
- }
-
- NestedSpace( nestLevel, os ) << "</" << s.Lower().mb_str() << ">\n" << std::flush;
-}
-
-#endif
diff --git a/eeschema/sch_sheet.h b/eeschema/sch_sheet.h
index 71678ab1e..cd8e497fe 100644
--- a/eeschema/sch_sheet.h
+++ b/eeschema/sch_sheet.h
@@ -164,10 +164,6 @@ public:
bool Load( LINE_READER& aLine, wxString& aErrorMsg ) override;
-#if defined(DEBUG)
- void Show( int nestLevel, std::ostream& os ) const override;
-#endif
-
// Geometric transforms (used in block operations):
void Move( const wxPoint& aMoveVector ) override
@@ -591,10 +587,6 @@ public:
EDA_ITEM* Clone() const override;
-#if defined(DEBUG)
- void Show( int nestLevel, std::ostream& os ) const override;
-#endif
-
protected:
/**
diff --git a/eeschema/sch_sheet_pin.cpp b/eeschema/sch_sheet_pin.cpp
index 296306739..5c8deb8a7 100644
--- a/eeschema/sch_sheet_pin.cpp
+++ b/eeschema/sch_sheet_pin.cpp
@@ -517,20 +517,3 @@ bool SCH_SHEET_PIN::HitTest( const wxPoint& aPoint, int aAccuracy ) const
return rect.Contains( aPoint );
}
-
-
-#if defined(DEBUG)
-
-void SCH_SHEET_PIN::Show( int nestLevel, std::ostream& os ) const
-{
- // XML output:
- wxString s = GetClass();
-
- NestedSpace( nestLevel, os ) << '<' << s.Lower().mb_str() << ">"
- << " pin_name=\"" << TO_UTF8( m_Text )
- << '"' << "/>\n" << std::flush;
-
-// NestedSpace( nestLevel, os ) << "</" << s.Lower().mb_str() << ">\n";
-}
-
-#endif
diff --git a/eeschema/sch_text.cpp b/eeschema/sch_text.cpp
index 2846a5232..0cbc45193 100644
--- a/eeschema/sch_text.cpp
+++ b/eeschema/sch_text.cpp
@@ -813,25 +813,6 @@ void SCH_TEXT::GetMsgPanelInfo( MSG_PANEL_ITEMS& aList )
aList.push_back( MSG_PANEL_ITEM( _( "Size" ), msg, RED ) );
}
-#if defined(DEBUG)
-
-void SCH_TEXT::Show( int nestLevel, std::ostream& os ) const
-{
- // XML output:
- wxString s = GetClass();
-
- NestedSpace( nestLevel, os ) << '<' << s.Lower().mb_str()
- << " layer=\"" << m_Layer << '"'
- << " shape=\"" << m_shape << '"'
- << " dangling=\"" << m_isDangling << '"'
- << '>'
- << TO_UTF8( m_Text )
- << "</" << s.Lower().mb_str() << ">\n";
-}
-
-#endif
-
-
SCH_LABEL::SCH_LABEL( const wxPoint& pos, const wxString& text ) :
SCH_TEXT( pos, text, SCH_LABEL_T )
{
diff --git a/eeschema/sch_text.h b/eeschema/sch_text.h
index 529ccce37..191d99769 100644
--- a/eeschema/sch_text.h
+++ b/eeschema/sch_text.h
@@ -211,10 +211,6 @@ public:
virtual EDA_ITEM* Clone() const override;
void GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ) override;
-
-#if defined(DEBUG)
- void Show( int nestLevel, std::ostream& os ) const override;
-#endif
};
diff --git a/gerbview/class_gerber_draw_item.cpp b/gerbview/class_gerber_draw_item.cpp
index 653c5c0b5..c17148a70 100644
--- a/gerbview/class_gerber_draw_item.cpp
+++ b/gerbview/class_gerber_draw_item.cpp
@@ -603,24 +603,3 @@ bool GERBER_DRAW_ITEM::HitTest( const EDA_RECT& aRefArea ) const
return false;
}
-
-
-#if defined(DEBUG)
-
-void GERBER_DRAW_ITEM::Show( int nestLevel, std::ostream& os ) const
-{
- NestedSpace( nestLevel, os ) << '<' << GetClass().Lower().mb_str() <<
-
- " shape=\"" << m_Shape << '"' <<
- " addr=\"" << std::hex << this << std::dec << '"' <<
- " layer=\"" << GetLayer() << '"' <<
- " size=\"" << m_Size << '"' <<
- " flags=\"" << m_Flags << '"' <<
- " status=\"" << GetStatus() << '"' <<
- "<start" << m_Start << "/>" <<
- "<end" << m_End << "/>";
-
- os << "</" << GetClass().Lower().mb_str() << ">\n";
-}
-
-#endif
diff --git a/gerbview/class_gerber_draw_item.h b/gerbview/class_gerber_draw_item.h
index 832528fb7..07500181b 100644
--- a/gerbview/class_gerber_draw_item.h
+++ b/gerbview/class_gerber_draw_item.h
@@ -280,10 +280,6 @@ public:
UnLink();
delete this;
}
-#if defined(DEBUG)
- void Show( int nestLevel, std::ostream& os ) const override;
-#endif
-
};
#endif /* CLASS_GERBER_DRAW_ITEM_H */
diff --git a/include/base_struct.h b/include/base_struct.h
index 5a96465b7..54d16a2ae 100644
--- a/include/base_struct.h
+++ b/include/base_struct.h
@@ -474,31 +474,6 @@ public:
/// @copydoc VIEW_ITEM::ViewGetLayers()
virtual void ViewGetLayers( int aLayers[], int& aCount ) const override;
-#if defined(DEBUG)
-
- /**
- * Function Show
- * is used to output the object tree, currently for debugging only.
- * @param nestLevel An aid to prettier tree indenting, and is the level
- * of nesting of this object within the overall tree.
- * @param os The ostream& to output to.
- */
- virtual void Show( int nestLevel, std::ostream& os ) const = 0;
- // pure virtual so compiler warns if somebody mucks up a derived declaration
-
- void ShowDummy( std::ostream& os ) const; ///< call this if you are a lazy developer
-
- /**
- * Function NestedSpace
- * outputs nested space for pretty indenting.
- * @param nestLevel The nest count
- * @param os The ostream&, where to output
- * @return std::ostream& - for continuation.
- **/
- static std::ostream& NestedSpace( int nestLevel, std::ostream& os );
-
-#endif
-
protected:
/**
* Function Matches
diff --git a/include/class_base_screen.h b/include/class_base_screen.h
index a509b6efd..f3659585a 100644
--- a/include/class_base_screen.h
+++ b/include/class_base_screen.h
@@ -499,10 +499,6 @@ public:
inline bool IsBlockActive() const { return !m_BlockLocate.IsIdle(); }
void ClearBlockCommand() { m_BlockLocate.Clear(); }
-
-#if defined(DEBUG)
- void Show( int nestLevel, std::ostream& os ) const override;
-#endif
};
#endif // CLASS_BASE_SCREEN_H_
diff --git a/include/origin_viewitem.h b/include/origin_viewitem.h
index 1e5561124..c4becd4aa 100644
--- a/include/origin_viewitem.h
+++ b/include/origin_viewitem.h
@@ -58,12 +58,6 @@ public:
aCount = 1;
}
-#if defined(DEBUG)
- void Show( int x, std::ostream& st ) const override
- {
- }
-#endif
-
/** Get class name
* @return string "ORIGIN_VIEWITEM"
*/
diff --git a/include/preview_items/bright_box.h b/include/preview_items/bright_box.h
index bb2ec9c0d..5977c5ab8 100644
--- a/include/preview_items/bright_box.h
+++ b/include/preview_items/bright_box.h
@@ -62,12 +62,6 @@ public:
aCount = 1;
}
-#if defined(DEBUG)
- void Show( int x, std::ostream& st ) const override
- {
- }
-#endif
-
/** Get class name
* @return string "BRIGHT_BOX"
*/
diff --git a/include/preview_items/ruler_item.h b/include/preview_items/ruler_item.h
index ea32d83c6..03aec5f85 100644
--- a/include/preview_items/ruler_item.h
+++ b/include/preview_items/ruler_item.h
@@ -53,13 +53,6 @@ public:
///> @copydoc EDA_ITEM::ViewDraw();
void ViewDraw( int aLayer, KIGFX::VIEW* aView ) const override final;
-
-#if defined(DEBUG)
- void Show( int x, std::ostream& st ) const override
- {
- }
-#endif
-
/**
* Get class name
* @return string "RULER_ITEM"
diff --git a/include/preview_items/simple_overlay_item.h b/include/preview_items/simple_overlay_item.h
index b2d673df7..a0cb98e1f 100644
--- a/include/preview_items/simple_overlay_item.h
+++ b/include/preview_items/simple_overlay_item.h
@@ -71,12 +71,6 @@ public:
void ViewDraw( int aLayer, KIGFX::VIEW* aView ) const override final;
-#if defined(DEBUG)
- void Show( int x, std::ostream& st ) const override
- {
- }
-#endif
-
/**
* Get class name
* @return string "SIMPLE_OVERLAY_ITEM"
diff --git a/include/worksheet_viewitem.h b/include/worksheet_viewitem.h
index efbb6d013..8d8bb72a9 100644
--- a/include/worksheet_viewitem.h
+++ b/include/worksheet_viewitem.h
@@ -119,13 +119,6 @@ public:
/// @copydoc VIEW_ITEM::ViewGetLayers()
void ViewGetLayers( int aLayers[], int& aCount ) const override;
-#if defined(DEBUG)
- /// @copydoc EDA_ITEM::Show()
- void Show( int x, std::ostream& st ) const override
- {
- }
-#endif
-
/** Get class name
* @return string "WORKSHEET_VIEWITEM"
*/
diff --git a/pagelayout_editor/pl_editor_undo_redo.cpp b/pagelayout_editor/pl_editor_undo_redo.cpp
index 387ffb2e3..148e7df43 100644
--- a/pagelayout_editor/pl_editor_undo_redo.cpp
+++ b/pagelayout_editor/pl_editor_undo_redo.cpp
@@ -53,11 +53,6 @@ public:
public:
PL_ITEM_LAYOUT() : EDA_ITEM( TYPE_PL_EDITOR_LAYOUT ) {}
- // Required to keep compiler happy on debug builds.
-#if defined(DEBUG)
- virtual void Show( int nestLevel, std::ostream& os ) const override {}
-#endif
-
/** Get class name
* @return string "PL_ITEM_LAYOUT"
*/
diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp
index d192bb2a1..8599e1a73 100644
--- a/pcbnew/basepcbframe.cpp
+++ b/pcbnew/basepcbframe.cpp
@@ -544,10 +544,6 @@ void PCB_BASE_FRAME::ProcessItemSelection( wxCommandEvent& aEvent )
BOARD_ITEM* item = (*m_Collector)[itemNdx];
m_canvas->SetAbortRequest( false );
-#if 0 && defined (DEBUG)
- item->Show( 0, std::cout );
-#endif
-
SetCurItem( item );
}
}
diff --git a/pcbnew/class_board.h b/pcbnew/class_board.h
index bff051327..37e2455b5 100644
--- a/pcbnew/class_board.h
+++ b/pcbnew/class_board.h
@@ -961,10 +961,6 @@ public:
return wxT( "BOARD" );
}
-#if defined(DEBUG)
- void Show( int nestLevel, std::ostream& os ) const override { ShowDummy( os ); }
-#endif
-
/*************************/
/* Copper Areas handling */
diff --git a/pcbnew/class_dimension.h b/pcbnew/class_dimension.h
index d6012fef8..ceff68934 100644
--- a/pcbnew/class_dimension.h
+++ b/pcbnew/class_dimension.h
@@ -230,10 +230,6 @@ public:
/// @copydoc VIEW_ITEM::ViewBBox()
virtual const BOX2I ViewBBox() const override;
-
-#if defined(DEBUG)
- virtual void Show( int nestLevel, std::ostream& os ) const override { ShowDummy( os ); }
-#endif
};
#endif // DIMENSION_H_
diff --git a/pcbnew/class_drawsegment.h b/pcbnew/class_drawsegment.h
index 37a856ccc..1a71f25ca 100644
--- a/pcbnew/class_drawsegment.h
+++ b/pcbnew/class_drawsegment.h
@@ -243,10 +243,6 @@ public:
/// @copydoc VIEW_ITEM::ViewBBox()
virtual const BOX2I ViewBBox() const override;
-
-#if defined(DEBUG)
- void Show( int nestLevel, std::ostream& os ) const override { ShowDummy( os ); }
-#endif
};
#endif // CLASS_DRAWSEGMENT_H_
diff --git a/pcbnew/class_edge_mod.h b/pcbnew/class_edge_mod.h
index 571b69240..e84c96ea0 100644
--- a/pcbnew/class_edge_mod.h
+++ b/pcbnew/class_edge_mod.h
@@ -126,11 +126,6 @@ public:
EDA_ITEM* Clone() const override;
-
-#if defined(DEBUG)
- void Show( int nestLevel, std::ostream& os ) const override { ShowDummy( os ); }
-#endif
-
wxPoint m_Start0; // Start point or center, relative to module origin, orient 0.
wxPoint m_End0; // End point, relative to module origin, orient 0.
};
diff --git a/pcbnew/class_marker_pcb.h b/pcbnew/class_marker_pcb.h
index feecfdcf0..099cc89a9 100644
--- a/pcbnew/class_marker_pcb.h
+++ b/pcbnew/class_marker_pcb.h
@@ -121,10 +121,6 @@ public:
void ViewGetLayers( int aLayers[], int& aCount ) const override;
-#if defined(DEBUG)
- void Show( int nestLevel, std::ostream& os ) const override { ShowDummy( os ); }
-#endif
-
/** Get class name
* @return string "MARKER_PCB"
*/
diff --git a/pcbnew/class_mire.h b/pcbnew/class_mire.h
index 5d419965e..b281c822d 100644
--- a/pcbnew/class_mire.h
+++ b/pcbnew/class_mire.h
@@ -103,10 +103,6 @@ public:
BITMAP_DEF GetMenuImage() const override;
EDA_ITEM* Clone() const override;
-
-#if defined(DEBUG)
- void Show( int nestLevel, std::ostream& os ) const override { ShowDummy( os ); }
-#endif
};
diff --git a/pcbnew/class_module.h b/pcbnew/class_module.h
index e64448109..05ce671d4 100644
--- a/pcbnew/class_module.h
+++ b/pcbnew/class_module.h
@@ -640,10 +640,6 @@ public:
/// Return the initial comments block or NULL if none, without transfer of ownership.
const wxArrayString* GetInitialComments() const { return m_initial_comments; }
-#if defined(DEBUG)
- virtual void Show( int nestLevel, std::ostream& os ) const override { ShowDummy( os ); }
-#endif
-
private:
DLIST<D_PAD> m_Pads; ///< Linked list of pads.
DLIST<BOARD_ITEM> m_Drawings; ///< Linked list of graphical items.
diff --git a/pcbnew/class_netinfo.h b/pcbnew/class_netinfo.h
index f77b0e30b..d0e4e87b4 100644
--- a/pcbnew/class_netinfo.h
+++ b/pcbnew/class_netinfo.h
@@ -174,12 +174,6 @@ public:
return wxT( "NETINFO_ITEM" );
}
-#if defined(DEBUG)
- void Show( int nestLevel, std::ostream& os ) const override
- {
- }
-#endif
-
const wxPoint& GetPosition() const override
{
static wxPoint dummy(0, 0);
diff --git a/pcbnew/class_pad.h b/pcbnew/class_pad.h
index 669746bd5..ed8f8ac90 100644
--- a/pcbnew/class_pad.h
+++ b/pcbnew/class_pad.h
@@ -574,11 +574,6 @@ public:
*/
void CopyNetlistSettings( D_PAD* aPad, bool aCopyLocalSettings );
-#if defined(DEBUG)
- virtual void Show( int nestLevel, std::ostream& os ) const override { ShowDummy( os ); }
-#endif
-
-
private:
/**
* Function boundingRadius
diff --git a/pcbnew/class_pcb_text.h b/pcbnew/class_pcb_text.h
index 3a2e0e54d..b9d206592 100644
--- a/pcbnew/class_pcb_text.h
+++ b/pcbnew/class_pcb_text.h
@@ -139,10 +139,6 @@ public:
const EDA_RECT GetBoundingBox() const override;
EDA_ITEM* Clone() const override;
-
-#if defined(DEBUG)
- virtual void Show( int nestLevel, std::ostream& os ) const override { ShowDummy( os ); }
-#endif
};
#endif // #define CLASS_PCB_TEXT_H
diff --git a/pcbnew/class_text_mod.h b/pcbnew/class_text_mod.h
index df07ac8a2..42e2c73ec 100644
--- a/pcbnew/class_text_mod.h
+++ b/pcbnew/class_text_mod.h
@@ -208,10 +208,6 @@ public:
/// @copydoc VIEW_ITEM::ViewGetLOD()
virtual unsigned int ViewGetLOD( int aLayer, KIGFX::VIEW* aView ) const override;
-#if defined(DEBUG)
- virtual void Show( int nestLevel, std::ostream& os ) const override { ShowDummy( os ); }
-#endif
-
private:
/* Note: orientation in 1/10 deg relative to the footprint
* Physical orient is m_Orient + m_Parent->m_Orient
diff --git a/pcbnew/class_track.h b/pcbnew/class_track.h
index a9cee7015..b22f12d41 100644
--- a/pcbnew/class_track.h
+++ b/pcbnew/class_track.h
@@ -305,7 +305,6 @@ public:
virtual unsigned int ViewGetLOD( int aLayer, KIGFX::VIEW* aView ) const override;
#if defined (DEBUG)
- virtual void Show( int nestLevel, std::ostream& os ) const override { ShowDummy( os ); }
/**
* Function ShowState
@@ -435,10 +434,6 @@ public:
virtual void Flip( const wxPoint& aCentre ) override;
-#if defined (DEBUG)
- virtual void Show( int nestLevel, std::ostream& os ) const override { ShowDummy( os ); }
-#endif
-
VIATYPE_T GetViaType() const { return m_ViaType; }
void SetViaType( VIATYPE_T aViaType ) { m_ViaType = aViaType; }
diff --git a/pcbnew/class_zone.h b/pcbnew/class_zone.h
index d4e08d288..4a8734319 100644
--- a/pcbnew/class_zone.h
+++ b/pcbnew/class_zone.h
@@ -534,12 +534,6 @@ public:
void SetDoNotAllowVias( bool aEnable ) { m_doNotAllowVias = aEnable; }
void SetDoNotAllowTracks( bool aEnable ) { m_doNotAllowTracks = aEnable; }
-#if defined(DEBUG)
- virtual void Show( int nestLevel, std::ostream& os ) const override { ShowDummy( os ); }
-#endif
-
-
-
private:
void buildFeatureHoleList( BOARD* aPcb, SHAPE_POLY_SET& aFeatures );
diff --git a/pcbnew/files.cpp b/pcbnew/files.cpp
index 4790a5785..a7a66d0ff 100644
--- a/pcbnew/files.cpp
+++ b/pcbnew/files.cpp
@@ -615,11 +615,6 @@ bool PCB_EDIT_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, in
if( draw3DFrame )
draw3DFrame->NewDisplay();
-#if 0 && defined(DEBUG)
- // Output the board object tree to stdout, but please run from command prompt:
- GetBoard()->Show( 0, std::cout );
-#endif
-
// from EDA_APPL which was first loaded BOARD only:
{
/* For an obscure reason the focus is lost after loading a board file
diff --git a/pcbnew/ratsnest_viewitem.h b/pcbnew/ratsnest_viewitem.h
index 7573e59ce..ab252e6ac 100644
--- a/pcbnew/ratsnest_viewitem.h
+++ b/pcbnew/ratsnest_viewitem.h
@@ -52,13 +52,6 @@ public:
/// @copydoc VIEW_ITEM::ViewGetLayers()
void ViewGetLayers( int aLayers[], int& aCount ) const override;
-#if defined(DEBUG)
- /// @copydoc EDA_ITEM::Show()
- void Show( int x, std::ostream& st ) const override
- {
- }
-#endif
-
/** Get class name
* @return string "RATSNEST_VIEWITEM"
*/
diff --git a/pcbnew/router/router_preview_item.h b/pcbnew/router/router_preview_item.h
index 05c3aeb4c..0839c0bb9 100644
--- a/pcbnew/router/router_preview_item.h
+++ b/pcbnew/router/router_preview_item.h
@@ -87,10 +87,6 @@ public:
m_showViaClearance = aEnabled;
}
-#if defined(DEBUG)
- void Show( int aA, std::ostream& aB ) const override {}
-#endif
-
/** Get class name
* @return string "ROUTER_PREVIEW_ITEM"
*/
diff --git a/pcbnew/tools/edit_points.h b/pcbnew/tools/edit_points.h
index dab5d7824..19af777e8 100644
--- a/pcbnew/tools/edit_points.h
+++ b/pcbnew/tools/edit_points.h
@@ -505,12 +505,6 @@ public:
aLayers[0] = ITEM_GAL_LAYER( GP_OVERLAY );
}
-#if defined(DEBUG)
- void Show( int x, std::ostream& st ) const override
- {
- }
-#endif
-
/** Get class name
* @return string "EDIT_POINTS"
*/
diff --git a/tools/container_test.cpp b/tools/container_test.cpp
index 3b65dad7c..68d78aee4 100644
--- a/tools/container_test.cpp
+++ b/tools/container_test.cpp
@@ -20,14 +20,6 @@ public:
MY_ITEM( KICAD_T id ) :
EDA_ITEM( id )
{}
-
-
-#if defined(DEBUG)
- void Show( int nestLevel, std::ostream& os ) const
- {
- ShowDummy( os );
- }
-#endif
};
References