Fix absence of PCB_TARGET class in python interface.

This commit is contained in:
unknown 2014-10-13 13:14:02 +02:00 committed by jean-pierre charras
parent 82339a9235
commit 4280a1f5d3
3 changed files with 11 additions and 1 deletions

View File

@ -84,6 +84,11 @@ public:
bool HitTest( const wxPoint& aPosition ) const; bool HitTest( const wxPoint& aPosition ) const;
wxString GetClass() const
{
return wxT( "PCB_TARGET" );
}
/** @copydoc BOARD_ITEM::HitTest(const EDA_RECT& aRect, /** @copydoc BOARD_ITEM::HitTest(const EDA_RECT& aRect,
* bool aContained = true, int aAccuracy ) const * bool aContained = true, int aAccuracy ) const
*/ */

View File

@ -47,8 +47,9 @@
EDGE_MODULE* Cast_to_EDGE_MODULE() { return dynamic_cast<EDGE_MODULE*>(self); } EDGE_MODULE* Cast_to_EDGE_MODULE() { return dynamic_cast<EDGE_MODULE*>(self); }
D_PAD* Cast_to_D_PAD() { return dynamic_cast<D_PAD*>(self); } D_PAD* Cast_to_D_PAD() { return dynamic_cast<D_PAD*>(self); }
TRACK* Cast_to_TRACK() { return dynamic_cast<TRACK*>(self); } TRACK* Cast_to_TRACK() { return dynamic_cast<TRACK*>(self); }
ZONE_CONTAINER* Cast_to_ZONE_CONTAINER() { return dynamic_cast<ZONE_CONTAINER*>(self);}
VIA* Cast_to_VIA() { return dynamic_cast<VIA*>(self); } VIA* Cast_to_VIA() { return dynamic_cast<VIA*>(self); }
ZONE_CONTAINER* Cast_to_ZONE_CONTAINER() { return dynamic_cast<ZONE_CONTAINER*>(self);}
PCB_TARGET* Cast_to_PCB_TARGET() { return dynamic_cast<PCB_TARGET*>(self); }
%pythoncode %pythoncode
@ -77,6 +78,8 @@
return self.Cast_to_VIA() return self.Cast_to_VIA()
elif ct=="TRACK": elif ct=="TRACK":
return self.Cast_to_TRACK() return self.Cast_to_TRACK()
elif ct=="PCB_TARGET":
return self.Cast_to_PCB_TARGET()
elif ct=="ZONE_CONTAINER": elif ct=="ZONE_CONTAINER":
return self.Cast_to_ZONE_CONTAINER() return self.Cast_to_ZONE_CONTAINER()
else: else:

View File

@ -97,6 +97,7 @@
#include <class_dimension.h> #include <class_dimension.h>
#include <class_drawsegment.h> #include <class_drawsegment.h>
#include <class_marker_pcb.h> #include <class_marker_pcb.h>
#include <class_mire.h>
#include <class_text_mod.h> #include <class_text_mod.h>
#include <class_edge_mod.h> #include <class_edge_mod.h>
#include <dlist.h> #include <dlist.h>
@ -133,6 +134,7 @@
%include <class_dimension.h> %include <class_dimension.h>
%include <class_drawsegment.h> %include <class_drawsegment.h>
%include <class_marker_pcb.h> %include <class_marker_pcb.h>
%include <class_mire.h>
%include <class_text_mod.h> %include <class_text_mod.h>
%include <class_edge_mod.h> %include <class_edge_mod.h>
%include <dlist.h> %include <dlist.h>