1 // Copyright (C) 2006-2013 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #include "InlineNode.hxx"
21 #include "Visitor.hxx"
22 #include "Container.hxx"
26 #include "YacsTrace.hxx"
28 using namespace YACS::ENGINE;
32 InlineNode::~InlineNode() { }
34 void InlineNode::accept(Visitor *visitor)
36 visitor->visitInlineNode(this);
39 //! Set the script (as a string) to execute
41 * \param script: script to execute
43 void InlineNode::setScript(const std::string& script)
50 InlineFuncNode::~InlineFuncNode()
53 _container->decrRef();
56 void InlineFuncNode::accept(Visitor *visitor)
58 visitor->visitInlineFuncNode(this);
61 void InlineFuncNode::setFname(const std::string& fname)
67 void InlineFuncNode::checkBasicConsistency() const throw(YACS::Exception)
69 InlineNode::checkBasicConsistency();
72 string mess = "Function name is not defined";
73 throw Exception(mess);
77 void InlineNode::setExecutionMode(const std::string& mode)
79 if(mode == _mode)return;
80 if(mode == "local"||mode == "remote")
87 std::string InlineNode::getExecutionMode()
92 Container* InlineNode::getContainer()
97 void InlineNode::setContainer(Container* cont)
99 if (cont == _container) return;
101 _container->decrRef();
104 _container->incrRef();
107 void InlineNode::performDuplicationOfPlacement(const Node& other)
109 const InlineNode &otherC=*(dynamic_cast<const InlineNode *>(&other));
110 //if other has no container don't clone: this will not have one
111 if(otherC._container)
112 _container=otherC._container->clone();
115 bool InlineNode::isDeployable() const