Salome HOME
Updated copyright comment
[modules/yacs.git] / src / engine / OptimizerAlg.hxx
index b1b4b36dd0a357ea6f1841bd8d48e7fda6c247b9..b7a3022649279af5ee81090a515f39145c9e7496 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2006-2012  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
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// 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
@@ -44,6 +44,7 @@ namespace YACS
       Pool *_pool;
       Proc * _proc;
       std::string _errorMessage;
+      int _nbOfBranches;
 
     protected:
       OptimizerAlgBase(Pool *pool);
@@ -59,7 +60,7 @@ namespace YACS
       virtual TypeCode *getTCForAlgoInit() const;
       //! returns typecode of type expected as algo result. OwnerShip of returned pointer is held by this.
       virtual TypeCode *getTCForAlgoResult() const;
-      virtual void initialize(const Any *input) throw (Exception);
+      virtual void initialize(const Any *input) ;
       virtual void start() = 0;//! Update _pool attribute before performing anything.
       virtual void takeDecision() = 0;//! _pool->getCurrentId gives the \b id at the origin of this call.
                                       //! Perform the job of analysing to know what new jobs to do (_pool->pushInSample)
@@ -73,7 +74,7 @@ namespace YACS
       virtual TypeCode *getTCForOutProxy() const;
       virtual TypeCode *getTCForAlgoInitProxy() const;
       virtual TypeCode *getTCForAlgoResultProxy() const;
-      virtual void initializeProxy(const Any *input) throw (Exception);
+      virtual void initializeProxy(const Any *input) ;
       virtual void startProxy();
       virtual void takeDecisionProxy();
       virtual void finishProxy();
@@ -86,7 +87,8 @@ namespace YACS
       virtual bool hasError() const;
       virtual const std::string & getError() const;
       virtual void setError(const std::string & message);
-
+      void setNbOfBranches(int nbOfBranches);
+      int getNbOfBranches() const;
     };
 
     typedef OptimizerAlgBase OptimizerAlgSync;