getExternalComponents(Net* net) -> NetExternalComponents::get(Net* net)
This commit is contained in:
parent
b0b5c18058
commit
8fe480ea30
|
@ -30,7 +30,7 @@ static StandardRelation* getExternalComponentsRelation(const Net* net) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Components getExternalComponents(const Net* net) {
|
Components NetExternalComponents::get(const Net* net) {
|
||||||
if (!net->isExternal())
|
if (!net->isExternal())
|
||||||
throw Error("Impossible to retrieve external components on non external net "
|
throw Error("Impossible to retrieve external components on non external net "
|
||||||
+ net->getName()._getString());
|
+ net->getName()._getString());
|
||||||
|
@ -41,7 +41,7 @@ Components getExternalComponents(const Net* net) {
|
||||||
return externalComponentsRelation->getSlaveOwners().getSubSet<Component*>();
|
return externalComponentsRelation->getSlaveOwners().getSubSet<Component*>();
|
||||||
}
|
}
|
||||||
|
|
||||||
void setExternal(Component* component) {
|
void NetExternalComponents::setExternal(Component* component) {
|
||||||
Net* net = component->getNet();
|
Net* net = component->getNet();
|
||||||
if (!net->isExternal())
|
if (!net->isExternal())
|
||||||
throw Error("Impossible to set as external a component member of non external net "
|
throw Error("Impossible to set as external a component member of non external net "
|
||||||
|
|
|
@ -341,7 +341,7 @@ RoutingPad* createRoutingPad ( Net* net, Occurrence plugOccurrence )
|
||||||
Component* bestComponent = NULL;
|
Component* bestComponent = NULL;
|
||||||
Plug* plug = static_cast<Plug*>(plugOccurrence.getEntity());
|
Plug* plug = static_cast<Plug*>(plugOccurrence.getEntity());
|
||||||
|
|
||||||
for_each_component ( component, getExternalComponents(plug->getMasterNet()) ) {
|
for_each_component (component, NetExternalComponents::get(plug->getMasterNet()) ) {
|
||||||
if ( !bestComponent ) { bestComponent = component; continue; }
|
if ( !bestComponent ) { bestComponent = component; continue; }
|
||||||
if ( /* IsOnTop(component->getLayer(),bestComponent->getLayer())
|
if ( /* IsOnTop(component->getLayer(),bestComponent->getLayer())
|
||||||
||*/ ( getArea(component) > getArea(bestComponent) ) ) {
|
||*/ ( getArea(component) > getArea(bestComponent) ) ) {
|
||||||
|
|
|
@ -15,10 +15,11 @@
|
||||||
|
|
||||||
namespace Hurricane {
|
namespace Hurricane {
|
||||||
|
|
||||||
Components getExternalComponents(const Net* net);
|
class NetExternalComponents {
|
||||||
|
public:
|
||||||
void setExternal(Component* component);
|
static Components get(const Net* net);
|
||||||
|
static void setExternal(Component* component);
|
||||||
|
};
|
||||||
|
|
||||||
} // End of Hurricane namespace.
|
} // End of Hurricane namespace.
|
||||||
|
|
||||||
|
|
|
@ -506,7 +506,7 @@ extern "C" {
|
||||||
|
|
||||||
HTRY
|
HTRY
|
||||||
|
|
||||||
Components components = getExternalComponents ( PYNET_O ( arg0 ) );
|
Components components = NetExternalComponents::get( PYNET_O ( arg0 ) );
|
||||||
|
|
||||||
pyComponentLocator = PyObject_NEW ( PyComponentLocator, &PyTypeComponentLocator );
|
pyComponentLocator = PyObject_NEW ( PyComponentLocator, &PyTypeComponentLocator );
|
||||||
if (pyComponentLocator == NULL) { return NULL; }
|
if (pyComponentLocator == NULL) { return NULL; }
|
||||||
|
|
|
@ -327,7 +327,7 @@ extern "C" {
|
||||||
|
|
||||||
METHOD_HEAD ( "Net.getExternalcomponentsLocator()" )
|
METHOD_HEAD ( "Net.getExternalcomponentsLocator()" )
|
||||||
|
|
||||||
Components externalComponents = getExternalComponents(net);
|
Components externalComponents = NetExternalComponents::get(net);
|
||||||
|
|
||||||
PyComponentLocator* pyExternalComponentsLocator = PyObject_NEW ( PyComponentLocator, &PyTypeComponentLocator );
|
PyComponentLocator* pyExternalComponentsLocator = PyObject_NEW ( PyComponentLocator, &PyTypeComponentLocator );
|
||||||
if (pyExternalComponentsLocator == NULL) { return NULL; }
|
if (pyExternalComponentsLocator == NULL) { return NULL; }
|
||||||
|
|
Loading…
Reference in New Issue