Salome HOME
Copyright update 2021
[modules/yacs.git] / src / engine / Test / ContainerTest.hxx
index ab0faa3c85aa9486e35de0587e08cf47749523c1..60f58fbfaa788aedf5bc8be7f4cab1f7c7e8c149 100644 (file)
@@ -1,3 +1,22 @@
+// Copyright (C) 2006-2021  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 __CONTAINERTEST_HXX__
 #define __CONTAINERTEST_HXX__
 
@@ -11,15 +30,29 @@ namespace YACS
     {
     public:
       ContainerTest();
+      std::string getKind() const;
       std::string getPlacementInfo() const;
       // implementation of compulsary methods
-      bool isAlreadyStarted() const;
-      void start() throw(Exception);
+      bool isAlreadyStarted(const Task *askingNode) const;
+      void start(const Task *askingNode) ;
       Container *clone() const;
-      std::string getPlacementId() const { return ""; }
+      Container *cloneAlways() const;
+      //
+      void lock() { }
+      void unLock() { }
+      void clearProperties() { }
+      void addComponentName(const std::string& name) { }
+      void shutdown(int level) { }
+      void setProperty(const std::string& name,const std::string& value) { }
+      std::string getProperty(const std::string& name) const { return ""; }
+      std::map<std::string,std::string> getResourceProperties(const std::string& name) const { return std::map<std::string,std::string>(); }
+      std::map<std::string,std::string> getProperties() const { return std::map<std::string,std::string>(); }
+      //
+      std::string getPlacementId(const Task *askingNode) const { return ""; }
+      std::string getFullPlacementId(const Task *askingNode) const { return ""; }
       static void initAllContainers();
     protected:
-      void checkCapabilityToDealWith(const ComponentInstance *inst) const throw(Exception);
+      void checkCapabilityToDealWith(const ComponentInstance *inst) const ;
     protected:
       bool _alreadyStarted;
       unsigned _myCounter;
@@ -31,14 +64,28 @@ namespace YACS
     {
     public:
       ContainerTest2();
+      std::string getKind() const;
       // implementation of compulsary methods
-      bool isAlreadyStarted() const;
-      void start() throw(Exception);
+      bool isAlreadyStarted(const Task *askingNode) const;
+      void start(const Task *askingNode) ;
       Container *clone() const;
-      std::string getPlacementId() const { return ""; }
+      Container *cloneAlways() const;
+      //
+      void lock() { }
+      void unLock() { }
+      void clearProperties() { }
+      void addComponentName(const std::string& name) { }
+      void shutdown(int level) { }
+      void setProperty(const std::string& name,const std::string& value) { }
+      std::string getProperty(const std::string& name) const { return ""; }
+      std::map<std::string,std::string> getResourceProperties(const std::string& name) const { return std::map<std::string,std::string>(); }
+      std::map<std::string,std::string> getProperties() const { return std::map<std::string,std::string>(); }
+      //
+      std::string getPlacementId(const Task *askingNode) const { return ""; }
+      std::string getFullPlacementId(const Task *askingNode) const { return ""; }
       static void initAllContainers();
     protected:
-      void checkCapabilityToDealWith(const ComponentInstance *inst) const throw(Exception);
+      void checkCapabilityToDealWith(const ComponentInstance *inst) const ;
     protected:
       bool _alreadyStarted;
       unsigned _myCounter;