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())
|
||||
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<Component*>();
|
||||
}
|
||||
|
||||
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 "
|
||||
|
|
|
@ -341,7 +341,7 @@ RoutingPad* createRoutingPad ( Net* net, Occurrence plugOccurrence )
|
|||
Component* bestComponent = NULL;
|
||||
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 ( /* IsOnTop(component->getLayer(),bestComponent->getLayer())
|
||||
||*/ ( getArea(component) > getArea(bestComponent) ) ) {
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -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; }
|
||||
|
|
|
@ -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; }
|
||||
|
|
Loading…
Reference in New Issue