Salome HOME
Save foreach state - work in progress.
[modules/yacs.git] / src / engine / ForEachLoop.hxx
index 7c1968d38eca47298b28895e43f192aed1679dc7..0f3690fb06d157d0981f70e48b6f47cc48d55a2b 100644 (file)
@@ -127,6 +127,7 @@ namespace YACS
     {
     public:
       ForEachLoopPassedData(const std::vector<unsigned int>& passedIds, const std::vector<SequenceAny *>& passedOutputs, const std::vector<std::string>& nameOfOutputs);
+      ForEachLoopPassedData(const ForEachLoopPassedData& copy);
       ~ForEachLoopPassedData();
       void init();
       void checkCompatibilyWithNb(int nbOfElts) const;
@@ -136,6 +137,10 @@ namespace YACS
       int toAbsIdNot(int localId) const;
       int getNumberOfElementsToDo() const;
       void assignAlreadyDone(const std::vector<SequenceAny *>& execVals) const;
+      const std::vector<unsigned int>& getIds()const {return _passedIds;}
+      const std::vector<SequenceAny *>& getOutputs()const {return _passedOutputs;}
+      const std::vector<std::string>& getOutputNames()const {return _nameOfOutputs;}
+      //const std::vector<bool>& getFlags()const {return _flagsIds;}
     private:
       std::vector<unsigned int> _passedIds;
       std::vector<SequenceAny *> _passedOutputs;
@@ -197,9 +202,12 @@ namespace YACS
       int getNbOfElementsToBeProcessed() const;
       static int getFEDeltaBetween(OutPort *start, InPort *end);
 #ifndef SWIG
+      ForEachLoopPassedData* getProcessedData()const;
+      void setProcessedData(ForEachLoopPassedData* processedData);
       std::vector<unsigned int> getPassedResults(Executor *execut, std::vector<SequenceAny *>& outputs, std::vector<std::string>& nameOfOutputs) const;
       void assignPassedResults(const std::vector<unsigned int>& passedIds, const std::vector<SequenceAny *>& passedOutputs, const std::vector<std::string>& nameOfOutputs);
 #endif
+     const TypeCode* getOutputPortType(const std::string& portName)const;
     protected:
       Node *simpleClone(ComposedNode *father, bool editionOnly=true) const;
       void checkLinkPossibility(OutPort *start, const std::list<ComposedNode *>& pointsOfViewStart,
@@ -208,7 +216,7 @@ namespace YACS
       YACS::Event updateStateForInitNodeOnFinishedEventFrom(Node *node, unsigned int id);
       YACS::Event updateStateForWorkNodeOnFinishedEventFrom(Node *node, unsigned int id, bool isNormalFinish);
       YACS::Event updateStateForFinalizeNodeOnFinishedEventFrom(Node *node, unsigned int id);
-      YACS::Event updateStateOnFailedEventFrom(Node *node, const Executor *execInst);
+      YACS::Event updateStateOnFailedEventFrom(Node *node);
       void buildDelegateOf(std::pair<OutPort *, OutPort *>& port, InPort *finalTarget, const std::list<ComposedNode *>& pointsOfView);
       void getDelegateOf(std::pair<OutPort *, OutPort *>& port, InPort *finalTarget, const std::list<ComposedNode *>& pointsOfView) throw(Exception);
       void releaseDelegateOf(OutPort *portDwn, OutPort *portUp, InPort *finalTarget, const std::list<ComposedNode *>& pointsOfView) throw(Exception);