X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2Fengine%2FHomogeneousPoolContainer.cxx;h=7c996ef88fcedd1f646667b250991a673dc25bb6;hb=1894c52d0838df8676e770bef061fc23ca436452;hp=814a2f358029cb0f43cc488b9e75145e61e494f0;hpb=3bda66c84e705ee4b63fe805272217b2822865af;p=modules%2Fyacs.git diff --git a/src/engine/HomogeneousPoolContainer.cxx b/src/engine/HomogeneousPoolContainer.cxx index 814a2f358..7c996ef88 100644 --- a/src/engine/HomogeneousPoolContainer.cxx +++ b/src/engine/HomogeneousPoolContainer.cxx @@ -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 @@ -18,13 +18,59 @@ // #include "HomogeneousPoolContainer.hxx" +#include "Exception.hxx" 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; + throw Exception("An HomogeneousPoolContainer cannot be detached on cloning !"); +} + +/*! + * By definition an HomogeneousPoolContainer instance is attached on cloning. + */ +bool HomogeneousPoolContainer::isAttachedOnCloning() const +{ + return true; +} + HomogeneousPoolContainer::HomogeneousPoolContainer() { + _isAttachedOnCloning=true; } HomogeneousPoolContainer::~HomogeneousPoolContainer() { } + +const PlayGround *HomogeneousPoolContainer::getPG() const +{ + if(_pg.isNull()) + throw Exception("HomogeneousPoolContainer::getPG : PlayGround is nullptr !"); + return _pg; +}