diff --git a/hurricane/src/hurricane/NetExternalComponents.cpp b/hurricane/src/hurricane/NetExternalComponents.cpp index 0b807fce..2c00288e 100644 --- a/hurricane/src/hurricane/NetExternalComponents.cpp +++ b/hurricane/src/hurricane/NetExternalComponents.cpp @@ -30,7 +30,7 @@ static StandardRelation* getExternalComponentsRelation(const Net* net) { } } -Components getExternalComponents(const Net* net) { +Components NetExternalComponents::get(const Net* net) { if (!net->isExternal()) throw Error("Impossible to retrieve external components on non external net " + net->getName()._getString()); @@ -41,7 +41,7 @@ Components getExternalComponents(const Net* net) { return externalComponentsRelation->getSlaveOwners().getSubSet(); } -void setExternal(Component* component) { +void NetExternalComponents::setExternal(Component* component) { Net* net = component->getNet(); if (!net->isExternal()) throw Error("Impossible to set as external a component member of non external net " diff --git a/hurricane/src/hurricane/RoutingPad.cpp b/hurricane/src/hurricane/RoutingPad.cpp index 821f847b..48e7990d 100644 --- a/hurricane/src/hurricane/RoutingPad.cpp +++ b/hurricane/src/hurricane/RoutingPad.cpp @@ -341,7 +341,7 @@ RoutingPad* createRoutingPad ( Net* net, Occurrence plugOccurrence ) Component* bestComponent = NULL; Plug* plug = static_cast(plugOccurrence.getEntity()); - for_each_component ( component, getExternalComponents(plug->getMasterNet()) ) { + for_each_component (component, NetExternalComponents::get(plug->getMasterNet()) ) { if ( !bestComponent ) { bestComponent = component; continue; } if ( /* IsOnTop(component->getLayer(),bestComponent->getLayer()) ||*/ ( getArea(component) > getArea(bestComponent) ) ) { diff --git a/hurricane/src/hurricane/hurricane/NetExternalComponents.h b/hurricane/src/hurricane/hurricane/NetExternalComponents.h index fba50ec4..7dc8435d 100644 --- a/hurricane/src/hurricane/hurricane/NetExternalComponents.h +++ b/hurricane/src/hurricane/hurricane/NetExternalComponents.h @@ -15,10 +15,11 @@ namespace Hurricane { -Components getExternalComponents(const Net* net); - -void setExternal(Component* component); - +class NetExternalComponents { + public: + static Components get(const Net* net); + static void setExternal(Component* component); +}; } // End of Hurricane namespace. diff --git a/hurricane/src/isobar/PyHurricane.cpp b/hurricane/src/isobar/PyHurricane.cpp index 5cf4023f..15503216 100644 --- a/hurricane/src/isobar/PyHurricane.cpp +++ b/hurricane/src/isobar/PyHurricane.cpp @@ -506,7 +506,7 @@ extern "C" { HTRY - Components components = getExternalComponents ( PYNET_O ( arg0 ) ); + Components components = NetExternalComponents::get( PYNET_O ( arg0 ) ); pyComponentLocator = PyObject_NEW ( PyComponentLocator, &PyTypeComponentLocator ); if (pyComponentLocator == NULL) { return NULL; } diff --git a/hurricane/src/isobar/PyNet.cpp b/hurricane/src/isobar/PyNet.cpp index 8c7f145a..38338e3b 100644 --- a/hurricane/src/isobar/PyNet.cpp +++ b/hurricane/src/isobar/PyNet.cpp @@ -327,7 +327,7 @@ extern "C" { METHOD_HEAD ( "Net.getExternalcomponentsLocator()" ) - Components externalComponents = getExternalComponents(net); + Components externalComponents = NetExternalComponents::get(net); PyComponentLocator* pyExternalComponentsLocator = PyObject_NEW ( PyComponentLocator, &PyTypeComponentLocator ); if (pyExternalComponentsLocator == NULL) { return NULL; }