Salome HOME
Updated copyright comment
[modules/yacs.git] / src / engine / HomogeneousPoolContainer.cxx
index 39c3a45c7b433ac665a29f782fb653ee355cf011..7c996ef88fcedd1f646667b250991a673dc25bb6 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2006-2014  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
 
 using namespace YACS::ENGINE;
 
+const char HomogeneousPoolContainer::SIZE_OF_POOL_KEY[]="SizeOfPool";
+
+const char HomogeneousPoolContainer::INITIALIZE_SCRIPT_KEY[]="InitializeScriptKey";
+
 void HomogeneousPoolContainer::attachOnCloning() const
 {
   _isAttachedOnCloning=true;
 }
 
+void HomogeneousPoolContainer::setAttachOnCloningStatus(bool val) const
+{
+  _isAttachedOnCloning=true;
+  if(val)
+    return ;
+  else
+    throw Exception("An HomogeneousPoolContainer cannot be detached on cloning #2 !");
+}
+
+void HomogeneousPoolContainer::assignPG(const PlayGround *pg)
+{
+  _pg.takeRef(pg);
+}
+
 void HomogeneousPoolContainer::dettachOnCloning() const
 {
   _isAttachedOnCloning=true;
@@ -49,3 +67,10 @@ HomogeneousPoolContainer::HomogeneousPoolContainer()
 HomogeneousPoolContainer::~HomogeneousPoolContainer()
 {
 }
+
+const PlayGround *HomogeneousPoolContainer::getPG() const
+{
+  if(_pg.isNull())
+    throw Exception("HomogeneousPoolContainer::getPG : PlayGround is nullptr !");
+  return _pg;
+}