Salome HOME
A patch from Paul RASCLE for: kernel documentation with doxygen, modification on...
[modules/kernel.git] / src / SALOMEDS / SALOMEDS_SObject.hxx
1 // Copyright (C) 2005  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
3 // 
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.
8 // 
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.
13 //
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
17 //
18 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 //
20 //  File   : SALOMEDS_SObject.hxx
21 //  Author : Sergey RUIN
22 //  Module : SALOME
23
24 #ifndef __SALOMEDS_SOBJECT_H__
25 #define __SALOMEDS_SOBJECT_H__
26
27 // std C++ headers
28 #include <vector>
29
30 #include <SALOMEDSClient.hxx>
31
32 // IDL headers
33 #include <SALOMEconfig.h>
34 #include CORBA_SERVER_HEADER(SALOMEDS)
35
36 #include "SALOMEDSImpl_SObject.hxx"
37
38 class Standard_EXPORT SALOMEDS_SObject: public virtual SALOMEDSClient_SObject
39 {
40 protected:
41
42   bool                         _isLocal;
43   SALOMEDSImpl_SObject*        _local_impl;
44   SALOMEDS::SObject_var        _corba_impl;
45   CORBA::ORB_var               _orb;
46
47 public:
48   
49   SALOMEDS_SObject(SALOMEDS::SObject_ptr theSObject);
50   SALOMEDS_SObject(const SALOMEDSImpl_SObject& theSObject);       
51   virtual ~SALOMEDS_SObject();
52
53   virtual std::string GetID();
54   virtual _PTR(SComponent) GetFatherComponent();
55   virtual _PTR(SObject)    GetFather();
56   virtual bool FindAttribute(_PTR(GenericAttribute)& anAttribute, const std::string& aTypeOfAttribute);
57   virtual bool ReferencedObject(_PTR(SObject)& theObject);
58   virtual bool FindSubObject(int theTag, _PTR(SObject)& theObject);
59   virtual _PTR(Study) GetStudy();
60   virtual std::string Name();
61   virtual void  Name(const std::string& theName);
62   virtual std::vector<_PTR(GenericAttribute)> GetAllAttributes();
63   virtual std::string GetName();
64   virtual std::string GetComment();
65   virtual std::string GetIOR();
66   virtual int   Tag();
67   virtual int   Depth();
68
69   CORBA::Object_ptr GetObject();
70   SALOMEDS::SObject_ptr GetSObject();
71
72   SALOMEDS::SObject_ptr        GetCORBAImpl() { return SALOMEDS::SObject::_duplicate(_corba_impl); }
73   SALOMEDSImpl_SObject*        GetLocalImpl() { return _local_impl; } 
74
75 private:
76   void init_orb();
77 };
78
79 #endif