Salome HOME
Moved some functionality to VTKViewer_Utilities.h
[modules/kernel.git] / src / SALOMEDS / SALOMEDS_AttributeInteger_i.cxx
index d9f013db76ce4b7e51e874d561647b9b00ad2ca4..8e40d859067ffa3ad0da72299960ffe0571b5417 100644 (file)
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include "SALOMEDS_AttributeInteger_i.hxx"
-#include "SALOMEDS_SObject_i.hxx"
 
+using namespace std;
 
 CORBA::Long SALOMEDS_AttributeInteger_i::Value() {
   return Handle(TDataStd_Integer)::DownCast(_myAttr)->Get();
@@ -39,3 +38,15 @@ void SALOMEDS_AttributeInteger_i::SetValue(CORBA::Long value) {
   CheckLocked();
   Handle(TDataStd_Integer)::DownCast(_myAttr)->Set(value);
 }
+
+char* SALOMEDS_AttributeInteger_i::Store() {
+  char* IntVal = new char[25];
+  sprintf(IntVal, "%d", Value());
+  return IntVal;
+}
+
+void SALOMEDS_AttributeInteger_i::Restore(const char* value) {
+  char *err = NULL;
+  CORBA::Long l =  atol(value);
+  SetValue(l);
+}