Salome HOME
Save/Load manages HPContainers.
[modules/yacs.git] / src / engine / Container.cxx
index 2827536692aeacb99a4b18218fe0dc84041a5e2f..d922a9deb97ac94d09d07d78a97144803988c9d0 100644 (file)
 //#define _DEVDEBUG_
 #include "YacsTrace.hxx"
 
+#include <sstream>
+
 using namespace std;
 using namespace YACS::ENGINE;
 
+const char Container::KIND_ENTRY[]="container_kind";
+
 Container::Container():_isAttachedOnCloning(false),_proc(0)
 {
 }
@@ -34,6 +38,13 @@ Container::~Container()
 {
 }
 
+std::string Container::getDiscreminantStrOfThis(const Task *askingNode) const
+{
+  const void *ptr(this);
+  std::ostringstream oss; oss << ptr;
+  return oss.str();
+}
+
 /*!
  * By calling this method the current container 'this' is not destined to be deeply copied on clone call.
  */
@@ -64,28 +75,9 @@ bool Container::isSupportingRTODefNbOfComp() const
   return true;
 }
 
-void Container::setProperty(const std::string& name, const std::string& value)
+void Container::setProperties(const std::map<std::string,std::string>& properties)
 {
-  DEBTRACE("Container::setProperty " << name << " " << value);
-  _propertyMap[name]=value;
+  for (std::map<std::string,std::string>::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<std::string,std::string> properties)
-{
-  _propertyMap.clear();
-  std::map<std::string,std::string>::iterator it;
-  for (it = properties.begin(); it != properties.end(); ++it)
-    {
-      setProperty((*it).first, (*it).second); // setProperty virtual and derived
-    }
-}
-
-void Container::shutdown(int level)
-{
-}