X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2Fengine%2FElementaryNode.hxx;h=9ba583d3c7f94d01c321444ed7aaed954bbea36b;hb=b3d523481abb9be0960b9dc69b1ad7e0330d8eb2;hp=d2561e804f9335d7c5fa6a7ff8302b73f0f7e47e;hpb=bc803f251236fa3b020c57975e25f5c6db05434c;p=modules%2Fyacs.git diff --git a/src/engine/ElementaryNode.hxx b/src/engine/ElementaryNode.hxx index d2561e804..9ba583d3c 100644 --- a/src/engine/ElementaryNode.hxx +++ b/src/engine/ElementaryNode.hxx @@ -1,4 +1,4 @@ -// Copyright (C) 2006-2016 CEA/DEN, EDF R&D +// Copyright (C) 2006-2021 CEA/DEN, EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -48,6 +48,7 @@ namespace YACS std::list _setOfOutputPort; std::list _setOfInputDataStreamPort; std::list _setOfOutputDataStreamPort; + ComplexWeight _weight; // Management of multi property bool _createDatastreamPorts; @@ -67,18 +68,18 @@ namespace YACS Container *getContainer(); YACS::StatesForNode getState() const; void getReadyTasks(std::vector& tasks); - void edRemovePort(Port *port) throw(Exception); + void edRemovePort(Port *port) ; std::list getRecursiveConstituents() const; std::list getProgressWeight() const; - Node *getChildByName(const std::string& name) const throw(Exception); - virtual void checkBasicConsistency() const throw(Exception); + Node *getChildByName(const std::string& name) const ; + virtual void checkBasicConsistency() const ; ComposedNode *getDynClonerIfExists(const ComposedNode *levelToStop) const; int getNumberOfInputPorts() const; int getNumberOfOutputPorts() const; - std::string getInPortName(const InPort *) const throw (Exception); - std::string getOutPortName(const OutPort *) const throw (Exception); - InputPort *getInputPort(const std::string& name) const throw(Exception); - OutputPort *getOutputPort(const std::string& name) const throw(Exception); + std::string getInPortName(const InPort *) const ; + std::string getOutPortName(const OutPort *) const ; + InputPort *getInputPort(const std::string& name) const ; + OutputPort *getOutputPort(const std::string& name) const ; std::list getSetOfInputPort() const { return _setOfInputPort; } std::list getSetOfOutputPort() const { return _setOfOutputPort; } std::list getLocalInputPorts() const { return _setOfInputPort; } @@ -89,16 +90,16 @@ namespace YACS virtual std::vector< std::pair > getSetOfLinksComingInCurrentScope() const; std::list getSetOfInputDataStreamPort() const { return _setOfInputDataStreamPort; } std::list getSetOfOutputDataStreamPort() const { return _setOfOutputDataStreamPort; } - InputDataStreamPort *getInputDataStreamPort(const std::string& name) const throw(Exception); - OutputDataStreamPort *getOutputDataStreamPort(const std::string& name) const throw(Exception); + InputDataStreamPort *getInputDataStreamPort(const std::string& name) const ; + OutputDataStreamPort *getOutputDataStreamPort(const std::string& name) const ; virtual InputPort *createInputPort(const std::string& inputPortName, TypeCode* type); virtual OutputPort *createOutputPort(const std::string& outputPortName, TypeCode* type); virtual InputDataStreamPort *createInputDataStreamPort(const std::string& inputPortDSName, TypeCode* type); virtual OutputDataStreamPort *createOutputDataStreamPort(const std::string& outputPortDSName, TypeCode* type); - virtual InputPort *edAddInputPort(const std::string& inputPortName, TypeCode* type) throw(Exception); - virtual OutputPort *edAddOutputPort(const std::string& outputPortName, TypeCode* type) throw(Exception); - virtual InputDataStreamPort *edAddInputDataStreamPort(const std::string& inputPortDSName, TypeCode* type) throw(Exception); - virtual OutputDataStreamPort *edAddOutputDataStreamPort(const std::string& outputPortDSName, TypeCode* type) throw(Exception); + virtual InputPort *edAddInputPort(const std::string& inputPortName, TypeCode* type) ; + virtual OutputPort *edAddOutputPort(const std::string& outputPortName, TypeCode* type) ; + virtual InputDataStreamPort *edAddInputDataStreamPort(const std::string& inputPortDSName, TypeCode* type) ; + virtual OutputDataStreamPort *edAddOutputDataStreamPort(const std::string& outputPortDSName, TypeCode* type) ; virtual void edOrderInputPorts(const std::list& ports); virtual void edOrderOutputPorts(const std::list& ports); @@ -107,7 +108,9 @@ namespace YACS virtual void ensureLoading(); int getMaxLevelOfParallelism() const { return 1; } - double getWeightRegardingDPL() const { return 0.; } + ComplexWeight *getWeight() { return &_weight; } + void setWeight(double elementaryWeight); + void getWeightRegardingDPL(ComplexWeight *weight) { weight->addWeight(getWeight()); } void partitionRegardingDPL(const PartDefinition *pd, std::map >& zeMap) { } //run part @@ -138,13 +141,13 @@ namespace YACS void edDisconnectAllLinksWithMe(); bool areAllInputPortsValid() const; template - PORT *getPort(const std::string& name, const std::list& setOfPorts) const throw(Exception); + PORT *getPort(const std::string& name, const std::list& setOfPorts) const ; template - PORT *edAddPort(const std::string& portName, std::list& setOfPorts, ENUMTYPE type) throw(Exception); + PORT *edAddPort(const std::string& portName, std::list& setOfPorts, ENUMTYPE type) ; template - bool edCheckAddPort(const std::string& portName, std::list& setOfPorts, ENUMTYPE type) throw(Exception); + bool edCheckAddPort(const std::string& portName, std::list& setOfPorts, ENUMTYPE type) ; template - static void edRemovePortTypedFromSet(PORT *port, std::list& setOfPorts) throw(Exception); + static void edRemovePortTypedFromSet(PORT *port, std::list& setOfPorts) ; template static bool isPortNameAlreadyExist(const std::string& portName, const std::list& setOfPorts); }; @@ -154,7 +157,7 @@ namespace YACS */ template - PORT *ElementaryNode::getPort(const std::string& name, const std::list& setOfPorts) const throw(Exception) + PORT *ElementaryNode::getPort(const std::string& name, const std::list& setOfPorts) const { for(typename std::list::const_iterator iter=setOfPorts.begin();iter!=setOfPorts.end();iter++) { @@ -173,7 +176,7 @@ namespace YACS */ template - PORT *ElementaryNode::edAddPort(const std::string& portName, std::list& setOfPorts, ENUMTYPE type) throw(Exception) + PORT *ElementaryNode::edAddPort(const std::string& portName, std::list& setOfPorts, ENUMTYPE type) { checkValidityOfPortName(portName); if(isPortNameAlreadyExist(portName, setOfPorts)) @@ -187,7 +190,7 @@ namespace YACS } template - bool ElementaryNode::edCheckAddPort(const std::string& portName, std::list& setOfPorts, ENUMTYPE type) throw(Exception) + bool ElementaryNode::edCheckAddPort(const std::string& portName, std::list& setOfPorts, ENUMTYPE type) { checkValidityOfPortName(portName); if(isPortNameAlreadyExist(portName, setOfPorts)) @@ -203,7 +206,7 @@ namespace YACS */ template - void ElementaryNode::edRemovePortTypedFromSet(PORT *port, std::list& setOfPorts) throw(Exception) + void ElementaryNode::edRemovePortTypedFromSet(PORT *port, std::list& setOfPorts) { if(!isPortNameAlreadyExist(port->getName(), setOfPorts)) throw Exception("Port is not part of the list : unable to remove it");