Commit 5d78a007 authored by Tomasz Włostowski's avatar Tomasz Włostowski

added ClassOf() for DRAWSEGMENTs, PADs and PCB_TEXTs

parent 0879b457
......@@ -69,6 +69,11 @@ public:
/// skip the linked list stuff, and parent
const DRAWSEGMENT& operator = ( const DRAWSEGMENT& rhs );
static inline bool ClassOf( const EDA_ITEM *aItem )
{
return aItem && PCB_LINE_T == aItem->Type();
}
void SetWidth( int aWidth ) { m_Width = aWidth; }
int GetWidth() const { return m_Width; }
......
......@@ -94,6 +94,11 @@ public:
///< used for edge board connectors
static LSET UnplatedHoleMask(); ///< layer set for a mechanical unplated through hole pad
static inline bool ClassOf( const EDA_ITEM *aItem )
{
return aItem && PCB_PAD_T == aItem->Type();
}
void Copy( D_PAD* source );
D_PAD* Next() const { return static_cast<D_PAD*>( Pnext ); }
......
......@@ -49,6 +49,11 @@ public:
~TEXTE_PCB();
static inline bool ClassOf( const EDA_ITEM *aItem )
{
return aItem && PCB_TEXT_T == aItem->Type();
}
virtual const wxPoint& GetPosition() const
{
return m_Pos;
......
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