]> SALOME platform Git repositories - modules/kernel.git/blob - src/SALOMEDSImpl/SALOMEDSImpl_GenericAttribute.hxx
Salome HOME
PR: merge from branch BR_UnitTests tag mergeto_trunk_17oct05
[modules/kernel.git] / src / SALOMEDSImpl / SALOMEDSImpl_GenericAttribute.hxx
1 //  File   : SALOMEDSImpl_GenericAttribute.hxx
2 //  Author : SERGEY_RUIN
3 //  Module : SALOME
4
5 #ifndef _GENERICIMPL_ATTRIBUTE_HXX_
6 #define _GENERICIMPL_ATTRIBUTE_HXX_
7
8 #include <TDF_Label.hxx>
9 #include <TCollection_AsciiString.hxx>
10 #include <Standard_DefineHandle.hxx>
11 #include <TDF_Attribute.hxx>
12 #include <Standard_GUID.hxx>     
13
14 #include "SALOMEDSImpl_SObject.hxx"
15
16 class Handle(TDF_Attribute);
17 class Handle(TDF_RelocationTable);
18
19
20 DEFINE_STANDARD_HANDLE( SALOMEDSImpl_GenericAttribute, TDF_Attribute )
21
22 class SALOMEDSImpl_GenericAttribute: public TDF_Attribute
23 {
24 protected:
25
26   TCollection_AsciiString _type; //This field must be filled in each attribute that inherits from this class.
27
28 public:
29
30 Standard_EXPORT SALOMEDSImpl_GenericAttribute(const TCollection_AsciiString& theType) 
31 :_type(theType)
32 {}
33
34 Standard_EXPORT virtual TCollection_AsciiString Save() { return ""; } 
35 Standard_EXPORT virtual void Load(const TCollection_AsciiString&) {}
36 Standard_EXPORT virtual TCollection_AsciiString Type();
37 Standard_EXPORT virtual void CheckLocked();
38 Standard_EXPORT TCollection_AsciiString GetClassType() { return _type; }
39 Standard_EXPORT Handle(SALOMEDSImpl_SObject) GetSObject();
40 Standard_EXPORT void SetModifyFlag();
41
42 Standard_EXPORT static char* Impl_GetType(const Handle(TDF_Attribute)& theAttr); 
43 Standard_EXPORT static char* Impl_GetClassType(const Handle(TDF_Attribute)& theAttr);
44 Standard_EXPORT static void Impl_CheckLocked(const Handle(TDF_Attribute)& theAttr);
45
46 public:
47   DEFINE_STANDARD_RTTI( SALOMEDSImpl_GenericAttribute )
48
49 };
50
51
52 #endif