Salome HOME
f660a28fd81d5a44c0ad79c6b58413cc2c58d30d
[modules/kernel.git] / src / SALOMEDSImpl / SALOMEDSImpl_AttributePersistentRef.hxx
1 //  File   : SALOMEDSImpl_AttributePersistentRef.hxx
2 //  Author : Sergey RUIN
3 //  Module : SALOME
4
5 #ifndef _SALOMEDSImpl_AttributePersistentRef_HeaderFile
6 #define _SALOMEDSImpl_AttributePersistentRef_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 "SALOMEDSImpl_GenericAttribute.hxx"
14
15 class Standard_GUID;
16 class Handle(TDF_Attribute);
17 class Handle(TDF_RelocationTable);
18
19
20 DEFINE_STANDARD_HANDLE( SALOMEDSImpl_AttributePersistentRef, SALOMEDSImpl_GenericAttribute )
21
22 class SALOMEDSImpl_AttributePersistentRef : public SALOMEDSImpl_GenericAttribute 
23 {
24 private:
25  TCollection_ExtendedString myString;
26
27 public:
28
29 Standard_EXPORT virtual TCollection_AsciiString Save() { return myString; }
30 Standard_EXPORT virtual void Load(const TCollection_AsciiString& theValue) { myString = theValue; } 
31
32 Standard_EXPORT static const Standard_GUID& GetID() ;
33 Standard_EXPORT static  Handle_SALOMEDSImpl_AttributePersistentRef Set(const TDF_Label& label,
34                                                                        const TCollection_ExtendedString& string) ;
35 Standard_EXPORT SALOMEDSImpl_AttributePersistentRef();
36 Standard_EXPORT  const Standard_GUID& ID() const;
37 Standard_EXPORT void SetValue(const TCollection_ExtendedString& value); 
38 Standard_EXPORT TCollection_ExtendedString Value() const { return myString; }
39 Standard_EXPORT   void Restore(const Handle(TDF_Attribute)& with) ;
40 Standard_EXPORT   Handle_TDF_Attribute NewEmpty() const;
41 Standard_EXPORT   void Paste(const Handle(TDF_Attribute)& into,const Handle(TDF_RelocationTable)& RT) const;
42 Standard_EXPORT ~SALOMEDSImpl_AttributePersistentRef() {}
43
44 public:
45   DEFINE_STANDARD_RTTI( SALOMEDSImpl_AttributePersistentRef )
46 };
47
48 #endif