fix EDA_ITEM::Show() prototype bug, fix KICAD_PLUGIN::Save() problem with netclasses.
This commit is contained in:
parent
02bb2111e2
commit
463c17b807
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -142,7 +142,7 @@ public:
|
|||
*/
|
||||
|
||||
#if defined(DEBUG)
|
||||
void Show( std::ostream& out, int ndx );
|
||||
void Show( std::ostream& out, int ndx ) const; // override
|
||||
#endif
|
||||
|
||||
NETLIST_OBJECT();
|
||||
|
|
|
@ -416,6 +416,10 @@ public:
|
|||
|
||||
FILL_T GetFillMode() const { return m_Fill; }
|
||||
|
||||
#if defined(DEBUG)
|
||||
void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override
|
||||
#endif
|
||||
|
||||
protected:
|
||||
|
||||
/**
|
||||
|
|
|
@ -2163,7 +2163,7 @@ bool LIB_PIN::Matches( wxFindReplaceData& aSearchData, void* aAuxData, wxPoint*
|
|||
|
||||
#if defined(DEBUG)
|
||||
|
||||
void LIB_PIN::Show( int nestLevel, std::ostream& os )
|
||||
void LIB_PIN::Show( int nestLevel, std::ostream& os ) const
|
||||
{
|
||||
NestedSpace( nestLevel, os ) << '<' << GetClass().Lower().mb_str()
|
||||
<< " num=\"" << GetNumberString().mb_str()
|
||||
|
|
|
@ -134,7 +134,7 @@ public:
|
|||
}
|
||||
|
||||
#if defined(DEBUG)
|
||||
void Show( int nestLevel, std::ostream& os ); // virtual override
|
||||
void Show( int nestLevel, std::ostream& os ) const; // virtual override
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
|
|
@ -123,7 +123,7 @@ bool LIB_TEXT::Load( LINE_READER& aLineReader, wxString& errorMsg )
|
|||
}
|
||||
else
|
||||
{
|
||||
cnt = sscanf( line + 2, "%d %d %d %d %d %d %d %s %s %d %c %c",
|
||||
cnt = sscanf( line + 2, "%lf %d %d %d %d %d %d %s %s %d %c %c",
|
||||
&angle, &m_Pos.x, &m_Pos.y, &m_Size.x, &m_Attributs,
|
||||
&m_Unit, &m_Convert, buf, tmp, &thickness, &hjustify,
|
||||
&vjustify );
|
||||
|
|
|
@ -251,7 +251,7 @@ bool SCH_BITMAP::IsSelectStateChanged( const wxRect& aRect )
|
|||
|
||||
|
||||
#if defined(DEBUG)
|
||||
void SCH_BITMAP::Show( int nestLevel, std::ostream& os )
|
||||
void SCH_BITMAP::Show( int nestLevel, std::ostream& os ) const
|
||||
{
|
||||
// XML output:
|
||||
wxString s = GetClass();
|
||||
|
|
|
@ -161,7 +161,7 @@ public:
|
|||
virtual BITMAP_DEF GetMenuImage() const { return image_xpm; }
|
||||
|
||||
#if defined(DEBUG)
|
||||
void Show( int nestLevel, std::ostream& os );
|
||||
void Show( int nestLevel, std::ostream& os ) const; // override
|
||||
#endif
|
||||
|
||||
private:
|
||||
|
|
|
@ -148,6 +148,10 @@ public:
|
|||
|
||||
virtual BITMAP_DEF GetMenuImage() const { return add_entry_xpm; }
|
||||
|
||||
#if defined(DEBUG)
|
||||
void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override
|
||||
#endif
|
||||
|
||||
private:
|
||||
virtual bool doHitTest( const wxPoint& aPoint, int aAccuracy ) const;
|
||||
virtual bool doHitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const;
|
||||
|
|
|
@ -380,7 +380,7 @@ void SCH_COMPONENT::AddHierarchicalReference( const wxString& aPath,
|
|||
}
|
||||
|
||||
|
||||
wxString SCH_COMPONENT::GetPath( SCH_SHEET_PATH* sheet )
|
||||
wxString SCH_COMPONENT::GetPath( const SCH_SHEET_PATH* sheet ) const
|
||||
{
|
||||
wxCHECK_MSG( sheet != NULL, wxEmptyString,
|
||||
wxT( "Cannot get component path with invalid sheet object." ) );
|
||||
|
@ -392,7 +392,7 @@ wxString SCH_COMPONENT::GetPath( SCH_SHEET_PATH* sheet )
|
|||
}
|
||||
|
||||
|
||||
const wxString SCH_COMPONENT::GetRef( SCH_SHEET_PATH* sheet )
|
||||
const wxString SCH_COMPONENT::GetRef( const SCH_SHEET_PATH* sheet )
|
||||
{
|
||||
wxString path = GetPath( sheet );
|
||||
wxString h_path, h_ref;
|
||||
|
@ -454,7 +454,7 @@ bool SCH_COMPONENT::IsReferenceStringValid( const wxString & aReferenceString )
|
|||
}
|
||||
|
||||
|
||||
void SCH_COMPONENT::SetRef( SCH_SHEET_PATH* sheet, const wxString& ref )
|
||||
void SCH_COMPONENT::SetRef( const SCH_SHEET_PATH* sheet, const wxString& ref )
|
||||
{
|
||||
wxString path = GetPath( sheet );
|
||||
|
||||
|
@ -929,7 +929,7 @@ wxPoint SCH_COMPONENT::GetScreenCoord( const wxPoint& aPoint )
|
|||
|
||||
#if defined(DEBUG)
|
||||
|
||||
void SCH_COMPONENT::Show( int nestLevel, std::ostream& os )
|
||||
void SCH_COMPONENT::Show( int nestLevel, std::ostream& os ) const
|
||||
{
|
||||
// for now, make it look like XML:
|
||||
NestedSpace( nestLevel, os ) << '<' << GetClass().Lower().mb_str()
|
||||
|
|
|
@ -287,7 +287,7 @@ public:
|
|||
virtual void SwapData( SCH_ITEM* aItem );
|
||||
|
||||
// returns a unique ID, in the form of a path.
|
||||
wxString GetPath( SCH_SHEET_PATH* sheet );
|
||||
wxString GetPath( const SCH_SHEET_PATH* sheet ) const;
|
||||
|
||||
/**
|
||||
* Function IsReferenceStringValid (static)
|
||||
|
@ -303,12 +303,12 @@ public:
|
|||
* Function GetRef
|
||||
* returns the reference, for the given sheet path.
|
||||
*/
|
||||
const wxString GetRef( SCH_SHEET_PATH* sheet );
|
||||
const wxString GetRef( const SCH_SHEET_PATH* sheet );
|
||||
|
||||
/**
|
||||
* Set the reference, for the given sheet path.
|
||||
*/
|
||||
void SetRef( SCH_SHEET_PATH* sheet, const wxString& ref );
|
||||
void SetRef( const SCH_SHEET_PATH* sheet, const wxString& ref );
|
||||
|
||||
/**
|
||||
* Function AddHierarchicalReference
|
||||
|
@ -407,16 +407,7 @@ public:
|
|||
virtual bool IsReplaceable() const { return true; }
|
||||
|
||||
#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.
|
||||
*/
|
||||
void Show( int nestLevel, std::ostream& os );
|
||||
|
||||
void Show( int nestLevel, std::ostream& os ) const; // override
|
||||
#endif
|
||||
|
||||
private:
|
||||
|
|
|
@ -219,6 +219,10 @@ public:
|
|||
*/
|
||||
virtual bool IsReplaceable() const { return true; }
|
||||
|
||||
#if defined(DEBUG)
|
||||
void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override
|
||||
#endif
|
||||
|
||||
private:
|
||||
virtual bool doHitTest( const wxPoint& aPoint, int aAccuracy ) const;
|
||||
virtual bool doHitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const;
|
||||
|
|
|
@ -203,7 +203,7 @@ void SCH_JUNCTION::GetNetListItem( vector<NETLIST_OBJECT*>& aNetListItems,
|
|||
|
||||
|
||||
#if defined(DEBUG)
|
||||
void SCH_JUNCTION::Show( int nestLevel, std::ostream& os )
|
||||
void SCH_JUNCTION::Show( int nestLevel, std::ostream& os ) const
|
||||
{
|
||||
// XML output:
|
||||
wxString s = GetClass();
|
||||
|
|
|
@ -122,7 +122,7 @@ public:
|
|||
SCH_SHEET_PATH* aSheetPath );
|
||||
|
||||
#if defined(DEBUG)
|
||||
void Show( int nestLevel, std::ostream& os );
|
||||
void Show( int nestLevel, std::ostream& os ) const; // override
|
||||
#endif
|
||||
|
||||
private:
|
||||
|
|
|
@ -173,7 +173,7 @@ public:
|
|||
virtual bool operator <( const SCH_ITEM& aItem ) const;
|
||||
|
||||
#if defined(DEBUG)
|
||||
void Show( int nestLevel, std::ostream& os ) const;
|
||||
void Show( int nestLevel, std::ostream& os ) const; // override
|
||||
#endif
|
||||
|
||||
private:
|
||||
|
|
|
@ -63,14 +63,7 @@ EDA_ITEM* SCH_MARKER::doClone() const
|
|||
|
||||
#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.
|
||||
*/
|
||||
void SCH_MARKER::Show( int nestLevel, std::ostream& os )
|
||||
void SCH_MARKER::Show( int nestLevel, std::ostream& os ) const
|
||||
{
|
||||
// for now, make it look like XML:
|
||||
NestedSpace( nestLevel, os ) << '<' << GetClass().Lower().mb_str()
|
||||
|
|
|
@ -28,8 +28,8 @@
|
|||
* @brief SCH_MARKER class definition.
|
||||
*/
|
||||
|
||||
#ifndef _TYPE_SCH_MARKER_H_
|
||||
#define _TYPE_SCH_MARKER_H_
|
||||
#ifndef TYPE_SCH_MARKER_H_
|
||||
#define TYPE_SCH_MARKER_H_
|
||||
|
||||
#include "sch_item_struct.h"
|
||||
#include "class_marker_base.h"
|
||||
|
@ -128,8 +128,7 @@ public:
|
|||
virtual BITMAP_DEF GetMenuImage() const { return erc_xpm; }
|
||||
|
||||
#if defined(DEBUG)
|
||||
void Show( int nestLevel, std::ostream& os );
|
||||
|
||||
void Show( int nestLevel, std::ostream& os ) const; // override
|
||||
#endif
|
||||
|
||||
virtual bool doHitTest( const wxPoint& aPoint, int aAccuracy ) const;
|
||||
|
@ -138,4 +137,4 @@ public:
|
|||
virtual void doSetPosition( const wxPoint& aPosition ) { m_Pos = aPosition; }
|
||||
};
|
||||
|
||||
#endif /* _TYPE_SCH_MARKER_H_ */
|
||||
#endif // TYPE_SCH_MARKER_H_
|
||||
|
|
|
@ -126,6 +126,10 @@ public:
|
|||
virtual void GetNetListItem( vector<NETLIST_OBJECT*>& aNetListItems,
|
||||
SCH_SHEET_PATH* aSheetPath );
|
||||
|
||||
#if defined(DEBUG)
|
||||
void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override
|
||||
#endif
|
||||
|
||||
private:
|
||||
virtual bool doIsConnected( const wxPoint& aPosition ) const;
|
||||
virtual bool doHitTest( const wxPoint& aPoint, int aAccuracy ) const;
|
||||
|
|
|
@ -154,6 +154,10 @@ public:
|
|||
return m_points[ aIndex ];
|
||||
}
|
||||
|
||||
#if defined(DEBUG)
|
||||
void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override
|
||||
#endif
|
||||
|
||||
private:
|
||||
virtual bool doHitTest( const wxPoint& aPoint, int aAccuracy ) const;
|
||||
virtual bool doHitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const;
|
||||
|
|
|
@ -1207,7 +1207,7 @@ void SCH_SHEET::doPlot( PLOTTER* aPlotter )
|
|||
|
||||
#if defined(DEBUG)
|
||||
|
||||
void SCH_SHEET::Show( int nestLevel, std::ostream& os )
|
||||
void SCH_SHEET::Show( int nestLevel, std::ostream& os ) const
|
||||
{
|
||||
// XML output:
|
||||
wxString s = GetClass();
|
||||
|
@ -1216,7 +1216,7 @@ void SCH_SHEET::Show( int nestLevel, std::ostream& os )
|
|||
<< TO_UTF8( m_name ) << '"' << ">\n";
|
||||
|
||||
// show all the pins, and check the linked list integrity
|
||||
BOOST_FOREACH( SCH_SHEET_PIN& label, m_pins )
|
||||
BOOST_FOREACH( const SCH_SHEET_PIN& label, m_pins )
|
||||
{
|
||||
label.Show( nestLevel + 1, os );
|
||||
}
|
||||
|
|
|
@ -170,10 +170,7 @@ public:
|
|||
virtual bool Load( LINE_READER& aLine, wxString& aErrorMsg );
|
||||
|
||||
#if defined(DEBUG)
|
||||
|
||||
// comment inherited by Doxygen from Base_Struct
|
||||
void Show( int nestLevel, std::ostream& os );
|
||||
|
||||
void Show( int nestLevel, std::ostream& os ) const; // override
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@ -633,10 +630,7 @@ public:
|
|||
SCH_SHEET_PATH* aSheetPath );
|
||||
|
||||
#if defined(DEBUG)
|
||||
|
||||
// comment inherited by Doxygen from Base_Struct
|
||||
void Show( int nestLevel, std::ostream& os );
|
||||
|
||||
void Show( int nestLevel, std::ostream& os ) const; // override
|
||||
#endif
|
||||
|
||||
protected:
|
||||
|
|
|
@ -531,7 +531,7 @@ bool SCH_SHEET_PIN::doHitTest( const wxPoint& aPoint, int aAccuracy ) const
|
|||
|
||||
#if defined(DEBUG)
|
||||
|
||||
void SCH_SHEET_PIN::Show( int nestLevel, std::ostream& os )
|
||||
void SCH_SHEET_PIN::Show( int nestLevel, std::ostream& os ) const
|
||||
{
|
||||
// XML output:
|
||||
wxString s = GetClass();
|
||||
|
|
|
@ -732,7 +732,7 @@ void SCH_TEXT::doPlot( PLOTTER* aPlotter )
|
|||
|
||||
#if defined(DEBUG)
|
||||
|
||||
void SCH_TEXT::Show( int nestLevel, std::ostream& os )
|
||||
void SCH_TEXT::Show( int nestLevel, std::ostream& os ) const
|
||||
{
|
||||
// XML output:
|
||||
wxString s = GetClass();
|
||||
|
|
|
@ -239,7 +239,7 @@ public:
|
|||
SCH_SHEET_PATH* aSheetPath );
|
||||
|
||||
#if defined(DEBUG)
|
||||
void Show( int nestLevel, std::ostream& os );
|
||||
void Show( int nestLevel, std::ostream& os ) const; // override
|
||||
#endif
|
||||
|
||||
private:
|
||||
|
|
|
@ -633,7 +633,7 @@ bool GERBER_DRAW_ITEM::HitTest( EDA_RECT& aRefArea )
|
|||
|
||||
#if defined(DEBUG)
|
||||
|
||||
void GERBER_DRAW_ITEM::Show( int nestLevel, std::ostream& os )
|
||||
void GERBER_DRAW_ITEM::Show( int nestLevel, std::ostream& os ) const
|
||||
{
|
||||
NestedSpace( nestLevel, os ) << '<' << GetClass().Lower().mb_str() <<
|
||||
|
||||
|
|
|
@ -270,7 +270,6 @@ public:
|
|||
return wxT( "GERBER_DRAW_ITEM" );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function Save.
|
||||
* currently: no nothing, but must be defined to meet requirements
|
||||
|
@ -279,17 +278,9 @@ public:
|
|||
bool Save( FILE* aFile ) const;
|
||||
|
||||
#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 );
|
||||
|
||||
void Show( int nestLevel, std::ostream& os ) const; // override
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
#endif /* CLASS_GERBER_DRAW_ITEM_H */
|
||||
|
|
|
@ -705,8 +705,10 @@ public:
|
|||
* 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;
|
||||
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
|
||||
|
|
|
@ -143,6 +143,10 @@ public:
|
|||
* and clears the selected item list.
|
||||
*/
|
||||
void Clear();
|
||||
|
||||
#if defined(DEBUG)
|
||||
void Show( int nestLevel, std::ostream& os ) const {} // override
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -28,8 +28,8 @@
|
|||
* @brief BASE_SCREEN class implementation.
|
||||
*/
|
||||
|
||||
#ifndef __CLASS_BASE_SCREEN_H__
|
||||
#define __CLASS_BASE_SCREEN_H__
|
||||
#ifndef CLASS_BASE_SCREEN_H_
|
||||
#define CLASS_BASE_SCREEN_H_
|
||||
|
||||
#include "base_struct.h"
|
||||
#include "class_undoredo_container.h"
|
||||
|
@ -469,18 +469,9 @@ public:
|
|||
}
|
||||
|
||||
#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.
|
||||
*/
|
||||
void Show( int nestLevel, std::ostream& os );
|
||||
|
||||
void Show( int nestLevel, std::ostream& os ) const; // overload
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
#endif /* #ifndef __CLASS_BASE_SCREEN_H__ */
|
||||
#endif // CLASS_BASE_SCREEN_H_
|
||||
|
|
|
@ -2150,57 +2150,46 @@ TRACK* BOARD::CreateLockPoint( wxPoint& aPosition, TRACK* aSegment, PICKED_ITEMS
|
|||
|
||||
#if defined(DEBUG)
|
||||
|
||||
void BOARD::Show( int nestLevel, std::ostream& os )
|
||||
void BOARD::Show( int nestLevel, std::ostream& os ) const
|
||||
{
|
||||
BOARD_ITEM* p;
|
||||
|
||||
// for now, make it look like XML:
|
||||
NestedSpace( nestLevel,
|
||||
os ) << '<' << GetClass().Lower().mb_str() << ">\n";
|
||||
NestedSpace( nestLevel, os ) << '<' << GetClass().Lower().mb_str() << ">\n";
|
||||
|
||||
// specialization of the output:
|
||||
NestedSpace( nestLevel + 1, os ) << "<modules>\n";
|
||||
p = m_Modules;
|
||||
|
||||
for( ; p; p = p->Next() )
|
||||
p->Show( nestLevel + 2, os );
|
||||
|
||||
NestedSpace( nestLevel + 1, os ) << "</modules>\n";
|
||||
|
||||
NestedSpace( nestLevel + 1, os ) << "<pdrawings>\n";
|
||||
p = m_Drawings;
|
||||
|
||||
for( ; p; p = p->Next() )
|
||||
p->Show( nestLevel + 2, os );
|
||||
|
||||
NestedSpace( nestLevel + 1, os ) << "</pdrawings>\n";
|
||||
|
||||
NestedSpace( nestLevel + 1, os ) << "<tracks>\n";
|
||||
p = m_Track;
|
||||
|
||||
for( ; p; p = p->Next() )
|
||||
p->Show( nestLevel + 2, os );
|
||||
|
||||
NestedSpace( nestLevel + 1, os ) << "</tracks>\n";
|
||||
|
||||
NestedSpace( nestLevel + 1, os ) << "<zones>\n";
|
||||
p = m_Zone;
|
||||
|
||||
for( ; p; p = p->Next() )
|
||||
p->Show( nestLevel + 2, os );
|
||||
|
||||
NestedSpace( nestLevel + 1, os ) << "</zones>\n";
|
||||
|
||||
/*
|
||||
* NestedSpace( nestLevel+1, os ) << "<zone_container>\n";
|
||||
* for( ZONE_CONTAINERS::iterator i=m_ZoneDescriptorList.begin();
|
||||
* i!=m_ZoneDescriptorList.end(); ++i )
|
||||
* (*i)->Show( nestLevel+2, os );
|
||||
* NestedSpace( nestLevel+1, os ) << "</zone_container>\n";
|
||||
*/
|
||||
NestedSpace( nestLevel+1, os ) << "<zone_containers>\n";
|
||||
for( ZONE_CONTAINERS::const_iterator it = m_ZoneDescriptorList.begin();
|
||||
it != m_ZoneDescriptorList.end(); ++it )
|
||||
(*it)->Show( nestLevel+2, os );
|
||||
|
||||
NestedSpace( nestLevel+1, os ) << "</zone_containers>\n";
|
||||
|
||||
p = (BOARD_ITEM*) m_Son;
|
||||
|
||||
for( ; p; p = p->Next() )
|
||||
{
|
||||
p->Show( nestLevel + 1, os );
|
||||
|
|
|
@ -881,16 +881,7 @@ public:
|
|||
}
|
||||
|
||||
#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.
|
||||
*/
|
||||
void Show( int nestLevel, std::ostream& os );
|
||||
|
||||
void Show( int nestLevel, std::ostream& os ) const; // overload
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -155,6 +155,11 @@ public:
|
|||
virtual wxString GetSelectMenuText() const;
|
||||
|
||||
virtual BITMAP_DEF GetMenuImage() const { return add_dimension_xpm; }
|
||||
|
||||
#if defined(DEBUG)
|
||||
void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
#endif // DIMENSION_H_
|
||||
|
|
|
@ -501,14 +501,7 @@ wxString DRAWSEGMENT::GetSelectMenuText() const
|
|||
|
||||
|
||||
#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.
|
||||
*/
|
||||
void DRAWSEGMENT::Show( int nestLevel, std::ostream& os )
|
||||
void DRAWSEGMENT::Show( int nestLevel, std::ostream& os ) const
|
||||
{
|
||||
NestedSpace( nestLevel, os ) << '<' << GetClass().Lower().mb_str() <<
|
||||
|
||||
|
|
|
@ -245,7 +245,7 @@ public:
|
|||
virtual BITMAP_DEF GetMenuImage() const { return add_dashed_line_xpm; }
|
||||
|
||||
#if defined(DEBUG)
|
||||
void Show( int nestLevel, std::ostream& os );
|
||||
void Show( int nestLevel, std::ostream& os ) const; // overload
|
||||
#endif
|
||||
};
|
||||
|
||||
|
|
|
@ -248,14 +248,7 @@ wxString EDGE_MODULE::GetSelectMenuText() const
|
|||
|
||||
#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.
|
||||
*/
|
||||
void EDGE_MODULE::Show( int nestLevel, std::ostream& os )
|
||||
void EDGE_MODULE::Show( int nestLevel, std::ostream& os ) const
|
||||
{
|
||||
wxString shape = ShowShape( (STROKE_T) m_Shape );
|
||||
|
||||
|
|
|
@ -81,16 +81,7 @@ public:
|
|||
virtual BITMAP_DEF GetMenuImage() const { return show_mod_edge_xpm; }
|
||||
|
||||
#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 );
|
||||
|
||||
void Show( int nestLevel, std::ostream& os ) const; // overload
|
||||
#endif
|
||||
};
|
||||
|
||||
|
|
|
@ -118,7 +118,10 @@ public:
|
|||
virtual wxString GetSelectMenuText() const;
|
||||
|
||||
virtual BITMAP_DEF GetMenuImage() const { return drc_xpm; }
|
||||
|
||||
#if defined(DEBUG)
|
||||
void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
#endif // CLASS_MARKER_PCB_H
|
||||
|
|
|
@ -112,6 +112,10 @@ public:
|
|||
virtual wxString GetSelectMenuText() const;
|
||||
|
||||
virtual BITMAP_DEF GetMenuImage() const { return add_mires_xpm; }
|
||||
|
||||
#if defined(DEBUG)
|
||||
void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -565,14 +565,7 @@ wxString MODULE::GetSelectMenuText() const
|
|||
|
||||
#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.
|
||||
*/
|
||||
void MODULE::Show( int nestLevel, std::ostream& os )
|
||||
void MODULE::Show( int nestLevel, std::ostream& os ) const
|
||||
{
|
||||
BOARD* board = GetBoard();
|
||||
|
||||
|
|
|
@ -375,16 +375,7 @@ public:
|
|||
virtual BITMAP_DEF GetMenuImage() const { return module_xpm; }
|
||||
|
||||
#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 );
|
||||
|
||||
void Show( int nestLevel, std::ostream& os ) const; // overload
|
||||
#endif
|
||||
};
|
||||
|
||||
|
|
|
@ -263,7 +263,7 @@ void BOARD::SynchronizeNetsAndNetClasses()
|
|||
|
||||
#if defined(DEBUG)
|
||||
|
||||
void NETCLASS::Show( int nestLevel, std::ostream& os )
|
||||
void NETCLASS::Show( int nestLevel, std::ostream& os ) const
|
||||
{
|
||||
// for now, make it look like XML:
|
||||
//NestedSpace( nestLevel, os )
|
||||
|
|
|
@ -213,16 +213,7 @@ public:
|
|||
bool ReadDescr( LINE_READER* aReader );
|
||||
|
||||
#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.
|
||||
*/
|
||||
void Show( int nestLevel, std::ostream& os );
|
||||
|
||||
void Show( int nestLevel, std::ostream& os ) const; // overload
|
||||
#endif
|
||||
};
|
||||
|
||||
|
|
|
@ -721,14 +721,7 @@ wxString D_PAD::GetSelectMenuText() const
|
|||
|
||||
#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.
|
||||
*/
|
||||
void D_PAD::Show( int nestLevel, std::ostream& os )
|
||||
void D_PAD::Show( int nestLevel, std::ostream& os ) const
|
||||
{
|
||||
char padname[5] = { m_Padname[0], m_Padname[1], m_Padname[2], m_Padname[3], 0 };
|
||||
|
||||
|
|
|
@ -447,16 +447,7 @@ public:
|
|||
wxString ShowPadAttr() const;
|
||||
|
||||
#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 );
|
||||
|
||||
void Show( int nestLevel, std::ostream& os ) const; // overload
|
||||
#endif
|
||||
};
|
||||
|
||||
|
|
|
@ -161,14 +161,7 @@ wxString TEXTE_PCB::GetSelectMenuText() const
|
|||
|
||||
#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.
|
||||
*/
|
||||
void TEXTE_PCB::Show( int nestLevel, std::ostream& os )
|
||||
void TEXTE_PCB::Show( int nestLevel, std::ostream& os ) const
|
||||
{
|
||||
// for now, make it look like XML:
|
||||
NestedSpace( nestLevel, os ) << '<' << GetClass().Lower().mb_str() <<
|
||||
|
|
|
@ -138,14 +138,7 @@ public:
|
|||
virtual EDA_RECT GetBoundingBox() const { return GetTextBox(); };
|
||||
|
||||
#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 );
|
||||
void Show( int nestLevel, std::ostream& os ) const;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
|
|
@ -454,14 +454,7 @@ wxString TEXTE_MODULE::GetSelectMenuText() const
|
|||
|
||||
#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.
|
||||
*/
|
||||
void TEXTE_MODULE::Show( int nestLevel, std::ostream& os )
|
||||
void TEXTE_MODULE::Show( int nestLevel, std::ostream& os ) const
|
||||
{
|
||||
// for now, make it look like XML:
|
||||
NestedSpace( nestLevel, os ) << '<' << GetClass().Lower().mb_str() <<
|
||||
|
@ -471,5 +464,4 @@ void TEXTE_MODULE::Show( int nestLevel, std::ostream& os )
|
|||
// << ">\n";
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
*/
|
||||
|
||||
|
||||
#ifndef TEXT_MODULE_H
|
||||
#define TEXT_MODULE_H
|
||||
#ifndef TEXT_MODULE_H_
|
||||
#define TEXT_MODULE_H_
|
||||
|
||||
|
||||
#include "class_board_item.h"
|
||||
|
@ -188,17 +188,8 @@ public:
|
|||
virtual BITMAP_DEF GetMenuImage() const { return footprint_text_xpm; }
|
||||
|
||||
#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 );
|
||||
|
||||
void Show( int nestLevel, std::ostream& os ) const; // overload
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif // TEXT_MODULE_H
|
||||
#endif // TEXT_MODULE_H_
|
||||
|
|
|
@ -1569,7 +1569,7 @@ wxString TRACK::GetSelectMenuText() const
|
|||
|
||||
#if defined(DEBUG)
|
||||
|
||||
void TRACK::Show( int nestLevel, std::ostream& os )
|
||||
void TRACK::Show( int nestLevel, std::ostream& os ) const
|
||||
{
|
||||
NestedSpace( nestLevel, os ) << '<' << GetClass().Lower().mb_str() <<
|
||||
|
||||
|
@ -1589,7 +1589,7 @@ void TRACK::Show( int nestLevel, std::ostream& os )
|
|||
}
|
||||
|
||||
|
||||
void SEGVIA::Show( int nestLevel, std::ostream& os )
|
||||
void SEGVIA::Show( int nestLevel, std::ostream& os ) const
|
||||
{
|
||||
const char* cp;
|
||||
|
||||
|
|
|
@ -386,15 +386,7 @@ public:
|
|||
|
||||
#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.
|
||||
*/
|
||||
void Show( int nestLevel, std::ostream& os );
|
||||
|
||||
void Show( int nestLevel, std::ostream& os ) const; // overload
|
||||
|
||||
/**
|
||||
* Function ShowState
|
||||
|
@ -497,16 +489,7 @@ public:
|
|||
virtual BITMAP_DEF GetMenuImage() const { return via_sketch_xpm; }
|
||||
|
||||
#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.
|
||||
*/
|
||||
void Show( int nestLevel, std::ostream& os );
|
||||
|
||||
void Show( int nestLevel, std::ostream& os ) const; // overload
|
||||
#endif
|
||||
};
|
||||
|
||||
|
|
|
@ -496,6 +496,10 @@ public:
|
|||
virtual wxString GetSelectMenuText() const;
|
||||
|
||||
virtual BITMAP_DEF GetMenuImage() const { return add_zone_xpm; }
|
||||
|
||||
#if defined(DEBUG)
|
||||
void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -446,8 +446,21 @@ bool PCB_EDIT_FRAME::SavePcbFile( const wxString& aFileName, bool aCreateBackupF
|
|||
}
|
||||
}
|
||||
|
||||
#if !defined(USE_NEW_PCBNEW_SAVE)
|
||||
#if defined(USE_NEW_PCBNEW_SAVE)
|
||||
|
||||
try
|
||||
{
|
||||
IO_MGR::Save( IO_MGR::KICAD, pcbFileName.GetFullPath(), GetBoard(), NULL );
|
||||
}
|
||||
catch( IO_ERROR ioe )
|
||||
{
|
||||
wxString msg = wxString::Format( _( "Error loading board.\n%s" ),
|
||||
ioe.errorText.GetData() );
|
||||
wxMessageBox( msg, _( "Save Board File" ), wxICON_ERROR );
|
||||
saveok = false;
|
||||
}
|
||||
|
||||
#else
|
||||
// Create the file
|
||||
FILE* dest;
|
||||
dest = wxFopen( pcbFileName.GetFullPath(), wxT( "wt" ) );
|
||||
|
@ -468,22 +481,6 @@ bool PCB_EDIT_FRAME::SavePcbFile( const wxString& aFileName, bool aCreateBackupF
|
|||
fclose( dest );
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
try
|
||||
{
|
||||
IO_MGR::Save( IO_MGR::KICAD, pcbFileName.GetFullPath(), GetBoard(), NULL ); // overload
|
||||
}
|
||||
catch( IO_ERROR ioe )
|
||||
{
|
||||
wxString msg = wxString::Format( _( "Error loading board.\n%s" ),
|
||||
ioe.errorText.GetData() );
|
||||
|
||||
wxMessageBox( msg, _( "Save Board File" ), wxICON_ERROR );
|
||||
|
||||
saveok = false;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* Display the file names: */
|
||||
|
|
|
@ -191,6 +191,9 @@ BOARD* KICAD_PLUGIN::Load( const wxString& aFileName, BOARD* aAppendToMe, PROPER
|
|||
|
||||
m_reader = &reader; // member function accessibility
|
||||
|
||||
m_board->m_Status_Pcb = 0;
|
||||
m_board->m_NetClasses.Clear();
|
||||
|
||||
init( aProperties );
|
||||
|
||||
checkVersion();
|
||||
|
@ -2567,9 +2570,6 @@ void KICAD_PLUGIN::init( PROPERTIES* aProperties )
|
|||
#else
|
||||
diskToBiu = 1.0; // BIUs are deci-mils
|
||||
#endif
|
||||
|
||||
m_board->m_Status_Pcb = 0;
|
||||
m_board->m_NetClasses.Clear();
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue