+/*!
+ * \param fname: name of the function contained in the script to execute
+ */
+void InlineFuncNode::setFname(const std::string& fname)
+{
+ _fname=fname;
+ modified();
+}
+
+void InlineFuncNode::checkBasicConsistency() const throw(YACS::Exception)
+{
+ InlineNode::checkBasicConsistency();
+ if(_fname.empty() )
+ {
+ string mess = "Function name is not defined";
+ throw Exception(mess);
+ }
+}
+
+void InlineNode::setExecutionMode(const std::string& mode)
+{
+ if(mode == _mode)return;
+ if(mode == LOCAL_STR || mode == REMOTE_STR)
+ {
+ _mode=mode;
+ modified();
+ }
+}
+
+std::string InlineNode::getExecutionMode()
+{
+ return _mode;
+}
+
+Container* InlineNode::getContainer()
+{
+ return _container;
+}
+
+void InlineNode::setContainer(Container* cont)
+{
+ if (cont == _container) return;
+ if(_container)
+ _container->decrRef();
+ _container=cont;
+ if(_container)
+ _container->incrRef();
+}
+
+void InlineNode::performDuplicationOfPlacement(const Node& other)
+{
+ const InlineNode &otherC=*(dynamic_cast<const InlineNode *>(&other));
+ //if other has no container don't clone: this will not have one
+ if(otherC._container)
+ _container=otherC._container->clone();
+}
+
+void InlineNode::performShallowDuplicationOfPlacement(const Node& other)
+{
+ const InlineNode &otherC=*(dynamic_cast<const InlineNode *>(&other));
+ //if other has no container don't clone: this will not have one
+ if(otherC._container)
+ {
+ _container=otherC._container;
+ _container->incrRef();
+ }
+}
+
+bool InlineNode::isDeployable() const
+{
+ if(_mode==REMOTE_STR)
+ return true;
+ else
+ return false;
+}
+
+int InlineNode::getMaxLevelOfParallelism() const
+{
+ if(!isDeployable())
+ return 1;
+ if(!_container)
+ return 1;
+ std::map<std::string,std::string> props(_container->getProperties());
+ std::map<std::string,std::string>::iterator it(props.find(std::string("nb_proc_per_node")));
+ if(it==props.end())
+ return 1;
+ if((*it).second.empty())
+ return 1;
+ std::istringstream iss((*it).second);
+ int ret(1); iss >> ret;
+ return ret;
+}
+
+void InlineNode::partitionRegardingDPL(const PartDefinition *pd, std::map<ComposedNode *, YACS::BASES::AutoRefCnt<PartDefinition> >& zeMap)
+{
+ if(!isDeployable())
+ return ;
+ if(!_container)
+ return ;
+ HomogeneousPoolContainer *contC(dynamic_cast<HomogeneousPoolContainer *>(_container));
+ if(!contC)
+ return ;
+ YACS::BASES::AutoConstRefCnt<PartDefinition> zePd;
+ zePd.takeRef(pd);
+ YACS::BASES::AutoRefCnt<HomogeneousPoolContainer> zeCont(contC->decorate(zePd));
+ setContainer(zeCont);
+}