Salome HOME
This commit was generated by cvs2git to create branch 'IMPORT'.
[modules/smesh.git] / src / SMESH_I / SMESH_Mesh_i.hxx
1 //=============================================================================
2 // File      : SMESH_Mesh_i.hxx
3 // Created   : lun mai  6 13:41:50 CEST 2002
4 // Author    : Paul RASCLE, EDF
5 // Project   : SALOME
6 // Copyright : EDF 2002
7 // $Header$
8 //=============================================================================
9
10 #ifndef _SMESH_MESH_I_HXX_
11 #define _SMESH_MESH_I_HXX_
12
13 #include <SALOMEconfig.h>
14 #include CORBA_SERVER_HEADER(SMESH_Mesh)
15 #include CORBA_SERVER_HEADER(SMESH_Hypothesis)
16 #include CORBA_CLIENT_HEADER(GEOM_Gen)
17 #include CORBA_CLIENT_HEADER(GEOM_Shape)
18 #include CORBA_CLIENT_HEADER(MED)
19
20 class SMESH_Gen_i;
21
22 #include "SMESH_Mesh.hxx"
23 #include "SMESH_Gen_i.hxx"
24 #include "SMESH_subMesh_i.hxx"
25 #include "SMESH_subMesh.hxx"
26 #include "SMESH_topo.hxx"
27
28 #include <map>
29
30 class SMESH_Mesh_i:
31   public POA_SMESH::SMESH_Mesh
32 {
33 public:
34   SMESH_Mesh_i();
35   SMESH_Mesh_i(SMESH_Gen_i* myGen_i,
36                GEOM::GEOM_Gen_ptr geomEngine,
37                CORBA::Long studyId,
38                int localId);
39
40   virtual ~SMESH_Mesh_i();
41
42   // --- CORBA
43
44   CORBA::Boolean AddHypothesis(GEOM::GEOM_Shape_ptr aSubShape,
45                                SMESH::SMESH_Hypothesis_ptr anHyp)
46     throw (SALOME::SALOME_Exception);
47
48   CORBA::Boolean  RemoveHypothesis(GEOM::GEOM_Shape_ptr aSubShape,
49                                    SMESH::SMESH_Hypothesis_ptr anHyp)
50     throw (SALOME::SALOME_Exception);
51
52   SMESH::ListOfHypothesis* GetHypothesisList(GEOM::GEOM_Shape_ptr aSubShape)
53     throw (SALOME::SALOME_Exception);
54
55   SMESH::SMESH_subMesh_ptr GetElementsOnShape(GEOM::GEOM_Shape_ptr aSubShape)
56     throw (SALOME::SALOME_Exception);
57
58 //    SMESH::string_array* GetLog(CORBA::Boolean clearAfterGet)
59 //      throw (SALOME::SALOME_Exception);
60
61   SMESH::log_array* GetLog(CORBA::Boolean clearAfterGet)
62     throw (SALOME::SALOME_Exception);
63
64   SMESH::SMESH_MeshEditor_ptr GetMeshEditor();
65
66   void ClearLog()
67     throw (SALOME::SALOME_Exception);
68
69   CORBA::Long GetId()
70     throw (SALOME::SALOME_Exception);
71
72   CORBA::Long GetStudyId()
73     throw (SALOME::SALOME_Exception);
74
75   // --- C++ interface
76
77   void SetImpl(::SMESH_Mesh* impl);
78
79   ::SMESH_Mesh& GetImpl();         // :: force no namespace here
80   GEOM::GEOM_Gen_ptr GetGeomEngine();
81   void SetIor(SMESH::SMESH_Mesh_ptr myIor);
82   SMESH::SMESH_Mesh_ptr GetIor();
83
84   void ExportMED( const char* file )
85     throw (SALOME::SALOME_Exception);
86   void ExportDAT( const char* file )
87     throw (SALOME::SALOME_Exception);
88   void ExportUNV( const char* file )
89     throw (SALOME::SALOME_Exception);
90
91   SALOME_MED::MESH_ptr GetMEDMesh()
92     throw (SALOME::SALOME_Exception);
93   
94   CORBA::Long NbNodes()
95     throw (SALOME::SALOME_Exception);
96   
97   CORBA::Long NbEdges()
98     throw (SALOME::SALOME_Exception);
99   
100   CORBA::Long NbFaces()
101     throw (SALOME::SALOME_Exception);
102
103   CORBA::Long NbTriangles()
104     throw (SALOME::SALOME_Exception);
105
106   CORBA::Long NbQuadrangles()
107     throw (SALOME::SALOME_Exception);
108   
109   CORBA::Long NbVolumes()
110     throw (SALOME::SALOME_Exception);
111
112   CORBA::Long NbTetras()
113     throw (SALOME::SALOME_Exception);
114
115   CORBA::Long NbHexas()
116     throw (SALOME::SALOME_Exception);
117   
118   CORBA::Long NbSubMesh()
119     throw (SALOME::SALOME_Exception);
120   
121
122   map<int, SMESH_subMesh_i*> _mapSubMesh_i; //NRI
123   map<int, ::SMESH_subMesh*> _mapSubMesh;   //NRI
124
125 private:
126
127   ::SMESH_Mesh* _impl;  // :: force no namespace here
128   SMESH_Gen_i* _gen_i;
129   //   CORBA::ORB_ptr _orb;
130 //   SMESH_topo* _topo;   // all local TopoDS_Shape of subShapes
131   int _id;          // id given by creator (unique within the creator instance)
132   GEOM::GEOM_Gen_var _geom;
133   int _studyId;
134   //  int _localId; // id attributed to all objects created by Mesh_i
135   map<int, SMESH::SMESH_subMesh_ptr> _mapSubMeshIor;
136   SMESH::SMESH_Mesh_var _myIor;
137 };
138
139 #endif
140