Salome HOME
Moved some functionality to VTKViewer_Utilities.h
[modules/kernel.git] / src / SALOMEDS / SALOMEDS_AttributeLocalID_i.cxx
index 0ed4628b837102fe5e497fdf727001f46652ee9d..77cef467817bd66d604b18344e0f889729442235 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"
+
+using namespace std;
 
 CORBA::Long SALOMEDS_AttributeLocalID_i::Value() {
   return Handle(SALOMEDS_LocalIDAttribute)::DownCast(_myAttr)->Get();
@@ -38,3 +38,15 @@ void SALOMEDS_AttributeLocalID_i::SetValue(CORBA::Long value) {
   CheckLocked();
   Handle(TDataStd_Integer)::DownCast(_myAttr)->Set(value);
 }
+
+char* SALOMEDS_AttributeLocalID_i::Store() {
+  char* IntVal = new char[25];
+  sprintf(IntVal, "%d", Value());
+  return IntVal;
+}
+
+void SALOMEDS_AttributeLocalID_i::Restore(const char* value) {
+  char *err = NULL;
+  CORBA::Long l =  atol(value);
+  SetValue(l);
+}