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 "Container.hxx"
20 #include "ComponentInstance.hxx"
23 #include "YacsTrace.hxx"
26 using namespace YACS::ENGINE;
28 Container::Container():_isAttachedOnCloning(false)
32 Container::~Container()
37 * By calling this method the current container 'this' is not destined to be deeply copied on clone call.
39 void Container::attachOnCloning() const
41 _isAttachedOnCloning=true;
45 * By calling this method the current container 'this' will be deeply copied on clone call.
47 void Container::dettachOnCloning() const
49 _isAttachedOnCloning=false;
52 bool Container::isAttachedOnCloning() const
54 return _isAttachedOnCloning;
58 * This method informs about the capability of the container to deal with CT an unpredictably number of components.
61 bool Container::isSupportingRTODefNbOfComp() const
66 void Container::setProperty(const std::string& name, const std::string& value)
68 DEBTRACE("Container::setProperty " << name << " " << value);
69 _propertyMap[name]=value;
72 std::string Container::getProperty(const std::string& name)
74 DEBTRACE("Container::getProperty " << name );
75 return _propertyMap[name];
78 void Container::setProperties(std::map<std::string,std::string> properties)
81 std::map<std::string,std::string>::iterator it;
82 for (it = properties.begin(); it != properties.end(); ++it)
84 setProperty((*it).first, (*it).second); // setProperty virtual and derived