Salome HOME
PR: merge SalomePro 1_2d = mergefrom_BRANCH_MergeV1_2d
[modules/kernel.git] / src / SALOMEDS / SALOMEDS_SObject_i.hxx
1 //  SALOME SALOMEDS : data structure of SALOME and sources of Salome data server 
2 //
3 //  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
5 // 
6 //  This library is free software; you can redistribute it and/or 
7 //  modify it under the terms of the GNU Lesser General Public 
8 //  License as published by the Free Software Foundation; either 
9 //  version 2.1 of the License. 
10 // 
11 //  This library is distributed in the hope that it will be useful, 
12 //  but WITHOUT ANY WARRANTY; without even the implied warranty of 
13 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
14 //  Lesser General Public License for more details. 
15 // 
16 //  You should have received a copy of the GNU Lesser General Public 
17 //  License along with this library; if not, write to the Free Software 
18 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
19 // 
20 //  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
21 //
22 //
23 //
24 //  File   : SALOMEDS_SObject_i.hxx
25 //  Author : Yves FRICAUD
26 //  Module : SALOME
27 //  $Header$
28
29 #ifndef __SALOMEDS_SOBJECT_I_H__
30 #define __SALOMEDS_SOBJECT_I_H__
31
32 // std C++ headers
33 #include <iostream.h>
34 #include <vector>
35 #include <string>
36
37 // IDL headers
38 #include <SALOMEconfig.h>
39 #include CORBA_SERVER_HEADER(SALOMEDS)
40
41 // Cascade headers
42 #include <TDF_Label.hxx>
43 #include <stdio.h>
44 #include <TDF_Tool.hxx>
45 #include <TDF_Reference.hxx>
46 #include <Standard_GUID.hxx>
47 #include <Standard_NoSuchObject.hxx>
48 #include <TDataStd_Name.hxx>
49 #include <TDataStd_Comment.hxx>
50 #include <TDataStd_Integer.hxx>
51 #include <TDataStd_Real.hxx>
52
53 #include <TCollection_AsciiString.hxx>
54
55 class SALOMEDS_SObject_i: public POA_SALOMEDS::SObject,
56                           public PortableServer::RefCountServantBase {
57 protected:
58   CORBA::ORB_ptr           _orb;
59   TDF_Label                _lab;
60   char*                    _name;  
61   char*                    _value;
62   char*                    _type;
63   vector<string>           _liste_ba_type;
64
65 public:
66   
67   SALOMEDS_SObject_i(const TDF_Label, CORBA::ORB_ptr);
68   
69   ~SALOMEDS_SObject_i();
70   
71   virtual char* GetID();
72   virtual SALOMEDS::SComponent_ptr GetFatherComponent();
73   virtual SALOMEDS::SObject_ptr    GetFather() ;
74   virtual CORBA::Boolean FindAttribute(SALOMEDS::GenericAttribute_out anAttribute, const char* aTypeOfAttribute);
75   virtual CORBA::Boolean ReferencedObject(SALOMEDS::SObject_out obj) ;
76   virtual CORBA::Boolean FindSubObject(long atag, SALOMEDS::SObject_out obj );
77
78   virtual SALOMEDS::Study_ptr    GetStudy() ;
79   virtual char* Name();
80   virtual void  Name(const char*);
81   virtual SALOMEDS::ListOfAttributes* GetAllAttributes();
82
83
84   virtual CORBA::Short Tag();
85
86   static char* AttributeIDToType(Standard_GUID);
87   
88   static Standard_GUID           ReturnGUIDForAttribute(const char* aTypeOfAttribute);
89
90 };
91 #endif