Salome HOME
Bug correction EDF12462 (3/3)
[modules/yacs.git] / src / engine / WhileLoop.hxx
index 3fa085129728c497aa551f5552a636802977d023..095878896832c16f96cf6f6e82281be90ca86a63 100644 (file)
@@ -1,6 +1,26 @@
+// Copyright (C) 2006-2015  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
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
 #ifndef __WHILELOOP_HXX__
 #define __WHILELOOP_HXX__
 
+#include "YACSlibEngineExport.hxx"
 #include "Loop.hxx"
 #include "ConditionInputPort.hxx"
 
@@ -15,7 +35,7 @@ namespace YACS
  *  This node makes steps while the condition is true
  *
  */
-    class WhileLoop : public Loop
+    class YACSLIBENGINE_EXPORT WhileLoop : public Loop
     {
     protected:
       static const char NAME_OF_INPUT_CONDITION[];
@@ -26,15 +46,15 @@ namespace YACS
       void exUpdateState();
       void init(bool start=true);
       InputPort *edGetConditionPort() { return &_conditionPort; }
-      int getNumberOfInputPorts() const;
-      std::list<InputPort *> getSetOfInputPort() const;
       InputPort* getInputPort(const std::string& name) const throw(Exception);
       std::list<InputPort *> getLocalInputPorts() const;
       virtual void accept(Visitor *visitor);
+      InputPort *getDecisionPort() const { return (InputPort *)&_conditionPort; }
+      virtual std::string typeName() {return "YACS__ENGINE__WhileLoop";}
     protected:
       Node *simpleClone(ComposedNode *father, bool editionOnly=true) const;
-      void checkLinkPossibility(OutPort *start, const std::set<ComposedNode *>& pointsOfViewStart,
-                                InPort *end, const std::set<ComposedNode *>& pointsOfViewEnd) throw(Exception);
+      void checkLinkPossibility(OutPort *start, const std::list<ComposedNode *>& pointsOfViewStart,
+                                InPort *end, const std::list<ComposedNode *>& pointsOfViewEnd) throw(Exception);
       YACS::Event updateStateOnFinishedEventFrom(Node *node);
     };
   }