From decc4745d2994393ccaabefab57c5094e546d466 Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Sat, 24 Apr 2021 12:55:17 +0200 Subject: [PATCH] Add a RoutingLayerGauge.setType() and export to Python (finally unused). --- crlcore/src/ccore/crlcore/RoutingLayerGauge.h | 2 ++ crlcore/src/pyCRL/PyRoutingLayerGauge.cpp | 3 +++ 2 files changed, 5 insertions(+) diff --git a/crlcore/src/ccore/crlcore/RoutingLayerGauge.h b/crlcore/src/ccore/crlcore/RoutingLayerGauge.h index 0caab67a..c9414e4c 100644 --- a/crlcore/src/ccore/crlcore/RoutingLayerGauge.h +++ b/crlcore/src/ccore/crlcore/RoutingLayerGauge.h @@ -112,6 +112,7 @@ namespace CRL { inline DbU::Unit getTrackPosition ( DbU::Unit start, DbU::Unit stop, DbU::Unit position, unsigned mode ) const; DbU::Unit getTrackPosition ( DbU::Unit start, long index ) const; inline void setPWireWidth ( DbU::Unit ); + inline void setType ( uint32_t ); // Hurricane Managment. void toJson ( JsonWriter* ) const; virtual string _getTypeName () const; @@ -190,6 +191,7 @@ namespace CRL { inline DbU::Unit RoutingLayerGauge::getTrackPosition ( DbU::Unit start, DbU::Unit stop, DbU::Unit position, unsigned mode ) const { return getTrackPosition( start, getTrackIndex(start,stop,position,mode) ); } inline void RoutingLayerGauge::setPWireWidth ( DbU::Unit pwidth ) { _pwireWidth = pwidth; } + inline void RoutingLayerGauge::setType ( uint32_t type ) { _type = (Constant::LayerGaugeType)type; } // ------------------------------------------------------------------- diff --git a/crlcore/src/pyCRL/PyRoutingLayerGauge.cpp b/crlcore/src/pyCRL/PyRoutingLayerGauge.cpp index 434af99a..d02b5799 100644 --- a/crlcore/src/pyCRL/PyRoutingLayerGauge.cpp +++ b/crlcore/src/pyCRL/PyRoutingLayerGauge.cpp @@ -275,6 +275,7 @@ extern "C" { DirectGetLongAttribute (PyRoutingLayerGauge_getHalfViaWidth ,getHalfViaWidth ,PyRoutingLayerGauge,RoutingLayerGauge) DirectGetLongAttribute (PyRoutingLayerGauge_getObstacleDw ,getObstacleDw ,PyRoutingLayerGauge,RoutingLayerGauge) DirectSetLongAttribute (PyRoutingLayerGauge_setPWireWidth ,setPWireWidth ,PyRoutingLayerGauge,RoutingLayerGauge) + DirectSetLongAttribute (PyRoutingLayerGauge_setType ,setType ,PyRoutingLayerGauge,RoutingLayerGauge) // Standart Destroy (Attribute). @@ -321,6 +322,8 @@ extern "C" { , "Compute the position of track number ." } , { "setPWireWidth" , (PyCFunction)PyRoutingLayerGauge_setPWireWidth , METH_VARARGS , "Sets the perpandicular wire width (same layer)." } + , { "setType" , (PyCFunction)PyRoutingLayerGauge_setType , METH_VARARGS + , "Sets the kind of gauge." } //, { "destroy" , (PyCFunction)PyRoutingLayerGauge_destroy , METH_VARARGS // , "Destroy the associated hurricane object. The python object remains." } , {NULL, NULL, 0, NULL} /* sentinel */