X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2Fengine%2FContainer.cxx;h=56ff46279649c9f9636d8a2cd2daf466e51ff671;hb=89f536fa20e516d2de5339f741956dd1473f46a4;hp=b2817f55e47977168143bb5b6baa0eda0b9ecf06;hpb=c81be9b5e74b26e207bd6efd0ccf68418ac536a3;p=modules%2Fyacs.git diff --git a/src/engine/Container.cxx b/src/engine/Container.cxx index b2817f55e..56ff46279 100644 --- a/src/engine/Container.cxx +++ b/src/engine/Container.cxx @@ -1,9 +1,9 @@ -// Copyright (C) 2006-2012 CEA/DEN, EDF R&D +// Copyright (C) 2006-2015 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. +// 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 @@ -23,9 +23,15 @@ //#define _DEVDEBUG_ #include "YacsTrace.hxx" +#include + using namespace std; using namespace YACS::ENGINE; +const char Container::KIND_ENTRY[]="container_kind"; + +const char Container::AOC_ENTRY[]="attached_on_cloning"; + Container::Container():_isAttachedOnCloning(false),_proc(0) { } @@ -34,6 +40,22 @@ Container::~Container() { } +std::string Container::getDiscreminantStrOfThis(const Task *askingNode) const +{ + const void *ptr(this); + std::ostringstream oss; oss << ptr; + return oss.str(); +} + +/*! + * If \a val is equal to true the current container 'this' is not destined to be deeply copied on clone call. + * If \a val is equal to false the current container 'this' is destined to be deeply copied on clone call. + */ +void Container::setAttachOnCloningStatus(bool val) const +{ + _isAttachedOnCloning=val; +} + /*! * By calling this method the current container 'this' is not destined to be deeply copied on clone call. */ @@ -64,28 +86,9 @@ bool Container::isSupportingRTODefNbOfComp() const return true; } -void Container::setProperty(const std::string& name, const std::string& value) +void Container::setProperties(const std::map& properties) { - DEBTRACE("Container::setProperty " << name << " " << value); - _propertyMap[name]=value; + for (std::map::const_iterator it=properties.begin();it!=properties.end();++it) + setProperty((*it).first,(*it).second); } -std::string Container::getProperty(const std::string& name) -{ - DEBTRACE("Container::getProperty " << name ); - return _propertyMap[name]; -} - -void Container::setProperties(std::map properties) -{ - _propertyMap.clear(); - std::map::iterator it; - for (it = properties.begin(); it != properties.end(); ++it) - { - setProperty((*it).first, (*it).second); // setProperty virtual and derived - } -} - -void Container::shutdown(int level) -{ -}