1 // Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License.
9 // This library is distributed in the hope that it will be useful
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 // File : SALOMEDSImpl_SObject.hxx
21 // Author : Sergey RUIN
24 #ifndef __SALOMEDSIMPL_SOBJECT_H__
25 #define __SALOMEDSIMPL_SOBJECT_H__
28 #include <Handle_MMgt_TShared.hxx>
29 #include <Standard_DefineHandle.hxx>
30 DEFINE_STANDARD_HANDLE( SALOMEDSImpl_SObject, MMgt_TShared )
32 class SALOMEDSImpl_SComponent;
33 class Handle_SALOMEDSImpl_SComponent;
34 class SALOMEDSImpl_Study;
35 class Handle_SALOMEDSImpl_Study;
38 #include <TDF_Label.hxx>
39 #include <TDF_Tool.hxx>
40 #include <TDF_Attribute.hxx>
41 #include <Standard_GUID.hxx>
42 #include <Standard_NoSuchObject.hxx>
43 #include <TCollection_AsciiString.hxx>
44 #include <TColStd_HSequenceOfTransient.hxx>
46 class SALOMEDSImpl_SObject : public MMgt_TShared
50 TCollection_AsciiString _name;
51 TCollection_AsciiString _value;
52 TCollection_AsciiString _type;
56 Standard_EXPORT SALOMEDSImpl_SObject(const TDF_Label& theLabel);
57 Standard_EXPORT ~SALOMEDSImpl_SObject();
59 Standard_EXPORT virtual TCollection_AsciiString GetID();
60 Standard_EXPORT virtual Handle(SALOMEDSImpl_SComponent) GetFatherComponent();
61 Standard_EXPORT virtual Handle(SALOMEDSImpl_SObject) GetFather() ;
62 Standard_EXPORT virtual bool FindAttribute(Handle(TDF_Attribute)& theAttribute, const TCollection_AsciiString& theTypeOfAttribute);
63 Standard_EXPORT virtual bool ReferencedObject(Handle(SALOMEDSImpl_SObject)& theObject) ;
64 Standard_EXPORT virtual bool FindSubObject(int theTag, Handle(SALOMEDSImpl_SObject)& theObject);
66 Standard_EXPORT virtual Handle(SALOMEDSImpl_Study) GetStudy() ;
67 Standard_EXPORT virtual TCollection_AsciiString Name() { return _name; }
68 Standard_EXPORT virtual void Name(const TCollection_AsciiString& theName) { _name = theName; }
69 Standard_EXPORT virtual Handle(TColStd_HSequenceOfTransient) GetAllAttributes();
71 Standard_EXPORT virtual TCollection_AsciiString GetName();
72 Standard_EXPORT virtual TCollection_AsciiString GetComment();
73 Standard_EXPORT virtual TCollection_AsciiString GetIOR();
75 Standard_EXPORT virtual int Tag() { return _lab.Tag(); }
76 Standard_EXPORT virtual int Depth() { return _lab.Depth(); }
78 Standard_EXPORT virtual TDF_Label GetLabel() { return _lab; }
80 Standard_EXPORT static Standard_GUID GetGUID(const TCollection_AsciiString& theTypeOfAttribute);
83 DEFINE_STANDARD_RTTI( SALOMEDSImpl_SObject )