4 #include "MG_ADAPT.hxx"
6 #include <SALOMEconfig.h>
7 //~#include CORBA_SERVER_HEADER(ADAPT_Gen)
8 #include CORBA_SERVER_HEADER(MG_ADAPT)
10 #include "SALOME_GenericObj_i.hh"
11 #include "SALOME_Component_i.hxx"
12 #include "SALOME_NamingService.hxx"
13 #include "Utils_CorbaException.hxx"
19 //~struct MgAdaptHypothesisData;
20 //~static void copyHypothesisDataToImpl(SMESH::MgAdaptHypothesisData& from, MG_ADAPT::MgAdaptHypothesisData* to);
21 //~static void copyHypothesisDataFromImpl(MG_ADAPT::MgAdaptHypothesisData* from, SMESH::MgAdaptHypothesisData& to);
26 class SMESH_I_EXPORT MG_ADAPT_i :
27 public virtual SALOME::GenericObj_i,
28 public virtual POA_SMESH::MG_ADAPT
31 //~MG_ADAPT_i( CORBA::ORB_ptr orb, ADAPT::ADAPT_Gen_var gen_i );
32 //~static SMESH::MG_ADAPT_ptr CreateMG_ADAPT();
33 //~MG_ADAPT_i(PortableServer::POA_var poa);
35 virtual ~MG_ADAPT_i();
36 //~void setData( SMESH::MgAdaptHypothesisData* data);
37 void setData( SMESH::MgAdaptHypothesisData& data);
39 void setMedFileIn(const char* str);
42 void setMedFileOut(const char* str);
43 char* getMedFileOut();
45 void setMeshName(const char* str);
48 void setMeshNameOut(const char* str);
49 char* getMeshNameOut();
51 void setMeshOutMed(bool mybool);
54 void setPublish(bool mybool);
57 void setSizeMapFieldName(const char* str);
58 char* getSizeMapFieldName();
60 void setTimeStep(CORBA::Long t);
61 CORBA::Long getTimeStep() ;
63 void setTimeStepRank(CORBA::Long t, CORBA::Long r );
64 CORBA::Long getRank();
66 void setTimeStepRankLast();
69 void setLogFile(const char* str);
72 void setVerbosityLevel(CORBA::Long v);
73 CORBA::Long getVerbosityLevel();
75 void setRemoveOnSuccess(bool mybool);
76 bool getRemoveOnSuccess();
78 SMESH::MgAdaptHypothesisData* getData() ;
79 void setSizeMapType(const char* type);
80 void setUseLocalMap(bool mybool);
81 bool getUseLocalMap();
83 void setUseBackgroundMap(bool mybool);
84 bool getUseBackgroundMap();
86 void setUseConstantValue(bool mybool);
87 bool getUseConstantValue();
89 void setConstantSize(double value);
90 double getConstantSize();
92 void setSizeMapFile(const char* str);
93 char* getSizeMapFile();
95 void setFromMedFile(bool mybool);
98 void setKeepWorkingFiles(bool mybool);
99 bool getKeepWorkingFiles();
101 //~void setPrCORBA::LongLogInFile(bool);
102 //~bool getPrCORBA::LongLogInFile();
104 void setWorkingDir(const char* str);
105 char* getWorkingDir() ;
107 void setPrintLogInFile(bool mybool);
108 bool getPrintLogInFile();
111 char* getCommandToRun() ;
112 //~CORBA::Long compute(::CORBA::String_out errStr);
113 CORBA::Long compute();
116 void copyMgAdaptHypothesisData( const SMESH::MgAdaptHypothesisData& data ) ;
117 //~void copyMgAdaptHypothesisData( const SMESH::MgAdaptHypothesisData& data ) {
118 //~copyMgAdaptHypothesisData(&data);
121 //~void checkDirPath(char*& str);
123 bool hasOptionDefined( const char* optionName ) ;
124 void setOptionValue(const char* optionName,
125 const char* optionValue) throw (std::invalid_argument);
126 char* getOptionValue(const char* optionName,
127 bool& isDefault) throw (std::invalid_argument);
128 str_array* getCustomOptionValuesStrVec() ;
129 str_array* getOptionValuesStrVec() ;
130 void copyHypothesisDataFromImpl(const ::MG_ADAPT::MgAdaptHypothesisData* from, SMESH::MgAdaptHypothesisData* to) const;
131 void copyHypothesisDataToImpl(const SMESH::MgAdaptHypothesisData& from, ::MG_ADAPT::MgAdaptHypothesisData* to) const;
132 //~TOptionValues getOptionValues() const;
133 //~const TOptionValues& getCustomOptionValues() const ;
136 ::MG_ADAPT::MgAdapt* myMgAdapt;
138 //~CORBA::ORB_ptr _orb;
139 //~ADAPT::ADAPT_Gen_var _gen_i;
143 class SMESH_I_EXPORT MG_ADAPT_OBJECT_i:
144 public virtual SALOME::GenericObj_i,
145 public virtual POA_SMESH::MG_ADAPT_OBJECT {
148 void setMeshIn( SMESH::SMESH_Mesh_ptr theMesh );
149 void setMEDFileIn(const char* f);
150 void setMEDFileOut(const char* f);
151 void setMEDFileBackground(const char* f);
152 void AddHypothesis(SMESH::MG_ADAPT_ptr);
153 CORBA::Long Compute(bool Publish);
155 std::string medFileIn, medFileOut, medFileBackground;
156 bool checkMeshFileIn();
158 SMESH::SMESH_Mesh_ptr myMesh;
159 SMESH::MG_ADAPT_ptr hypothesis;
163 #endif // MG_ADAPT_I_HXX