Salome HOME
86c5aee80fa072e5bf6793d38ac1a13ffe91d0e4
[modules/kernel.git] / src / SALOMEDSImpl / SALOMEDSImpl_AttributeComment.hxx
1 //  File   : SALOMEDSImpl_AttributeIOR.hxx
2 //  Author : Sergey RUIN
3 //  Module : SALOME
4
5 #ifndef _SALOMEDSImpl_AttributeComment_HeaderFile
6 #define _SALOMEDSImpl_AttributeComment_HeaderFile
7
8 #include <Standard_DefineHandle.hxx>
9 #include <TDF_Attribute.hxx>
10 #include <TCollection_AsciiString.hxx>
11 #include <TCollection_ExtendedString.hxx>
12 #include <TDF_Label.hxx> 
13 #include <Standard_GUID.hxx> 
14 #include "SALOMEDSImpl_GenericAttribute.hxx"
15
16 class Handle(TDF_Attribute);
17 class Handle(TDF_RelocationTable);
18
19 DEFINE_STANDARD_HANDLE( SALOMEDSImpl_AttributeComment, SALOMEDSImpl_GenericAttribute )
20
21 class SALOMEDSImpl_AttributeComment : public SALOMEDSImpl_GenericAttribute 
22 {
23 private:
24
25  TCollection_ExtendedString myString;
26
27 public:
28
29 Standard_EXPORT static const Standard_GUID& GetID() ;
30
31 Standard_EXPORT  SALOMEDSImpl_AttributeComment() :SALOMEDSImpl_GenericAttribute("AttributeComment") {}
32
33 Standard_EXPORT  static Handle(SALOMEDSImpl_AttributeComment) Set(const TDF_Label& L, const TCollection_ExtendedString& Val); 
34 Standard_EXPORT  void SetValue (const TCollection_ExtendedString& S);
35 Standard_EXPORT  TCollection_ExtendedString Value() const { return myString; }
36
37 Standard_EXPORT  virtual TCollection_AsciiString Save() { return myString; }
38 Standard_EXPORT  virtual void Load(const TCollection_AsciiString& theValue) { myString = theValue; }
39
40 Standard_EXPORT  const Standard_GUID& ID() const;
41 Standard_EXPORT  void Restore(const Handle(TDF_Attribute)& with) ;
42 Standard_EXPORT  Handle_TDF_Attribute NewEmpty() const;
43 Standard_EXPORT  void Paste(const Handle(TDF_Attribute)& into,const Handle(TDF_RelocationTable)& RT) const;
44
45 Standard_EXPORT ~SALOMEDSImpl_AttributeComment() {}
46
47 public:
48   DEFINE_STANDARD_RTTI( SALOMEDSImpl_AttributeComment )
49 };
50
51 #endif