Salome HOME
PR: merge from branch BR_UnitTests tag mergeto_trunk_17oct05
[modules/yacs.git] / src / SALOMEDSImpl / SALOMEDSImpl_SObject.hxx
1 //  File   : SALOMEDSImpl_SObject.hxx
2 //  Author : Sergey RUIN
3 //  Module : SALOME
4
5 #ifndef __SALOMEDSIMPL_SOBJECT_H__
6 #define __SALOMEDSIMPL_SOBJECT_H__
7
8 //Handle definition
9 #include <Handle_MMgt_TShared.hxx>
10 #include <Standard_DefineHandle.hxx>
11 DEFINE_STANDARD_HANDLE( SALOMEDSImpl_SObject, MMgt_TShared )
12
13 class SALOMEDSImpl_SComponent;
14 class Handle_SALOMEDSImpl_SComponent;
15 class SALOMEDSImpl_Study;
16 class Handle_SALOMEDSImpl_Study;
17
18 // Cascade headers
19 #include <TDF_Label.hxx>
20 #include <TDF_Tool.hxx>
21 #include <TDF_Attribute.hxx>
22 #include <Standard_GUID.hxx>
23 #include <Standard_NoSuchObject.hxx>
24 #include <TCollection_AsciiString.hxx>
25 #include <TColStd_HSequenceOfTransient.hxx>
26
27 class SALOMEDSImpl_SObject : public MMgt_TShared 
28 {
29 protected:
30   TDF_Label                _lab;
31   TCollection_AsciiString  _name;  
32   TCollection_AsciiString  _value;
33   TCollection_AsciiString  _type;
34
35 public:
36   
37   Standard_EXPORT SALOMEDSImpl_SObject(const TDF_Label& theLabel);
38   Standard_EXPORT ~SALOMEDSImpl_SObject();
39   
40   Standard_EXPORT virtual TCollection_AsciiString GetID();
41   Standard_EXPORT virtual Handle(SALOMEDSImpl_SComponent) GetFatherComponent();
42   Standard_EXPORT virtual Handle(SALOMEDSImpl_SObject) GetFather() ;
43   Standard_EXPORT virtual bool FindAttribute(Handle(TDF_Attribute)& theAttribute, const TCollection_AsciiString& theTypeOfAttribute);
44   Standard_EXPORT virtual bool ReferencedObject(Handle(SALOMEDSImpl_SObject)& theObject) ;
45   Standard_EXPORT virtual bool FindSubObject(int theTag, Handle(SALOMEDSImpl_SObject)& theObject);
46
47   Standard_EXPORT virtual Handle(SALOMEDSImpl_Study) GetStudy() ;
48   Standard_EXPORT virtual TCollection_AsciiString Name() { return _name; }
49   Standard_EXPORT virtual void Name(const TCollection_AsciiString& theName) { _name = theName; }
50   Standard_EXPORT virtual Handle(TColStd_HSequenceOfTransient) GetAllAttributes();
51
52   Standard_EXPORT virtual TCollection_AsciiString GetName();
53   Standard_EXPORT virtual TCollection_AsciiString GetComment();
54   Standard_EXPORT virtual TCollection_AsciiString GetIOR();
55
56   Standard_EXPORT virtual int Tag() { return _lab.Tag(); }
57   Standard_EXPORT virtual int Depth() { return _lab.Depth(); }
58
59   Standard_EXPORT virtual TDF_Label GetLabel() { return _lab; }   
60
61   Standard_EXPORT static Standard_GUID GetGUID(const TCollection_AsciiString& theTypeOfAttribute);
62
63 public:
64   DEFINE_STANDARD_RTTI( SALOMEDSImpl_SObject )
65 };
66 #endif