1 // Copyright (C) 2006-2008 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
19 #include "ComponentInstanceTest.hxx"
20 #include "ToyNode.hxx"
23 using namespace YACS::ENGINE;
25 ComponentInstanceTest1::ComponentInstanceTest1(const ComponentInstanceTest1& other):ComponentInstance(other),_loaded(false)
29 ComponentInstanceTest1::ComponentInstanceTest1(const std::string& name):ComponentInstance(name),_loaded(false)
33 void ComponentInstanceTest1::load()
38 void ComponentInstanceTest1::unload()
43 bool ComponentInstanceTest1::isLoaded()
48 std::string ComponentInstanceTest1::getKind() const
50 return ToyNode1S::KIND;
53 ServiceNode* ComponentInstanceTest1::createNode(const std::string& name)
55 ToyNode1S* node=new ToyNode1S(name);
56 node->setComponent(this);
60 ComponentInstance *ComponentInstanceTest1::clone() const
62 if(isAttachedOnCloning())
65 return (ComponentInstance *) this;
68 return new ComponentInstanceTest1(*this);
71 ComponentInstanceTest2::ComponentInstanceTest2(const ComponentInstanceTest2& other):ComponentInstance(other),_loaded(false)
75 ComponentInstanceTest2::ComponentInstanceTest2(const std::string& name):ComponentInstance(name),_loaded(false)
79 void ComponentInstanceTest2::load()
84 void ComponentInstanceTest2::unload()
89 bool ComponentInstanceTest2::isLoaded()
94 std::string ComponentInstanceTest2::getKind() const
96 return ToyNode2S::KIND;
99 ServiceNode* ComponentInstanceTest2::createNode(const std::string& name)
101 ToyNode2S* node=new ToyNode2S(name);
102 node->setComponent(this);
106 ComponentInstance *ComponentInstanceTest2::clone() const
108 if(isAttachedOnCloning())
111 return (ComponentInstance *) this;
114 return new ComponentInstanceTest2(*this);