1 //=============================================================================
2 // File : SMESH_Gen_i.hxx
3 // Created : lun mai 6 13:41:30 CEST 2002
4 // Author : Paul RASCLE, EDF
6 // Copyright : EDF 2002
8 //=============================================================================
10 #ifndef _SMESH_GEN_I_HXX_
11 #define _SMESH_GEN_I_HXX_
13 #include <SALOMEconfig.h>
14 #include CORBA_SERVER_HEADER(SMESH_Gen)
15 #include CORBA_SERVER_HEADER(SMESH_Mesh)
16 #include CORBA_SERVER_HEADER(SMESH_Hypothesis)
17 #include CORBA_CLIENT_HEADER(GEOM_Gen)
18 #include CORBA_CLIENT_HEADER(GEOM_Shape)
19 #include CORBA_CLIENT_HEADER(SALOMEDS)
20 #include CORBA_CLIENT_HEADER(SALOMEDS_Attributes)
25 #include "SMESH_HypothesisFactory_i.hxx"
26 #include "SMESH_Mesh_i.hxx"
27 #include "SALOME_Component_i.hxx"
28 #include "SALOME_NamingService.hxx"
30 #include "SMESH_Gen.hxx"
31 #include "SMESH_topo.hxx"
32 #include "GEOM_Client.hxx"
38 typedef struct studyContext_iStruct
40 map<int,SMESH_Mesh_i*> mapMesh_i;
41 } StudyContext_iStruct;
44 public POA_SMESH::SMESH_Gen,
45 public Engines_Component_i
50 SMESH_Gen_i(CORBA::ORB_ptr orb,
51 PortableServer::POA_ptr poa,
52 PortableServer::ObjectId * contId,
53 const char *instanceName,
54 const char *interfaceName);
55 virtual ~SMESH_Gen_i();
57 SMESH::SMESH_Hypothesis_ptr CreateHypothesis(const char* anHyp,
59 throw (SALOME::SALOME_Exception);
61 SMESH::SMESH_Mesh_ptr Init(GEOM::GEOM_Gen_ptr geomEngine,
63 GEOM::GEOM_Shape_ptr aShape)
64 throw (SALOME::SALOME_Exception);
66 CORBA::Boolean Compute(SMESH::SMESH_Mesh_ptr aMesh,
67 GEOM::GEOM_Shape_ptr aShape)
68 throw (SALOME::SALOME_Exception);
70 CORBA::Boolean IsReadyToCompute(SMESH::SMESH_Mesh_ptr aMesh,
71 GEOM::GEOM_Shape_ptr aShape)
72 throw (SALOME::SALOME_Exception);
74 SMESH::long_array* GetSubShapesId(GEOM::GEOM_Gen_ptr geomEngine,
76 GEOM::GEOM_Shape_ptr mainShape,
77 const SMESH::shape_array& listOfSubShape)
78 throw (SALOME::SALOME_Exception);
81 // inherited methods from SALOMEDS::Driver
83 SALOMEDS::TMPFile* Save(SALOMEDS::SComponent_ptr theComponent,
86 bool Load(SALOMEDS::SComponent_ptr theComponent,
87 const SALOMEDS::TMPFile& theStream,
90 void Close(SALOMEDS::SComponent_ptr theComponent);
91 char* ComponentDataType();
93 char* IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject,
94 const char* IORString,
95 CORBA::Boolean isMultiFile);
96 char* LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject,
97 const char* aLocalPersistentID,
98 CORBA::Boolean isMultiFile);
100 bool CanPublishInStudy(CORBA::Object_ptr theIOR) { return false; }
101 SALOMEDS::SObject_ptr PublishInStudy(SALOMEDS::Study_ptr theStudy,
102 SALOMEDS::SObject_ptr theSObject,
103 CORBA::Object_ptr theObject,
104 const char* theName) throw (SALOME::SALOME_Exception) {
105 SALOMEDS::SObject_var aResultSO;
106 return aResultSO._retn();
109 CORBA::Boolean CanCopy(SALOMEDS::SObject_ptr theObject) {return false;}
110 SALOMEDS::TMPFile* CopyFrom(SALOMEDS::SObject_ptr theObject, CORBA::Long& theObjectID) {return false;}
111 CORBA::Boolean CanPaste(const char* theComponentName, CORBA::Long theObjectID) {return false;}
112 SALOMEDS::SObject_ptr PasteInto(const SALOMEDS::TMPFile& theStream,
113 CORBA::Long theObjectID,
114 SALOMEDS::SObject_ptr theObject) {
115 SALOMEDS::SObject_var aResultSO;
116 return aResultSO._retn();
119 GEOM_Client* _ShapeReader;
121 SMESH_topo* ExploreMainShape(GEOM::GEOM_Gen_ptr geomEngine,
123 GEOM::GEOM_Shape_ptr aShape);
126 SMESH_HypothesisFactory_i _hypothesisFactory_i;
127 ::SMESH_Gen _impl; // no namespace here
128 int _localId; // unique Id of created objects, within SMESH_Gen_i entity
130 map<int, StudyContext_iStruct*> _mapStudyContext_i;
131 map <string, string> _SMESHCorbaObj;