pcbnew: Cleanup stale code

This commit is contained in:
Seth Hillbrand 2019-12-10 20:48:44 -08:00
parent 02977aacfc
commit dc241df602
1 changed files with 0 additions and 99 deletions

View File

@ -196,103 +196,4 @@ private:
bool m_localRatsnestVisible;
};
#if 0 // template for future
/**
* Class BOARD_ITEM_LIST
* is a container for a list of BOARD_ITEMs.
*/
class BOARD_ITEM_LIST : public BOARD_ITEM
{
typedef boost::ptr_vector<BOARD_ITEM> ITEM_ARRAY;
ITEM_ARRAY myItems;
BOARD_ITEM_LIST( const BOARD_ITEM_LIST& other ) :
BOARD_ITEM( NULL, PCB_ITEM_LIST_T )
{
// copy constructor is not supported, is private to cause compiler error
}
public:
BOARD_ITEM_LIST( BOARD_ITEM* aParent = NULL ) :
BOARD_ITEM( aParent, PCB_ITEM_LIST_T )
{}
//-----< satisfy some virtual functions >------------------------------
const wxPoint GetPosition()
{
return wxPoint(0, 0); // dummy
}
void Print( PCB_BASE_FRAME* aFrame, wxDC* DC, const wxPoint& aOffset = ZeroOffset )
{
}
//-----</ satisfy some virtual functions >-----------------------------
/**
* Function GetCount
* returns the number of BOARD_ITEMs.
*/
int GetCount() const
{
return myItems.size();
}
void Append( BOARD_ITEM* aItem )
{
myItems.push_back( aItem );
}
BOARD_ITEM* Replace( int aIndex, BOARD_ITEM* aItem )
{
ITEM_ARRAY::auto_type ret = myItems.replace( aIndex, aItem );
return ret.release();
}
BOARD_ITEM* Remove( int aIndex )
{
ITEM_ARRAY::auto_type ret = myItems.release( myItems.begin()+aIndex );
return ret.release();
}
void Insert( int aIndex, BOARD_ITEM* aItem )
{
myItems.insert( myItems.begin()+aIndex, aItem );
}
BOARD_ITEM* At( int aIndex ) const
{
// we have varying sized objects and are using polymorphism, so we
// must return a pointer not a reference.
return (BOARD_ITEM*) &myItems[aIndex];
}
BOARD_ITEM* operator[]( int aIndex ) const override
{
return At( aIndex );
}
void Delete( int aIndex )
{
myItems.erase( myItems.begin()+aIndex );
}
void PushBack( BOARD_ITEM* aItem )
{
Append( aItem );
}
BOARD_ITEM* PopBack()
{
if( GetCount() )
return Remove( GetCount()-1 );
return NULL;
}
};
#endif // future
#endif // BOARD_CONNECTED_ITEM_H