Salome HOME
Merge branch 'master' into omu/workloadmanager
[modules/yacs.git] / src / engine / HomogeneousPoolContainer.hxx
index 5a0c6b76c7752689de19b5eb7e01dabab31084a1..4c4bfb77be9dd7bb67ce29008f46234140e699f2 100644 (file)
@@ -17,8 +17,7 @@
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
-#ifndef __HOMOGENEOUSPOOLCONTAINER_HXX__
-#define __HOMOGENEOUSPOOLCONTAINER_HXX__
+#pragma once
 
 #include "YACSlibEngineExport.hxx"
 #include "Exception.hxx"
@@ -44,18 +43,15 @@ namespace YACS
       void dettachOnCloning() const;
       bool isAttachedOnCloning() const;
       void setAttachOnCloningStatus(bool val) const;
+      virtual void assignPG(const PlayGround *pg);
+      std::mutex &getLocker() const { return this->getPG()->getLocker(); }
       //
       virtual void setSizeOfPool(int sz) = 0;
       virtual int getSizeOfPool() const = 0;
       virtual std::size_t getNumberOfFreePlace() const = 0;
       virtual void allocateFor(const std::vector<const Task *>& nodes) = 0;
       virtual void release(const Task *node) = 0;
-      virtual YACS::BASES::AutoRefCnt<HomogeneousPoolContainer> decorate(YACS::BASES::AutoConstRefCnt<PartDefinition> pd) = 0;
-      virtual HomogeneousPoolContainer *getDirectFather() = 0;
-      virtual const HomogeneousPoolContainer *getDirectFather() const = 0;
       virtual int getNumberOfCoresPerWorker() const = 0;
-      virtual void prepareMaskForExecution() const = 0;
-      virtual void forYourTestsOnly(ForTestOmlyHPContCls *data) const = 0;
       static const char SIZE_OF_POOL_KEY[];
       static const char INITIALIZE_SCRIPT_KEY[];
     protected:
@@ -63,8 +59,11 @@ namespace YACS
 #ifndef SWIG
       virtual ~HomogeneousPoolContainer();
 #endif
+    protected:
+      const PlayGround *getPG() const;
+    private:
+      YACS::BASES::AutoConstRefCnt<PlayGround> _pg;
     };
   }
 }
 
-#endif