Salome HOME
Merge branch 'master' of https://git.salome-platform.org/git/modules/yacs
[modules/yacs.git] / src / runtime / SalomeHPContainer.hxx
index 04457e08c22de93f834fa9d1b7548a7629a261e2..39c20ff4baf0e4dfafd10904985b494c3cfea44a 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2006-2014  CEA/DEN, EDF R&D
+// 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
@@ -47,14 +47,17 @@ namespace YACS
       SalomeHPContainer(const SalomeHPContainer& other);
       //HP specific part
       void setSizeOfPool(int sz);
+      int getSizeOfPool() const;
       std::size_t getNumberOfFreePlace() const;
       void allocateFor(const std::vector<const Task *>& nodes);
-      void release(Task *node);
+      void release(const Task *node);
       //! For thread safety for concurrent load operation on same Container.
       void lock();
       //! For thread safety for concurrent load operation on same Container.
       void unLock();
       //
+      std::string getKind() const;
+      std::string getDiscreminantStrOfThis(const Task *askingNode) const;
       bool isAlreadyStarted(const Task *askingNode) const;
       void start(const Task *askingNode) throw(Exception);
       void shutdown(int level);
@@ -70,7 +73,16 @@ namespace YACS
       std::map<std::string,std::string> getResourceProperties(const std::string& name) const;
       void checkCapabilityToDealWith(const ComponentInstance *inst) const throw(YACS::Exception);
       //
+#ifndef SWIG
+      std::size_t locateTask(const Task *askingNode) const { return _launchModeType.locateTask(askingNode); }
+      const SalomeContainerTools &getContainerInfo() const { return _sct; }
+      std::vector<std::string> getComponentNames() const { return _componentNames; }
+      int getShutdownLev() const { return _shutdownLevel; }
+      SalomeContainerMonoHelper *getHelperOfTask(const Task *node) { return _launchModeType.getHelperOfTask(node); }
+      const SalomeContainerMonoHelper *getHelperOfTask(const Task *node) const { return _launchModeType.getHelperOfTask(node); }
+      //
       YACS::BASES::Mutex& getLocker() { return _mutex; }
+#endif
     public:
       static const char KIND[];
     protected:
@@ -84,6 +96,7 @@ namespace YACS
       std::vector<std::string> _componentNames;
       //
       SalomeHPContainerVectOfHelper _launchModeType;
+      std::string _initScript;
     };
   }
 }