Remove BOARD::Add() from board.i, since it is inherited from board_item_container.i
This commit is contained in:
parent
eeae8c741a
commit
85ef7ee467
|
@ -177,16 +177,3 @@ HANDLE_EXCEPTIONS(BOARD::TracksInNetBetweenPoints)
|
||||||
return netclassmap
|
return netclassmap
|
||||||
%}
|
%}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
%feature("notabstract") NETINFO_ITEM;
|
|
||||||
|
|
||||||
// http://swig.10945.n7.nabble.com/std-containers-and-pointers-td3728.html
|
|
||||||
%{
|
|
||||||
namespace swig {
|
|
||||||
template <> struct traits<NETINFO_ITEM> {
|
|
||||||
typedef pointer_category category;
|
|
||||||
static const char* type_name() { return "NETINFO_ITEM"; }
|
|
||||||
};
|
|
||||||
}
|
|
||||||
%}
|
|
||||||
|
|
|
@ -27,8 +27,6 @@
|
||||||
* @brief Specific BOARD extensions and templates
|
* @brief Specific BOARD extensions and templates
|
||||||
*/
|
*/
|
||||||
|
|
||||||
%import dlist.i
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%include class_module.h
|
%include class_module.h
|
||||||
|
@ -40,6 +38,11 @@
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
|
||||||
|
// BOARD_ITEM_CONTAINER's interface functions will be implemented by SWIG
|
||||||
|
// automatically.
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
%extend MODULE
|
%extend MODULE
|
||||||
{
|
{
|
||||||
%pythoncode
|
%pythoncode
|
||||||
|
@ -52,19 +55,9 @@
|
||||||
# add function, clears the thisown to avoid python from deleting
|
# add function, clears the thisown to avoid python from deleting
|
||||||
# the object in the garbage collector
|
# the object in the garbage collector
|
||||||
#
|
#
|
||||||
|
|
||||||
def Add(self,item):
|
|
||||||
|
|
||||||
itemC = item.Cast()
|
|
||||||
|
|
||||||
if type(itemC) is D_PAD:
|
|
||||||
item.thisown=0
|
|
||||||
self.Pads().PushBack(itemC)
|
|
||||||
elif type(itemC) in [ TEXTE_PCB, DIMENSION, TEXTE_MODULE, DRAWSEGMENT,EDGE_MODULE]:
|
|
||||||
item.thisown = 0
|
|
||||||
self.GraphicalItems().PushBack(item)
|
|
||||||
%}
|
%}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
%pythoncode
|
%pythoncode
|
||||||
|
@ -101,20 +94,23 @@
|
||||||
plug.FootprintLibIsWritable(lpath)
|
plug.FootprintLibIsWritable(lpath)
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
|
||||||
%{
|
%{
|
||||||
MODULE *PyModule_to_MODULE(PyObject *obj0)
|
|
||||||
|
// called from pcbnew/swig/pcbnew_footprint_wizards.cpp
|
||||||
|
MODULE* PyModule_to_MODULE(PyObject *obj0)
|
||||||
|
{
|
||||||
|
void* argp;
|
||||||
|
int res1 = SWIG_ConvertPtr(obj0, &argp,SWIGTYPE_p_MODULE, 0 | 0 );
|
||||||
|
if (!SWIG_IsOK(res1))
|
||||||
{
|
{
|
||||||
void *argp;
|
SWIG_exception_fail(SWIG_ArgError(res1), "Converting object to MODULE*");
|
||||||
int res1 = SWIG_ConvertPtr(obj0, &argp,SWIGTYPE_p_MODULE, 0 | 0 );
|
|
||||||
if (!SWIG_IsOK(res1))
|
|
||||||
{
|
|
||||||
SWIG_exception_fail(SWIG_ArgError(res1), "Converting object to MODULE*");
|
|
||||||
}
|
|
||||||
|
|
||||||
return (MODULE*)argp;
|
|
||||||
|
|
||||||
fail:
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return (MODULE*) argp;
|
||||||
|
|
||||||
|
fail:
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
%}
|
%}
|
||||||
|
|
|
@ -3,3 +3,15 @@
|
||||||
%{
|
%{
|
||||||
#include <class_netinfo.h>
|
#include <class_netinfo.h>
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
%feature("notabstract") NETINFO_ITEM;
|
||||||
|
|
||||||
|
// http://swig.10945.n7.nabble.com/std-containers-and-pointers-td3728.html
|
||||||
|
%{
|
||||||
|
namespace swig {
|
||||||
|
template <> struct traits<NETINFO_ITEM> {
|
||||||
|
typedef pointer_category category;
|
||||||
|
static const char* type_name() { return "NETINFO_ITEM"; }
|
||||||
|
};
|
||||||
|
}
|
||||||
|
%}
|
||||||
|
|
Loading…
Reference in New Issue