return KIND;
}
+std::string ComponentInstance::getKindForNode() const
+{
+ return KIND;
+}
+
void ComponentInstance::shutdown(int level)
{
}
virtual ServiceNode* createNode(const std::string& name)=0;
virtual ComponentInstance *clone() const = 0;
virtual std::string getKind() const;
+ virtual std::string getKindForNode() const;
static const char KIND[];
virtual void shutdown(int level);
protected:
//#define _DEVDEBUG_
#include "YacsTrace.hxx"
+#include <sstream>
+
using namespace std;
using namespace YACS::ENGINE;
{
}
+std::string Container::getDiscreminantStrOfThis() const
+{
+ const void *ptr(this);
+ std::ostringstream oss; oss << ptr;
+ return oss.str();
+}
+
/*!
* By calling this method the current container 'this' is not destined to be deeply copied on clone call.
*/
#endif
public:
//Execution only methods
+ virtual std::string getDiscreminantStrOfThis() const;
virtual bool isAlreadyStarted(const Task *askingNode) const = 0;
virtual void start(const Task *askingNode) throw(Exception) = 0;
virtual std::string getPlacementId(const Task *askingNode) const = 0;
//Edition only methods
virtual void attachOnCloning() const;
virtual void dettachOnCloning() const;
- bool isAttachedOnCloning() const;
+ virtual bool isAttachedOnCloning() const;
virtual void lock() = 0;
virtual void unLock() = 0;
//! \b WARNING ! clone behaviour \b MUST be in coherence with what is returned by isAttachedOnCloning() method
//
#include "HomogeneousPoolContainer.hxx"
+#include "Exception.hxx"
using namespace YACS::ENGINE;
+void HomogeneousPoolContainer::attachOnCloning() const
+{
+ _isAttachedOnCloning=true;
+}
+
+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()
class YACSLIBENGINE_EXPORT HomogeneousPoolContainer : public Container
{
public:
+ void attachOnCloning() const;
+ void dettachOnCloning() const;
+ bool isAttachedOnCloning() const;
+ //
virtual void setSizeOfPool(int sz) = 0;
virtual std::size_t getNumberOfFreePlace() const = 0;
virtual void allocateFor(const std::vector<const Task *>& nodes) = 0;
if(compo)
{
DEBTRACE(compo->getInstanceName());
- if(compo->getKind() != this->getKind())
+ if(compo->getKindForNode() != this->getKind())
{
//Not allowed
std::string what("ServiceNode::setComponent : component instance kind not allowed ");
return ToyNode1S::KIND;
}
+std::string ComponentInstanceTest1::getKindForNode() const
+{
+ return ToyNode1S::KIND;
+}
+
ServiceNode* ComponentInstanceTest1::createNode(const std::string& name)
{
ToyNode1S* node=new ToyNode1S(name);
return ToyNode2S::KIND;
}
+std::string ComponentInstanceTest2::getKindForNode() const
+{
+ return ToyNode2S::KIND;
+}
+
ServiceNode* ComponentInstanceTest2::createNode(const std::string& name)
{
ToyNode2S* node=new ToyNode2S(name);
void unload(Task *askingNode);
bool isLoaded(Task *askingNode) const;
std::string getKind() const;
+ std::string getKindForNode() const;
ServiceNode* createNode(const std::string& name);
ComponentInstance *clone() const;
protected:
void unload(Task *askingNode);
bool isLoaded(Task *askingNode) const;
std::string getKind() const;
+ std::string getKindForNode() const;
ServiceNode* createNode(const std::string& name);
ComponentInstance *clone() const;
protected:
PythonXMLConv.hxx
RuntimeSALOME.hxx
SalomeComponent.hxx
+ SalomeHPComponent.hxx
SalomeContainer.hxx
SalomeContainerTools.hxx
SalomeContainerHelper.hxx
SalomeProc.cxx
CalStreamPort.cxx
CORBAComponent.cxx
- SalomeComponent.cxx
+ SalomeComponent.cxx
+ SalomeHPComponent.cxx
CppComponent.cxx
CppContainer.cxx
CppCORBAConv.cxx
return KIND;
}
+std::string CORBAComponent::getKindForNode() const
+{
+ return KIND;
+}
+
//! Unload the component
void CORBAComponent::unload(Task *askingNode)
{
public:
static const char KIND[];
virtual std::string getKind() const;
+ virtual std::string getKindForNode() const;
protected:
CORBA::Object_var _objComponent;
};
std::string CppComponent::getKind() const
{
- return CppComponent::KIND;
+ return CppComponent::KIND;
+}
+
+std::string CppComponent::getKindForNode() const
+{
+ return CppComponent::KIND;
}
//! CppComponent constructor
static const char KIND[];
virtual std::string getKind() const;
+ virtual std::string getKindForNode() const;
virtual void load(Task *askingNode);
virtual void unload(Task *askingNode);
virtual bool isLoaded(Task *askingNode) const;
//Components
#include "CORBAComponent.hxx"
#include "SalomeComponent.hxx"
+#include "SalomeHPComponent.hxx"
#include "SalomePythonComponent.hxx"
#include "CppComponent.hxx"
return new SalomePythonComponent(name);
else if (kind == CppComponent::KIND)
return new CppComponent(name);
+ else if (kind == SalomeHPComponent::KIND)
+ return new SalomeHPComponent(name);
std::string msg="Component Instance kind ("+kind+") unknown";
throw Exception(msg);
}
return KIND;
}
+std::string SalomeComponent::getKindForNode() const
+{
+ return KIND;
+}
+
//! Unload the component
void SalomeComponent::unload(Task *askingNode)
{
_objComponent=salomeContainer->loadComponent(askingNode);
return ;
}
- SalomeHPContainer *salomeContainer2(dynamic_cast<SalomeHPContainer *>(_container));
- if(salomeContainer2)
- {
- SalomeContainerHelper *lmt(0);
- {
- YACS::BASES::AutoLocker<Container> altck(salomeContainer2);
- lmt=salomeContainer2->getHelperOfTask(askingNode);
- }
- SalomeContainer tmpCont(*salomeContainer2,salomeContainer2->getContainerInfo(),lmt,
- salomeContainer2->getComponentNames(),salomeContainer2->getShutdownLev());
- _objComponent=tmpCont.loadComponent(askingNode);
- return ;
- }
- throw Exception("Unrecognized type of Container ! Only Salome and HPSalome container are supported by the Salome components !");
+ throw Exception("Unrecognized type of Container ! Only Salome are supported by the Salome components !");
}
//throw Exception("SalomeComponent::load : no container specified !!! To be implemented in executor to allocate default a Container in case of presenceOfDefaultContainer.");
//This component has no specified container : use default container policy
bool SalomeComponent::setContainer(Container *cont)
{
+ if(!dynamic_cast<SalomeContainer *>(cont))
+ throw Exception("SalomeComponent::setContainer : a Salome component must be attached to a Salome container !");
if(ComponentInstance::setContainer(cont))
{
if(_container)
public:
static const char KIND[];
virtual std::string getKind() const;
+ virtual std::string getKindForNode() const;
protected:
CORBA::Object_var _objComponent;
};
#include "SALOME_ResourcesManager.hxx"
#include "SALOME_ContainerManager.hxx"
#include "Container.hxx"
+#include "AutoLocker.hxx"
#include "YacsTrace.hxx"
#include "Proc.hxx"
stream << "_";
stream << contPtr->getName();
stream << "_";
- stream << (const void *)contPtr;
+ stream << contPtr->getDiscreminantStrOfThis();
return stream.str();
}
}
CORBA::Object_ptr SalomeContainerTools::LoadComponent(SalomeContainerHelper *launchModeType, Container *cont, Task *askingNode)
{
DEBTRACE("SalomeContainer::loadComponent ");
- cont->lock();//To be sure
const ComponentInstance *inst(askingNode?askingNode->getComponent():0);
- if(!cont->isAlreadyStarted(askingNode))
- {
- try
- {
- cont->start(askingNode);
- }
- catch(Exception& e)
- {
- cont->unLock();
- throw e;
- }
- }
- cont->unLock();
- cont->lock();//To be sure
+ {
+ YACS::BASES::AutoLocker<Container> alck(cont);//To be sure
+ if(!cont->isAlreadyStarted(askingNode))
+ cont->start(askingNode);
+ }
+ if(!inst)
+ throw Exception("SalomeContainerTools::LoadComponent : no instance of component in the task requesting for a load of its component !");
CORBA::Object_ptr objComponent=CORBA::Object::_nil();
- std::string compoName(inst->getCompoName());
- const char* componentName=compoName.c_str();
- Engines::Container_var container(launchModeType->getContainer(askingNode));
-
- char* reason;
+ {
+ YACS::BASES::AutoLocker<Container> alck(cont);//To be sure
+ std::string compoName(inst->getCompoName());
+ Engines::Container_var container(launchModeType->getContainer(askingNode));
+
+ char *reason;
+ bool isLoadable(container->load_component_Library(compoName.c_str(), reason));
+ if(isLoadable)
+ objComponent=CreateComponentInstance(cont,container,inst);
+ }
+ return objComponent;
+}
- bool isLoadable = container->load_component_Library(componentName, reason);
- if (isLoadable)
+CORBA::Object_ptr SalomeContainerTools::CreateComponentInstance(Container *cont, Engines::Container_ptr contPtr, const ComponentInstance *inst)
+{
+ if(!inst)
+ throw Exception("SalomeContainerTools::CreateComponentInstance : no instance of component in the task requesting for a load of its component !");
+ char *reason(0);
+ std::string compoName(inst->getCompoName());
+ CORBA::Object_ptr objComponent=CORBA::Object::_nil();
+ int studyid(1);
+ Proc* p(cont->getProc());
+ if(p)
{
- CORBA::string_free(reason);
- int studyid=1;
- Proc* p(cont->getProc());
- if(p)
- {
- std::string value(p->getProperty("DefaultStudyID"));
- if(!value.empty())
- studyid= atoi(value.c_str());
- }
- // prepare component instance properties
- Engines::FieldsDict_var env = new Engines::FieldsDict;
- std::map<std::string, std::string> properties = inst->getProperties();
- if(p)
- {
- std::map<std::string,std::string> procMap=p->getProperties();
- properties.insert(procMap.begin(),procMap.end());
- }
-
- std::map<std::string, std::string>::const_iterator itm;
- env->length(properties.size());
- int item=0;
- for(itm = properties.begin(); itm != properties.end(); ++itm, item++)
- {
- DEBTRACE("envname="<<itm->first<<" envvalue="<< itm->second);
- env[item].key= CORBA::string_dup(itm->first.c_str());
- env[item].value <<= itm->second.c_str();
- }
+ std::string value(p->getProperty("DefaultStudyID"));
+ if(!value.empty())
+ studyid= atoi(value.c_str());
+ }
+ // prepare component instance properties
+ Engines::FieldsDict_var env(new Engines::FieldsDict);
+ std::map<std::string, std::string> properties(inst->getProperties());
+ if(p)
+ {
+ std::map<std::string,std::string> procMap=p->getProperties();
+ properties.insert(procMap.begin(),procMap.end());
+ }
- objComponent=container->create_component_instance_env(componentName, studyid, env, reason);
+ std::map<std::string, std::string>::const_iterator itm;
+ env->length(properties.size());
+ int item=0;
+ for(itm = properties.begin(); itm != properties.end(); ++itm, item++)
+ {
+ DEBTRACE("envname="<<itm->first<<" envvalue="<< itm->second);
+ env[item].key= CORBA::string_dup(itm->first.c_str());
+ env[item].value <<= itm->second.c_str();
}
+ objComponent=contPtr->create_component_instance_env(compoName.c_str(), studyid, env, reason);
if(CORBA::is_nil(objComponent))
{
- cont->unLock();
std::string text="Error while trying to create a new component: component '"+ compoName;
text=text+"' is not installed or it's a wrong name";
text += '\n';
CORBA::string_free(reason);
throw Exception(text);
}
- cont->unLock();
return objComponent;
}
public:
static void Start(const std::vector<std::string>& compoNames, SalomeContainerHelper *schelp, SalomeContainerTools& sct, int& shutdownLevel, const Container *cont, const Task *askingNode);
static CORBA::Object_ptr LoadComponent(SalomeContainerHelper *launchModeType, Container *cont, Task *askingNode);
+ static CORBA::Object_ptr CreateComponentInstance(Container *cont, Engines::Container_ptr contPtr, const ComponentInstance *inst);
static std::string GetPlacementId(const SalomeContainerHelper *launchModeType, const Container *cont, const Task *askingNode);
static std::string GetFullPlacementId(const SalomeContainerHelper *launchModeType, const Container *cont, const Task *askingNode);
protected:
--- /dev/null
+// Copyright (C) 2006-2014 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
+//
+
+#include "SalomeHPComponent.hxx"
+#include "RuntimeSALOME.hxx"
+#include "SalomeContainer.hxx"
+#include "SalomeHPContainer.hxx"
+#include "SalomeComponent.hxx" // for KIND
+#include "CORBANode.hxx"
+#include "AutoLocker.hxx"
+
+#ifdef SALOME_KERNEL
+#include "SALOME_NamingService.hxx"
+#include "SALOME_LifeCycleCORBA.hxx"
+#endif
+
+#include <omniORB4/CORBA.h>
+#include <iostream>
+#include <sstream>
+
+//#define _DEVDEBUG_
+#include "YacsTrace.hxx"
+
+
+namespace YACS
+{
+ namespace ENGINE
+ {
+ class SalomeContainerTmpForHP : public SalomeContainer
+ {
+ public:
+ SalomeContainerTmpForHP(const Container& other, const SalomeContainerTools& sct, SalomeContainerHelper *lmt,
+ const std::vector<std::string>& componentNames, int shutdownLev,
+ const SalomeHPContainer *zeOriginCont, std::size_t pos):SalomeContainer(other,sct,lmt,componentNames,shutdownLev),_zeOriginCont(zeOriginCont),_pos(pos) { }
+ std::string getDiscreminantStrOfThis() const { std::ostringstream oss; oss << _zeOriginCont << "_" << _pos; return oss.str(); }
+ CORBA::Object_ptr loadComponent(Task *inst);
+ private:
+ const SalomeHPContainer *_zeOriginCont;
+ std::size_t _pos;
+ };
+ }
+}
+
+using namespace YACS::ENGINE;
+using namespace std;
+
+const char SalomeHPComponent::KIND[]="HPSalome";
+
+CORBA::Object_ptr SalomeContainerTmpForHP::loadComponent(Task *askingNode)
+{
+ const ComponentInstance *inst(askingNode?askingNode->getComponent():0);
+ if(!inst)
+ throw Exception("SalomeContainerTmpForHP::loadComponent : asking to load a component on the given task whereas this task has no component !");
+ std::string compoName(inst->getCompoName());
+ {
+ YACS::BASES::AutoLocker<Container> alck(this);//To be sure
+ if(!this->isAlreadyStarted(askingNode))
+ this->start(askingNode);
+ }
+ CORBA::Object_ptr objComponent=CORBA::Object::_nil();
+ {
+ YACS::BASES::AutoLocker<Container> alck(this);//To be sure
+ std::string compoName(inst->getCompoName());
+ Engines::Container_var container(_launchModeType->getContainer(askingNode));
+ objComponent=container->find_component_instance(compoName.c_str(),0);
+ if(CORBA::is_nil(objComponent))
+ {
+ char *reason;
+ bool isLoadable(container->load_component_Library(compoName.c_str(), reason));
+ if(isLoadable)
+ objComponent=SalomeContainerTools::CreateComponentInstance(this,container,inst);
+ }
+ }
+ return objComponent;
+}
+
+SalomeHPComponent::SalomeHPComponent(const std::string& name): ComponentInstance(name)
+{
+ _objComponent=CORBA::Object::_nil();
+}
+
+SalomeHPComponent::SalomeHPComponent(const SalomeHPComponent& other):ComponentInstance(other)
+{
+ _objComponent=CORBA::Object::_nil();
+}
+
+SalomeHPComponent::~SalomeHPComponent()
+{
+}
+
+std::string SalomeHPComponent::getKind() const
+{
+ return KIND;
+}
+
+std::string SalomeHPComponent::getKindForNode() const
+{
+ return SalomeComponent::KIND;
+}
+
+//! Unload the component
+void SalomeHPComponent::unload(Task *askingNode)
+{
+ //Not implemented
+ std::cerr << "SalomeHPComponent::unload : not implemented " << std::endl;
+}
+
+//! Is the component instance already loaded ?
+bool SalomeHPComponent::isLoaded(Task *askingNode) const
+{
+ return false;
+}
+
+//#ifdef SALOME_KERNEL
+//! Load the component
+void SalomeHPComponent::load(Task *askingNode)
+{
+ if(_container)
+ {
+ SalomeHPContainer *salomeContainer(dynamic_cast<SalomeHPContainer *>(_container));
+ if(salomeContainer)
+ {
+ SalomeContainerHelper *lmt(0);
+ std::size_t posIn(0);
+ {
+ YACS::BASES::AutoLocker<Container> altck(salomeContainer);
+ lmt=salomeContainer->getHelperOfTask(askingNode);
+ posIn=salomeContainer->locateTask(askingNode);
+ }
+ SalomeContainerTmpForHP tmpCont(*salomeContainer,salomeContainer->getContainerInfo(),lmt,
+ salomeContainer->getComponentNames(),salomeContainer->getShutdownLev(),salomeContainer,posIn);
+ _objComponent=tmpCont.loadComponent(askingNode);
+ return ;
+ }
+ throw Exception("Unrecognized type of Container ! Only Salome and HPSalome container are supported by the Salome components !");
+ }
+ else
+ throw Exception("No container on HP component ! Impossible to load !");
+}
+/*#else
+void SalomeComponent::load(Task *askingNode)
+{
+ throw Exception("YACS has been built without SALOME support");
+}
+#endif*/
+
+//! Create a ServiceNode with this component instance and no input or output port
+/*!
+ * \param name : node name
+ * \return a new SalomeNode node
+ */
+ServiceNode* SalomeHPComponent::createNode(const std::string& name)
+{
+ SalomeNode* node(new SalomeNode(name));
+ node->setComponent(this);
+ return node;
+}
+
+//! Clone the component instance
+ComponentInstance* SalomeHPComponent::clone() const
+{
+ if(_isAttachedOnCloning)
+ {
+ incrRef();
+ return (ComponentInstance*) (this);
+ }
+ else
+ return new SalomeHPComponent(*this);
+}
+
+std::string SalomeHPComponent::getFileRepr() const
+{
+ ostringstream stream;
+ stream << "<component>" << getCompoName() << "</component>";
+ return stream.str();
+}
+
+bool SalomeHPComponent::setContainer(Container *cont)
+{
+ if(!dynamic_cast<SalomeHPContainer *>(cont))
+ throw Exception("SalomeHPComponent::setContainer : a Salome HP component must be attached to a Salome HP container !");
+ if(ComponentInstance::setContainer(cont))
+ {
+ if(_container)
+ _container->addComponentName(_compoName);
+ return true;
+ }
+ else
+ return false;
+}
+
+void SalomeHPComponent::shutdown(int level)
+{
+ DEBTRACE("SalomeHPComponent::shutdown " << level);
+ if(_container)
+ _container->shutdown(level);
+}
--- /dev/null
+// Copyright (C) 2006-2014 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 _SALOMEHPCOMPONENT_HXX_
+#define _SALOMEHPCOMPONENT_HXX_
+
+#include "YACSRuntimeSALOMEExport.hxx"
+#include "ComponentInstance.hxx"
+#include <omniORB4/CORBA.h>
+
+namespace YACS
+{
+ namespace ENGINE
+ {
+ class YACSRUNTIMESALOME_EXPORT SalomeHPComponent : public ComponentInstance
+ {
+ public:
+ SalomeHPComponent(const std::string& name);
+ SalomeHPComponent(const SalomeHPComponent& other);
+ virtual ~SalomeHPComponent();
+ virtual void load(Task *askingNode);
+ virtual void unload(Task *askingNode);
+ virtual bool isLoaded(Task *askingNode) const;
+ virtual bool setContainer(Container *cont);
+ virtual ServiceNode* createNode(const std::string& name);
+ virtual ComponentInstance* clone() const;
+ virtual std::string getFileRepr() const;
+ virtual CORBA::Object_ptr getCompoPtr(){return CORBA::Object::_duplicate(_objComponent);}
+ virtual void shutdown(int level);
+ public:
+ static const char KIND[];
+ virtual std::string getKind() const;
+ virtual std::string getKindForNode() const;
+ protected:
+ CORBA::Object_var _objComponent;
+ };
+ }
+}
+
+#endif
//
#include "SalomeHPContainer.hxx"
-#include "SalomeComponent.hxx"
+#include "SalomeHPComponent.hxx"
#include <algorithm>
void SalomeHPContainer::checkCapabilityToDealWith(const ComponentInstance *inst) const throw(YACS::Exception)
{
- if(inst->getKind()!=SalomeComponent::KIND)
+ if(inst->getKind()!=SalomeHPComponent::KIND)
throw Exception("SalomeHPContainer::checkCapabilityToDealWith : SalomeContainer is not able to deal with this type of ComponentInstance.");
}
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; }
_currentlyWorking.erase(it);
}
-const SalomeContainerMonoHelper *SalomeHPContainerVectOfHelper::getHelperOfTask(const Task *node) const
-{
- return _launchModeType[locateTask(node)];
-}
-
-SalomeContainerMonoHelper *SalomeHPContainerVectOfHelper::getHelperOfTask(const Task *node)
-{
- return _launchModeType[locateTask(node)];
-}
-
std::size_t SalomeHPContainerVectOfHelper::locateTask(const Task *node) const
{
std::map< const Task *,std::size_t >::const_iterator it(_currentlyWorking.find(node));
return ret;
}
+const SalomeContainerMonoHelper *SalomeHPContainerVectOfHelper::getHelperOfTask(const Task *node) const
+{
+ return _launchModeType[locateTask(node)];
+}
+
+SalomeContainerMonoHelper *SalomeHPContainerVectOfHelper::getHelperOfTask(const Task *node)
+{
+ return _launchModeType[locateTask(node)];
+}
+
void SalomeHPContainerVectOfHelper::checkNoCurrentWork() const
{
for(std::map<const Task *,std::size_t >::const_iterator it=_currentlyWorking.begin();it!=_currentlyWorking.end();it++)
std::size_t getNumberOfFreePlace() const;
void allocateFor(const std::vector<const Task *>& nodes);
void release(const Task *node);
+ std::size_t locateTask(const Task *node) const;
const SalomeContainerMonoHelper *at(std::size_t pos) const { checkPosInVec(pos); return _launchModeType[pos]; }
SalomeContainerMonoHelper *at(std::size_t pos) { checkPosInVec(pos); return _launchModeType[pos]; }
const SalomeContainerMonoHelper *getHelperOfTask(const Task *node) const;
SalomeContainerMonoHelper *getHelperOfTask(const Task *node);
private:
- std::size_t locateTask(const Task *node) const;
void checkNoCurrentWork() const;
void checkPosInVec(std::size_t pos) const;
private: