Salome HOME
Fix to avoid dependence of mesh on itself (it leaded to cycle in 'SetRemovedFromStudy').
[modules/smesh.git] / src / SMESH_I / SMESH_MEDSupport_i.hxx
1 // Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007  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.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22
23 // SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
24 // File : SMESH_MEDSupport_i.hxx
25 // Module : SMESH
26 //
27 #ifndef _MED_SMESH_MEDSUPPORT_I_HXX_
28 #define _MED_SMESH_MEDSUPPORT_I_HXX_
29
30 #include "SMESH.hxx"
31
32 #include <SALOMEconfig.h>
33 #include CORBA_SERVER_HEADER(MED)
34 #include <string>
35
36 #include "SMESHDS_Mesh.hxx"
37 #include "SMESHDS_SubMesh.hxx"
38 #include "SMDS_MeshElement.hxx"
39 #include "SMDS_MeshNode.hxx"
40
41 #include "SMESH_MEDSupport_i.hxx"
42 #include "SALOME_GenericObj_i.hh"
43 class SMESH_subMesh;
44 class SMESH_subMesh_i;
45
46 class SMESH_I_EXPORT SMESH_MEDSupport_i:
47         public virtual POA_SALOME_MED::SUPPORT, public virtual SALOME::GenericObj_i
48 {
49   public:
50
51 // Constructors and associated internal methods
52         SMESH_MEDSupport_i(SMESH_subMesh_i * sm,
53                 std::string name, std::string description, SALOME_MED::medEntityMesh entity);
54         SMESH_MEDSupport_i(const SMESH_MEDSupport_i & s);
55
56 // IDL Methods
57         char *getName() throw(SALOME::SALOME_Exception);
58         char *getDescription() throw(SALOME::SALOME_Exception);
59         SALOME_MED::GMESH_ptr getMesh() throw(SALOME::SALOME_Exception);
60         CORBA::Boolean isOnAllElements() throw(SALOME::SALOME_Exception);
61         SALOME_MED::medEntityMesh getEntity() throw(SALOME::SALOME_Exception);
62         CORBA::Long
63         getNumberOfElements(SALOME_MED::medGeometryElement geomElement)
64           throw(SALOME::SALOME_Exception);
65
66         CORBA::Long getNumberOfTypes() throw (SALOME::SALOME_Exception);
67
68         SALOME_TYPES::ListOfLong *
69         getNumber(SALOME_MED::medGeometryElement geomElement)
70           throw(SALOME::SALOME_Exception);
71
72   /*!
73    * Same function as getNumber.
74    */
75         SALOME_TYPES::ListOfLong *
76         getNumberFromFile(SALOME_MED::medGeometryElement geomElement)
77           throw(SALOME::SALOME_Exception);
78
79         SALOME_TYPES::ListOfLong * getNumberIndex()
80           throw(SALOME::SALOME_Exception);
81
82         CORBA::Long
83         getNumberOfGaussPoint(SALOME_MED::medGeometryElement geomElement)
84           throw(SALOME::SALOME_Exception);
85
86         SALOME_TYPES::ListOfLong* getNumbersOfGaussPoint()
87           throw (SALOME::SALOME_Exception);
88
89         SALOME_MED::medGeometryElement_array *getTypes()
90           throw(SALOME::SALOME_Exception);
91
92         void getBoundaryElements() throw (SALOME::SALOME_Exception);
93
94         CORBA::Long getCorbaIndex() throw(SALOME::SALOME_Exception);
95
96         SALOME_MED::SUPPORT::supportInfos * getSupportGlobal()
97           throw (SALOME::SALOME_Exception);
98
99         void createSeq() throw(SALOME::SALOME_Exception);
100
101   public: //public field
102         SMESH_subMesh_i * _subMesh_i;
103         ::SMESH_subMesh * _subMesh;
104
105         std::string _name;
106         std::string _description;
107         bool _isOnAllElements;
108         bool _seqNumber;
109         int _seqLength;
110
111         SALOME_MED::medEntityMesh _entity;
112         SALOME_MED::medGeometryElement * _geometricType;
113         int _numberOfGeometricType;
114
115   protected:
116         SMESH_MEDSupport_i();
117         ~SMESH_MEDSupport_i();
118 };
119
120 #endif /* _MED_MEDSUPPORT_I_HXX_ */