Salome HOME
Merge from branch CCRT_Port_V220.
[modules/kernel.git] / src / SALOMEDS / SALOMEDS_AttributeLocalID_i.cxx
index 0ed4628b837102fe5e497fdf727001f46652ee9d..b8e95836ce2a35a7b91b37dcec079592ecb7bab1 100644 (file)
 //  File   : SALOMEDS_AttributeLocalID_i.cxx
 //  Author : Yves FRICAUD
 //  Module : SALOME
-//  $Header
+//  $Header$
 
-using namespace std;
 #include "SALOMEDS_AttributeLocalID_i.hxx"
-#include "SALOMEDS_SObject_i.hxx"
+#include "SALOMEDS.hxx"
+
+using namespace std;
 
 CORBA::Long SALOMEDS_AttributeLocalID_i::Value() {
+  SALOMEDS::Locker lock;
+
   return Handle(SALOMEDS_LocalIDAttribute)::DownCast(_myAttr)->Get();
 }
                                                            
 void SALOMEDS_AttributeLocalID_i::SetValue(CORBA::Long value) {
+  SALOMEDS::Locker lock;
+
   CheckLocked();
   Handle(TDataStd_Integer)::DownCast(_myAttr)->Set(value);
 }
+
+char* SALOMEDS_AttributeLocalID_i::Store() {
+  SALOMEDS::Locker lock;
+
+  char* IntVal = new char[25];
+  sprintf(IntVal, "%d", Value());
+  return IntVal;
+}
+
+void SALOMEDS_AttributeLocalID_i::Restore(const char* value) {
+  SALOMEDS::Locker lock;
+
+  char *err = NULL;
+  CORBA::Long l =  atol(value);
+  SetValue(l);
+}