added ClassOf() for DRAWSEGMENTs, PADs and PCB_TEXTs

This commit is contained in:
Tomasz Włostowski 2015-02-18 00:53:57 +01:00
parent 0879b457ac
commit 5d78a007cc
3 changed files with 15 additions and 0 deletions

View File

@ -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; }

View File

@ -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 ); }

View File

@ -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;