Salome HOME
Merge branch 'V8_0_BR'
[modules/yacs.git] / src / engine / DeploymentTree.hxx
index 09b00022ec10437740a517a3117c88d49489f3c5..2bc0506f67028d7778a487caceddcafcb81a4f67 100644 (file)
@@ -1,6 +1,27 @@
+// 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 __DEPLOYMENTTREE_HXX__
 #define __DEPLOYMENTTREE_HXX__
 
+#include "YACSlibEngineExport.hxx"
+
 #include <vector>
 
 namespace YACS
@@ -12,7 +33,7 @@ namespace YACS
     class Scheduler;
     class ComponentInstance;
 
-    class DeploymentTreeOnHeap
+    class YACSLIBENGINE_EXPORT DeploymentTreeOnHeap
     {
     public:
       DeploymentTreeOnHeap();
@@ -31,12 +52,11 @@ namespace YACS
       std::vector<Container *> getAllCTDefContainers() const;
       std::vector<Container *> getAllRTODefContainers() const;
       std::vector<Task *> getTasksLinkedToComponent(ComponentInstance *comp) const;
+      std::vector<Task *> getTasksLinkedToContainer(Container *cont) const;
       std::vector<ComponentInstance *> getComponentsLinkedToContainer(Container *cont) const;
       //
       bool presenceOfDefaultContainer() const;
       std::vector<Task *> getFreeDeployableTasks() const;
-    private:
-      static bool isConsistentTaskRegardingShCompInst(std::vector< std::pair<Task *, Scheduler * > >& tasksSharingSameCompInst, Scheduler *cloner);
     private:
       mutable int _cnt;
       std::vector< std::pair<Task *,Scheduler *> > _freePlacableTasks;
@@ -44,7 +64,7 @@ namespace YACS
       std::vector< std::vector< std::vector< std::pair<Task *, Scheduler * > > > > _tree;
     };
 
-    class DeploymentTree
+    class YACSLIBENGINE_EXPORT DeploymentTree
     {
     public:
       DeploymentTree();
@@ -63,6 +83,7 @@ namespace YACS
       std::vector<Container *> getAllCTDefContainers() const;
       std::vector<Container *> getAllRTODefContainers() const;
       std::vector<Task *> getTasksLinkedToComponent(ComponentInstance *comp) const;
+      std::vector<Task *> getTasksLinkedToContainer(Container *cont) const;
       std::vector<ComponentInstance *> getComponentsLinkedToContainer(Container *cont) const;
       //
       bool isNull() const;