From f2a60768ca2e91e111414fbe885eefbff27b039c Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Sat, 6 Jun 2020 12:13:57 +0200 Subject: [PATCH] Export Entity::getId() to the Python interface. --- hurricane/src/isobar/PyEntity.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hurricane/src/isobar/PyEntity.cpp b/hurricane/src/isobar/PyEntity.cpp index 948364df..a21469d5 100644 --- a/hurricane/src/isobar/PyEntity.cpp +++ b/hurricane/src/isobar/PyEntity.cpp @@ -52,9 +52,10 @@ extern "C" { // | "PyEntity" Attribute Methods | // +-------------------------------------------------------------+ - // Standart destroy (Attribute). + DirectGetUIntAttribute(PyEntity_getId, getId, PyEntity, Entity) DBoDestroyAttribute(PyEntity_destroy ,PyEntity) + // --------------------------------------------------------------- // Attribute Method : "PyEntity_getCell ()" @@ -77,6 +78,7 @@ extern "C" { PyMethodDef PyEntity_Methods[] = { { "getCell" , (PyCFunction)PyEntity_getCell , METH_NOARGS , "Returns the entity cell." } + , { "getId" , (PyCFunction)PyEntity_getId , METH_NOARGS , "Returns unique object (DBo) identifier." } , { "destroy" , (PyCFunction)PyEntity_destroy , METH_NOARGS , "Destroy associated hurricane object, the python object remains." } , {NULL, NULL, 0, NULL} /* sentinel */