Commit c3e3ff36 authored by unknown's avatar unknown Committed by jean-pierre charras

Minot fixes: Minor coding style issues fix (tab -> spaces). Add missing...

Minot fixes: Minor coding style issues fix (tab -> spaces). Add missing GetClass to all classes derived from EDA_ITEM. Make debug method Show() only compiled in debug mode.
parent 02c8d4db
...@@ -65,6 +65,14 @@ public: ...@@ -65,6 +65,14 @@ public:
#if defined(DEBUG) #if defined(DEBUG)
void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override
#endif #endif
/** Get class name
* @return string "S3D_MATERIAL"
*/
virtual wxString GetClass() const
{
return wxT( "S3D_MATERIAL" );
}
}; };
void SetOpenGlDefaultMaterial(); void SetOpenGlDefaultMaterial();
......
...@@ -176,6 +176,14 @@ public: ...@@ -176,6 +176,14 @@ public:
return m_Shape3DName; return m_Shape3DName;
} }
/** Get class name
* @return string "S3D_MASTER"
*/
virtual wxString GetClass() const
{
return wxT( "S3D_MASTER" );
}
/** /**
* Function GetShape3DFullFilename * Function GetShape3DFullFilename
* @return the full filename of the 3D shape, * @return the full filename of the 3D shape,
......
...@@ -60,7 +60,7 @@ private: ...@@ -60,7 +60,7 @@ private:
void OnPageSetup( wxCommandEvent& event ); void OnPageSetup( wxCommandEvent& event );
void OnPrintPreview( wxCommandEvent& event ); void OnPrintPreview( wxCommandEvent& event );
void OnPrintButtonClick( wxCommandEvent& event ); void OnPrintButtonClick( wxCommandEvent& event );
void OnButtonCancelClick( wxCommandEvent& event ){ Close(); } void OnButtonCancelClick( wxCommandEvent& event ) { Close(); }
void GetPrintOptions(); void GetPrintOptions();
}; };
......
...@@ -386,10 +386,7 @@ public: ...@@ -386,10 +386,7 @@ public:
* returns the class name. * returns the class name.
* @return wxString * @return wxString
*/ */
virtual wxString GetClass() const virtual wxString GetClass() const = 0;
{
return wxT( "EDA_ITEM" );
}
/** /**
* Function GetSelectMenuText * Function GetSelectMenuText
......
...@@ -123,10 +123,20 @@ public: ...@@ -123,10 +123,20 @@ public:
/// @copydoc VIEW_ITEM::ViewGetLayers() /// @copydoc VIEW_ITEM::ViewGetLayers()
void ViewGetLayers( int aLayers[], int& aCount ) const; void ViewGetLayers( int aLayers[], int& aCount ) const;
#if defined(DEBUG)
/// @copydoc EDA_ITEM::Show() /// @copydoc EDA_ITEM::Show()
void Show( int x, std::ostream& st ) const void Show( int x, std::ostream& st ) const
{ {
} }
#endif
/** Get class name
* @return string "WORKSHEET_VIEWITEM"
*/
virtual wxString GetClass() const
{
return wxT( "WORKSHEET_VIEWITEM" );
}
protected: protected:
/// File name displayed in the title block /// File name displayed in the title block
......
...@@ -57,6 +57,14 @@ public: ...@@ -57,6 +57,14 @@ public:
#if defined(DEBUG) #if defined(DEBUG)
virtual void Show( int nestLevel, std::ostream& os ) const {} virtual void Show( int nestLevel, std::ostream& os ) const {}
#endif #endif
/** Get class name
* @return string "PL_ITEM_LAYOUT"
*/
virtual wxString GetClass() const
{
return wxT( "PL_ITEM_LAYOUT" );
}
}; };
void PL_EDITOR_FRAME::SaveCopyInUndoList() void PL_EDITOR_FRAME::SaveCopyInUndoList()
......
...@@ -124,6 +124,14 @@ public: ...@@ -124,6 +124,14 @@ public:
void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override
#endif #endif
/** Get class name
* @return string "MARKER_PCB"
*/
virtual wxString GetClass() const
{
return wxT( "MARKER_PCB" );
}
protected: protected:
///> Pointer to BOARD_ITEM that causes DRC error. ///> Pointer to BOARD_ITEM that causes DRC error.
const BOARD_ITEM* m_item; const BOARD_ITEM* m_item;
......
...@@ -52,10 +52,20 @@ public: ...@@ -52,10 +52,20 @@ public:
/// @copydoc VIEW_ITEM::ViewGetLayers() /// @copydoc VIEW_ITEM::ViewGetLayers()
void ViewGetLayers( int aLayers[], int& aCount ) const; void ViewGetLayers( int aLayers[], int& aCount ) const;
#if defined(DEBUG)
/// @copydoc EDA_ITEM::Show() /// @copydoc EDA_ITEM::Show()
void Show( int x, std::ostream& st ) const void Show( int x, std::ostream& st ) const
{ {
} }
#endif
/** Get class name
* @return string "RATSNEST_VIEWITEM"
*/
virtual wxString GetClass() const
{
return wxT( "RATSNEST_VIEWITEM" );
}
protected: protected:
///> Object containing ratsnest data. ///> Object containing ratsnest data.
......
...@@ -72,7 +72,17 @@ public: ...@@ -72,7 +72,17 @@ public:
m_clearance = aClearance; m_clearance = aClearance;
} }
#if defined(DEBUG)
void Show( int aA, std::ostream& aB ) const {}; void Show( int aA, std::ostream& aB ) const {};
#endif
/** Get class name
* @return string "ROUTER_PREVIEW_ITEM"
*/
virtual wxString GetClass() const
{
return wxT( "ROUTER_PREVIEW_ITEM" );
}
const BOX2I ViewBBox() const; const BOX2I ViewBBox() const;
......
...@@ -55,9 +55,19 @@ public: ...@@ -55,9 +55,19 @@ public:
aCount = 1; aCount = 1;
} }
#if defined(DEBUG)
void Show( int x, std::ostream& st ) const void Show( int x, std::ostream& st ) const
{ {
} }
#endif
/** Get class name
* @return string "BRIGHT_BOX"
*/
virtual wxString GetClass() const
{
return wxT( "BRIGHT_BOX" );
}
private: private:
static const KIGFX::COLOR4D BOX_COLOR; static const KIGFX::COLOR4D BOX_COLOR;
......
...@@ -503,9 +503,19 @@ public: ...@@ -503,9 +503,19 @@ public:
aLayers[0] = ITEM_GAL_LAYER( GP_OVERLAY ); aLayers[0] = ITEM_GAL_LAYER( GP_OVERLAY );
} }
#if defined(DEBUG)
void Show( int x, std::ostream& st ) const void Show( int x, std::ostream& st ) const
{ {
} }
#endif
/** Get class name
* @return string "EDIT_POINTS"
*/
virtual wxString GetClass() const
{
return wxT( "EDIT_POINTS" );
}
private: private:
EDA_ITEM* m_parent; ///< Parent of the EDIT_POINTs EDA_ITEM* m_parent; ///< Parent of the EDIT_POINTs
......
...@@ -63,9 +63,19 @@ public: ...@@ -63,9 +63,19 @@ public:
m_end = aEnd; m_end = aEnd;
} }
#if defined(DEBUG)
void Show( int x, std::ostream& st ) const void Show( int x, std::ostream& st ) const
{ {
} }
#endif
/** Get class name
* @return string "SELECTION_AREA"
*/
virtual wxString GetClass() const
{
return wxT( "SELECTION_AREA" );
}
private: private:
VECTOR2I m_origin, m_end; VECTOR2I m_origin, m_end;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment