]> SALOME platform Git repositories - modules/kernel.git/blob - src/SALOMEDSImpl/SALOMEDSImpl_StudyHandle.hxx
Salome HOME
PR: merge from branch BR_UnitTests tag mergeto_trunk_17oct05
[modules/kernel.git] / src / SALOMEDSImpl / SALOMEDSImpl_StudyHandle.hxx
1 //  File   : SALOMEDSImpl_StudyHandle.hxx
2 //  Author : Sergey RUIN
3 //  Module : SALOME
4
5 #ifndef SALOMEDSImpl_StudyHandle_HeaderFile
6 #define SALOMEDSImpl_StudyHandle_HeaderFile
7
8 #include <Standard_DefineHandle.hxx>
9 #include <TDF_Attribute.hxx>
10 #include <TDF_Label.hxx>
11
12 class Standard_GUID;
13 class Handle(TDF_Attribute);
14 class Handle(TDF_RelocationTable);
15
16 /*
17   Class       : SALOMEDSImpl_StudyHandle
18   Description : PRIVATE: This class is intended for storing of the study handle 
19 */
20
21 DEFINE_STANDARD_HANDLE( SALOMEDSImpl_StudyHandle, TDF_Attribute )
22
23 #include "SALOMEDSImpl_Study.hxx"
24
25 #ifndef WNT
26 class Standard_EXPORT SALOMEDSImpl_StudyHandle : public TDF_Attribute
27 #else
28 class SALOMEDSImpl_StudyHandle : public TDF_Attribute
29 #endif
30 {
31
32 public:
33 Standard_EXPORT                                  SALOMEDSImpl_StudyHandle();
34 Standard_EXPORT                                  ~SALOMEDSImpl_StudyHandle() { myHandle.Nullify(); }
35
36 Standard_EXPORT  static Handle(SALOMEDSImpl_StudyHandle) Set(const TDF_Label& theLabel, const Handle(SALOMEDSImpl_Study)& theStudy); 
37 Standard_EXPORT  static const                    Standard_GUID& GetID() ;
38
39 Standard_EXPORT  void                            SetHandle(const Handle(SALOMEDSImpl_Study)& theStudy) { myHandle = theStudy; }
40 Standard_EXPORT  Handle(SALOMEDSImpl_Study)      GetHandle() { return myHandle; }
41 Standard_EXPORT  const Standard_GUID&            ID() const;
42 Standard_EXPORT  void                            Restore( const Handle(TDF_Attribute)& theWith );
43 Standard_EXPORT  Handle(TDF_Attribute)           NewEmpty() const;
44 Standard_EXPORT  void                            Paste( const Handle(TDF_Attribute)& theInto,
45                                                                                     const Handle(TDF_RelocationTable)& ) const;
46   
47 private:
48   Handle(SALOMEDSImpl_Study) myHandle;
49
50 public:
51   DEFINE_STANDARD_RTTI( SALOMEDSImpl_StudyHandle )
52 };
53
54 #endif