Export Contact::setLayer() to the Python interface.
This commit is contained in:
parent
3e921ff07a
commit
c86d074f06
|
@ -138,6 +138,28 @@ extern "C" {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static PyObject* PyContact_setLayer ( PyContact* self, PyObject* args )
|
||||||
|
{
|
||||||
|
cdebug_log(30,0) << "PyContact_setLayer()" << endl;
|
||||||
|
HTRY
|
||||||
|
METHOD_HEAD("Contact.setLayer()")
|
||||||
|
PyObject* pyLayer = NULL;
|
||||||
|
if (PyArg_ParseTuple( args, "O:Contact.setLayer", &pyLayer)) {
|
||||||
|
if (IsPyDerivedLayer(pyLayer)) {
|
||||||
|
contact->setLayer( PYDERIVEDLAYER_O( pyLayer ));
|
||||||
|
} else {
|
||||||
|
PyErr_SetString ( ConstructorError, "invalid parameter type for Contact.setLayer()." );
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
PyErr_SetString ( ConstructorError, "Invalid number of parameters passed to Contact.setLayer()." );
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
HCATCH
|
||||||
|
Py_RETURN_NONE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
PyMethodDef PyContact_Methods[] =
|
PyMethodDef PyContact_Methods[] =
|
||||||
{ { "create" , (PyCFunction)PyContact_create , METH_VARARGS|METH_STATIC
|
{ { "create" , (PyCFunction)PyContact_create , METH_VARARGS|METH_STATIC
|
||||||
, "Create a new Contact." }
|
, "Create a new Contact." }
|
||||||
|
@ -158,6 +180,7 @@ extern "C" {
|
||||||
, { "setDy" , (PyCFunction)PyContact_setDy , METH_VARARGS, "Sets the contact dy value." }
|
, { "setDy" , (PyCFunction)PyContact_setDy , METH_VARARGS, "Sets the contact dy value." }
|
||||||
, { "setWidth" , (PyCFunction)PyContact_setWidth , METH_VARARGS, "Sets the contact width." }
|
, { "setWidth" , (PyCFunction)PyContact_setWidth , METH_VARARGS, "Sets the contact width." }
|
||||||
, { "setHeight" , (PyCFunction)PyContact_setHeight , METH_VARARGS, "Sets the contact height." }
|
, { "setHeight" , (PyCFunction)PyContact_setHeight , METH_VARARGS, "Sets the contact height." }
|
||||||
|
, { "setLayer" , (PyCFunction)PyContact_setLayer , METH_VARARGS, "Sets the contact layer." }
|
||||||
, {NULL, NULL, 0, NULL} /* sentinel */
|
, {NULL, NULL, 0, NULL} /* sentinel */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -14,9 +14,7 @@
|
||||||
// +-----------------------------------------------------------------+
|
// +-----------------------------------------------------------------+
|
||||||
|
|
||||||
|
|
||||||
#ifndef PY_CONTACT_H
|
#pragma once
|
||||||
#define PY_CONTACT_H
|
|
||||||
|
|
||||||
#include "hurricane/isobar/PyComponent.h"
|
#include "hurricane/isobar/PyComponent.h"
|
||||||
#include "hurricane/Contact.h"
|
#include "hurricane/Contact.h"
|
||||||
|
|
||||||
|
@ -51,5 +49,3 @@ namespace Isobar {
|
||||||
} // extern "C".
|
} // extern "C".
|
||||||
|
|
||||||
} // Isobar namespace.
|
} // Isobar namespace.
|
||||||
|
|
||||||
#endif // PY_CONTACT_H
|
|
||||||
|
|
Loading…
Reference in New Issue