-// Copyright (C) 2006-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2006-2024 CEA, EDF
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
bool CollectorSwOutPort::addInPort(InPort *inPort)
{
+ bool ret = false;
if(_currentProducer)
{//a specific link is beeing done
- bool ret=_currentProducer->addInPort(inPort);
+ ret=_currentProducer->addInPort(inPort);
_currentProducer=0;
- return ret;
}
else//global links asked
for(map<int, OutPort *>::iterator iter=_potentialProducers.begin();iter!=_potentialProducers.end();iter++)
- (*iter).second->addInPort(inPort);
+ ret |= (*iter).second->addInPort(inPort);
+ return ret;
}
int CollectorSwOutPort::removeInPort(InPort *inPort, bool forward)
Port(master),
_consumer(port),_currentProducer(0)
{
- _name="Representant_of_"; _name+=master->getName(); _name+="_for_inport_"; _name+=master->getRootNode()->getInPortName(_consumer);
+ _name="Representant_of_";
+ _name+=master->getName();
+ _name+="_for_inport_";
+ _name+=port->getName();
}
CollectorSwOutPort::CollectorSwOutPort(const CollectorSwOutPort& other, Switch *master):OutPort("",master,other.edGetType()),
return ret;
}
}
+ return 0;
}
//! Change the case of a node