Salome HOME
Issue 0013373: EDF PAL 273 : Option Single/Multi file dump
[modules/kernel.git] / src / SALOMEDS / SALOMEDS_SObject.cxx
index c9f45d4a3a9e1fb505b257923f0344893817c001..4d9a2a1654740d4716c090c281e054368da512ed 100644 (file)
@@ -96,13 +96,18 @@ SALOMEDS_SObject::SALOMEDS_SObject(const SALOMEDSImpl_SObject& theSObject)
 SALOMEDS_SObject::~SALOMEDS_SObject()
 {
   if (!_isLocal) {
-    _corba_impl->Destroy();
+    _corba_impl->UnRegister();
   }
   else {
     if(_local_impl) delete _local_impl;
   }
 }
 
+bool SALOMEDS_SObject::IsNull() const
+{
+  return _isLocal ? ( !_local_impl || _local_impl->IsNull() ) : _corba_impl->IsNull();
+}
+
 std::string SALOMEDS_SObject::GetID()
 {
   std::string aValue;
@@ -342,3 +347,16 @@ void SALOMEDS_SObject::init_orb()
   ASSERT(SINGLETON_<ORB_INIT>::IsAlreadyExisting());
   _orb = init(0 , 0 ) ;     
 }
+
+void SALOMEDS_SObject::SetAttrString(const std::string& name, const std::string& value)
+{
+  if(_isLocal)
+    {
+      SALOMEDS::Locker lock;
+      _local_impl->SetAttrString(name,value);
+    }
+  else
+    {
+      _corba_impl->SetAttrString(name.c_str(),value.c_str());
+    }
+}