Salome HOME
Observer using plugins through python
[modules/yacs.git] / src / engine / ComposedNode.hxx
index 11bdbf6149596f9a6962bf61e389bcd6d8f11e8c..013950a7ff1a7d558c5ed69dd39cac381c5efb96 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2006-2014  CEA/DEN, EDF R&D
+// Copyright (C) 2006-2016  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
@@ -51,6 +51,7 @@ namespace YACS
       ComposedNode(const std::string& name);
       ComposedNode(const ComposedNode& other, ComposedNode *father);
       void performDuplicationOfPlacement(const Node& other);
+      void performShallowDuplicationOfPlacement(const Node& other);
     public:
       virtual ~ComposedNode();
       bool isFinished();
@@ -63,7 +64,7 @@ namespace YACS
       DeploymentTree checkDeploymentTree(bool deep) const throw(Exception);
       std::vector<Task *> getNextTasks(bool& isMore);
       virtual bool isPlacementPredictableB4Run() const = 0;
-      void notifyFrom(const Task *sender, YACS::Event event);
+      void notifyFrom(const Task *sender, YACS::Event event, const Executor *execInst);
       bool edAddLink(OutPort *start, InPort *end) throw(Exception);
       virtual bool edAddDFLink(OutPort *start, InPort *end) throw(Exception);
       //Node* DISOWNnode is a SWIG notation to indicate that the ownership of the node is transfered to C++
@@ -76,9 +77,11 @@ namespace YACS
       void edRemoveLink(OutGate *start, InGate *end) throw(Exception);
       virtual bool isRepeatedUnpredictablySeveralTimes() const { return false; }
       virtual std::list<Node *> edGetDirectDescendants() const =  0;
+      virtual void removeRecursivelyRedundantCL();
       std::list<ElementaryNode *> getRecursiveConstituents() const;
       std::list<Node *> getAllRecursiveNodes();
       virtual std::list<Node *> getAllRecursiveConstituents(); // first implementation
+      std::list<ProgressWeight> getProgressWeight() const;
       std::string getInPortName(const InPort *) const throw (Exception);
       std::string getOutPortName(const OutPort *) const throw (Exception);
       //
@@ -114,11 +117,12 @@ namespace YACS
       virtual std::string getMyQualifiedName(const Node *directSon) const;
       Node *getChildByName(const std::string& name) const throw(Exception);
       static ComposedNode *getLowestCommonAncestor(Node *node1, Node *node2) throw(Exception);
+      static std::string getLowestCommonAncestorStr(const std::string& node1, const std::string& node2);
       void loaded();
       void connected();
       void accept(Visitor *visitor);
       virtual void cleanNodes();
-      virtual std::string getProgress() const {return "0";};
+      virtual std::string getProgress() const { return "0"; }
     protected:
       struct SortHierarc
       {
@@ -132,10 +136,10 @@ namespace YACS
       static bool splitNamesBySep(const std::string& globalName, const char separator[],
                                   std::string& firstPart, std::string& lastPart, bool priority) throw(Exception);
       virtual Node *getChildByShortName(const std::string& name) const throw(Exception) = 0;
-      YACS::Event updateStateFrom(Node *node, YACS::Event event);//update the state of this. Precondition : node->_father == this
+      YACS::Event updateStateFrom(Node *node, YACS::Event event, const Executor *execInst);//update the state of this. Precondition : node->_father == this
       virtual YACS::Event updateStateOnStartEventFrom(Node *node);//transition 3 doc P.R
       virtual YACS::Event updateStateOnFinishedEventFrom(Node *node) = 0;//transition 9 doc P.R.
-      virtual YACS::Event updateStateOnFailedEventFrom(Node *node);//transition 9 doc P.R.
+      virtual YACS::Event updateStateOnFailedEventFrom(Node *node, const Executor *execInst);//transition 9 doc P.R.
       virtual void checkLinkPossibility(OutPort *start, const std::list<ComposedNode *>& pointsOfViewStart,
                                         InPort *end, const std::list<ComposedNode *>& pointsOfViewEnd) throw(Exception);
       virtual void buildDelegateOf(InPort * & port, OutPort *initialStart, const std::list<ComposedNode *>& pointsOfView);