]> SALOME platform Git repositories - modules/kernel.git/blob - src/SALOMEDSImpl/SALOMEDSImpl_AttributeLocalID.hxx
Salome HOME
78dadd861b049eaef50c58bb5945c635f7c2975f
[modules/kernel.git] / src / SALOMEDSImpl / SALOMEDSImpl_AttributeLocalID.hxx
1 //  File   : SALOMEDSImpl_AttributeLocalID.hxx
2 //  Author : Sergey RUIN
3 //  Module : SALOME
4
5 #ifndef _SALOMEDSImpl_AttributeLocalID_HeaderFile
6 #define _SALOMEDSImpl_AttributeLocalID_HeaderFile
7
8 #include <Standard_DefineHandle.hxx>
9 #include <TDF_Attribute.hxx>
10 #include <TCollection_AsciiString.hxx> 
11 #include <TDF_Label.hxx>       
12 #include "SALOMEDSImpl_GenericAttribute.hxx"
13
14 class Standard_GUID;
15 class Handle(TDF_Attribute);
16 class Handle(TDF_RelocationTable);
17
18
19 DEFINE_STANDARD_HANDLE( SALOMEDSImpl_AttributeLocalID, SALOMEDSImpl_GenericAttribute )
20
21
22
23 class SALOMEDSImpl_AttributeLocalID : public SALOMEDSImpl_GenericAttribute 
24 {
25 private:
26 Standard_Integer myValue;
27
28 public:
29
30 Standard_EXPORT  virtual TCollection_AsciiString Save() { return TCollection_AsciiString(myValue); }
31 Standard_EXPORT  virtual void Load(const TCollection_AsciiString& theValue) { myValue = theValue.IntegerValue(); }  
32
33 Standard_EXPORT static const Standard_GUID& GetID() ;
34 Standard_EXPORT static  Handle_SALOMEDSImpl_AttributeLocalID Set(const TDF_Label& label,const Standard_Integer value) ;
35 Standard_EXPORT  void SetValue(const Standard_Integer value);  
36 Standard_EXPORT Standard_Integer Value() const { return myValue; }  
37 Standard_EXPORT SALOMEDSImpl_AttributeLocalID();
38 Standard_EXPORT  const Standard_GUID& ID() const;
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_AttributeLocalID() {}
43
44 public:
45   DEFINE_STANDARD_RTTI( SALOMEDSImpl_AttributeLocalID )
46 };
47
48 #endif