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__
27 #include "DF_Label.hxx"
28 #include "DF_Attribute.hxx"
32 class SALOMEDSImpl_SComponent;
33 class SALOMEDSImpl_Study;
35 class SALOMEDSImpl_SObject
45 Standard_EXPORT SALOMEDSImpl_SObject();
46 Standard_EXPORT SALOMEDSImpl_SObject(const DF_Label& theLabel);
47 Standard_EXPORT SALOMEDSImpl_SObject(const SALOMEDSImpl_SObject& theSObject);
48 Standard_EXPORT virtual ~SALOMEDSImpl_SObject();
50 Standard_EXPORT virtual std::string GetID() const;
51 Standard_EXPORT virtual SALOMEDSImpl_SComponent GetFatherComponent() const;
52 Standard_EXPORT virtual SALOMEDSImpl_SObject GetFather() const ;
53 Standard_EXPORT virtual bool FindAttribute(DF_Attribute*& theAttribute, const std::string& theTypeOfAttribute) const;
54 Standard_EXPORT virtual bool ReferencedObject(SALOMEDSImpl_SObject& theObject) const ;
55 Standard_EXPORT virtual bool FindSubObject(int theTag, SALOMEDSImpl_SObject& theObject);
57 Standard_EXPORT virtual SALOMEDSImpl_Study* GetStudy() const;
58 Standard_EXPORT virtual std::string Name() const { return _name; }
59 Standard_EXPORT virtual void Name(const std::string& theName) { _name = theName; }
60 Standard_EXPORT virtual std::vector<DF_Attribute*> GetAllAttributes() const;
62 Standard_EXPORT virtual std::string GetName() const ;
63 Standard_EXPORT virtual std::string GetComment() const;
64 Standard_EXPORT virtual std::string GetIOR() const;
66 Standard_EXPORT virtual int Tag() const { return _lab.Tag(); }
67 Standard_EXPORT virtual int Depth() const { return _lab.Depth(); }
69 Standard_EXPORT virtual DF_Label GetLabel() const { return _lab; }
71 Standard_EXPORT bool IsNull() const { return _lab.IsNull(); }
73 Standard_EXPORT bool IsComponent() const;
75 Standard_EXPORT operator SALOMEDSImpl_SComponent() const;
77 Standard_EXPORT operator bool () const { return !IsNull(); }
79 Standard_EXPORT SALOMEDSImpl_SObject* GetPersistentCopy() const;
81 Standard_EXPORT static std::string GetGUID(const std::string& theTypeOfAttribute);