Salome HOME
This commit was generated by cvs2git to track changes on a CVS vendor
[modules/kernel.git] / src / SALOMEDS / SALOMEDS_AttributeComment_i.cxx
1 using namespace std;
2 //  File      : SALOMEDS_AttributeComment_i.cxx
3 //  Created   : Fri Jul 05 14:55:07 2002
4 //  Author    : Yves FRICAUD
5
6 //  Project   : SALOME
7 //  Module    : SALOMEDS
8 //  Copyright : Open CASCADE 2002
9 //  $Header$
10
11
12 #include "SALOMEDS_AttributeComment_i.hxx"
13
14 #include <TCollection_ExtendedString.hxx>
15 #include "SALOMEDS_SObject_i.hxx"
16
17 char* SALOMEDS_AttributeComment_i::Value()
18 {
19   TCollection_ExtendedString S = Handle(TDataStd_Comment)::DownCast(_myAttr)->Get();
20   CORBA::String_var c_s = CORBA::string_dup(TCollection_AsciiString(S).ToCString());
21   return c_s._retn();
22 }
23
24 void SALOMEDS_AttributeComment_i::SetValue(const char* value) 
25 {
26   CheckLocked();
27   CORBA::String_var Str = CORBA::string_dup(value);
28   Handle(TDataStd_Comment)::DownCast(_myAttr)->Set(TCollection_ExtendedString(Str));
29 }