Salome HOME
BugID PAL10141, Added 4 new methods for Study: SetStudyLock, IsStudyLocked,
[modules/kernel.git] / src / SALOMEDS / SALOMEDS_SObject_i.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_i.hxx
21 //  Author : Sergey RUIN
22 //  Module : SALOME
23
24 #ifndef __SALOMEDS_SOBJECT_I_H__
25 #define __SALOMEDS_SOBJECT_I_H__
26
27 // std C++ headers
28 #include <iostream>
29
30 // IDL headers
31 #include <SALOMEconfig.h>
32 #include CORBA_SERVER_HEADER(SALOMEDS)
33 #include <SALOME_GenericObj_i.hh>
34
35 // Cascade headers
36 #include "SALOMEDSImpl_SObject.hxx"
37
38 #ifdef GetObject
39 #undef GetObject
40 #endif
41
42 class Standard_EXPORT SALOMEDS_SObject_i: public virtual POA_SALOMEDS::SObject,
43                           public virtual PortableServer::RefCountServantBase,
44                           public virtual SALOME::GenericObj_i
45 {
46 protected:
47   CORBA::ORB_ptr                _orb;
48   Handle(SALOMEDSImpl_SObject)  _impl;
49
50 public:
51
52   static SALOMEDS::SObject_ptr New(const Handle(SALOMEDSImpl_SObject)&, CORBA::ORB_ptr); 
53   
54   SALOMEDS_SObject_i(const Handle(SALOMEDSImpl_SObject)&, CORBA::ORB_ptr);
55   
56   virtual ~SALOMEDS_SObject_i();
57   
58   virtual char* GetID();
59   virtual SALOMEDS::SComponent_ptr GetFatherComponent();
60   virtual SALOMEDS::SObject_ptr    GetFather() ;
61   virtual CORBA::Boolean FindAttribute(SALOMEDS::GenericAttribute_out anAttribute, const char* aTypeOfAttribute);
62   virtual CORBA::Boolean ReferencedObject(SALOMEDS::SObject_out obj) ;
63   virtual CORBA::Boolean FindSubObject(CORBA::Long atag, SALOMEDS::SObject_out obj );
64
65   virtual SALOMEDS::Study_ptr    GetStudy() ;
66   virtual char* Name();
67   virtual void  Name(const char*);
68   virtual SALOMEDS::ListOfAttributes* GetAllAttributes();
69
70   virtual CORBA::Object_ptr GetObject();
71
72   virtual char* GetName();
73   virtual char* GetComment();
74   virtual char* GetIOR();
75
76   virtual CORBA::Short Tag();
77   virtual CORBA::Short Depth();
78
79   virtual CORBA::Long GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal);
80 };
81
82 #endif