Salome HOME
Moved some functionality to VTKViewer_Utilities.h
[modules/kernel.git] / src / SALOMEDS / SALOMEDS_AttributeName_i.cxx
index 415f71af3fe41d290c388819e22d1982ac559110..b495f26bfb805f077a8fe3715307d9b10b22e535 100644 (file)
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include "SALOMEDS_AttributeName_i.hxx"
 #include <TCollection_ExtendedString.hxx>
-#include "SALOMEDS_SObject_i.hxx"
+#include <TCollection_AsciiString.hxx>
+
+using namespace std;
 
 char* SALOMEDS_AttributeName_i::Value() {
   TCollection_ExtendedString S = Handle(TDataStd_Name)::DownCast(_myAttr)->Get();
@@ -37,8 +38,15 @@ char* SALOMEDS_AttributeName_i::Value() {
   return c_s._retn();
 }
 
-void SALOMEDS_AttributeName_i::SetValue(const char* value) {
+void SALOMEDS_AttributeName_i::SetValue(const char* theValue) {
   CheckLocked();
-  CORBA::String_var Str = CORBA::string_dup(value);
-  Handle(TDataStd_Name)::DownCast(_myAttr)->Set(TCollection_ExtendedString(Str));
+  Handle(TDataStd_Name)::DownCast(_myAttr)->Set(TCollection_ExtendedString((char*)theValue));
+}
+
+char* SALOMEDS_AttributeName_i::Store() {
+  return Value();
+}
+
+void SALOMEDS_AttributeName_i::Restore(const char* value) {
+  SetValue(value);
 }