Salome HOME
7ff30dce4ff20312219cc93a5d2d7fd615f1d4ef
[modules/smesh.git] / src / SMESH_I / MG_ADAPT_i.hxx
1 #ifndef MG_ADAPT_I_HXX
2 #define MG_ADAPT_I_HXX
3
4 #include "MG_ADAPT.hxx"
5 #include "SMESH.hxx"
6 #include <SALOMEconfig.h>
7 //~#include CORBA_SERVER_HEADER(ADAPT_Gen)
8 #include CORBA_SERVER_HEADER(MG_ADAPT)
9
10 #include "SALOME_GenericObj_i.hh"
11 #include "SALOME_Component_i.hxx"
12 #include "SALOME_NamingService.hxx"
13 #include "Utils_CorbaException.hxx"
14
15 #include <string>
16
17 //~struct MgAdaptHypothesisData;
18 //~static void copyHypothesisDataToImpl(SMESH::MgAdaptHypothesisData& from, MG_ADAPT::MgAdaptHypothesisData* to);
19 //~static void copyHypothesisDataFromImpl(MG_ADAPT::MgAdaptHypothesisData* from, SMESH::MgAdaptHypothesisData& to);
20 //~class MgAdapt;
21 namespace SMESH
22 {
23 class SMESH_I_EXPORT MG_ADAPT_i :
24     public virtual SALOME::GenericObj_i,
25     public virtual POA_SMESH::MG_ADAPT
26 {
27 public:
28     //~MG_ADAPT_i( CORBA::ORB_ptr orb, ADAPT::ADAPT_Gen_var gen_i );
29     //~static SMESH::MG_ADAPT_ptr CreateMG_ADAPT();
30     //~MG_ADAPT_i(PortableServer::POA_var poa);
31     MG_ADAPT_i();
32     virtual ~MG_ADAPT_i();
33         //~void setData( SMESH::MgAdaptHypothesisData* data);
34         void setData( SMESH::MgAdaptHypothesisData& data);
35
36         void setMedFileIn(const char* str);
37         char* getMedFileIn();
38
39         void setMedFileOut(const char* str);
40         char* getMedFileOut();
41
42         void setMeshName(const char* str);
43         char* getMeshName();
44
45         void setMeshNameOut(const char* str);
46         char* getMeshNameOut();
47
48         void setMeshOutMed(bool mybool);
49         bool getMeshOutMed();
50
51         void setPublish(bool mybool);
52         bool getPublish();
53
54         void setFieldName(const char* str);
55         char* getFieldName();
56
57         void setTimeStep(CORBA::Long t);
58         CORBA::Long getTimeStep() ;
59
60         void setRankTimeStep(CORBA::Long t, CORBA::Long r );
61         CORBA::Long getRank();
62         
63         void setTimeStepRankLast();
64         void setNoTimeStep();
65
66         void setLogFile(const char* str);
67         char* getLogFile();
68
69         void setVerbosityLevel(CORBA::Long v);
70         CORBA::Long getVerbosityLevel();
71
72         void setRemoveOnSuccess(bool mybool);
73         bool getRemoveOnSuccess();
74
75         SMESH::MgAdaptHypothesisData* getData() ;
76
77         void setUseLocalMap(bool mybool);
78         bool getUseLocalMap();
79
80         void setUseBackgroundMap(bool mybool);
81         bool getUseBackgroundMap();
82
83         void setUseConstantValue(bool mybool);
84         bool getUseConstantValue();
85
86         void setConstantValue(double value);
87         double getConstantValue();
88
89         void setSizeMapFile(const char* str);
90         char* getSizeMapFile();
91
92         void setFromMedFile(bool mybool);
93         bool isFromMedFile();
94
95         void setKeepWorkingFiles(bool mybool);
96         bool getKeepWorkingFiles();
97
98         //~void setPrCORBA::LongLogInFile(bool);
99         //~bool getPrCORBA::LongLogInFile();
100
101         void setWorkingDir(const char* str);
102         char* getWorkingDir() ;
103
104         void setPrintLogInFile(bool mybool);
105     bool getPrintLogInFile();
106     
107         bool setAll();
108         char* getCommandToRun() ;
109         CORBA::Long compute(::CORBA::String_out errStr);
110         char* getFileName();
111         char* getExeName();
112         void copyMgAdaptHypothesisData( const SMESH::MgAdaptHypothesisData& data ) ;
113         //~void copyMgAdaptHypothesisData( const SMESH::MgAdaptHypothesisData& data ) {
114                 //~copyMgAdaptHypothesisData(&data);
115         //~}
116
117         //~void checkDirPath(char*& str);
118         
119         bool hasOptionDefined( const char* optionName ) ;
120         void setOptionValue(const char* optionName,
121                                                 const char* optionValue) throw (std::invalid_argument);
122         char* getOptionValue(const char* optionName,
123                                                            bool&              isDefault)  throw (std::invalid_argument);
124         str_array* getCustomOptionValuesStrVec() ;
125         str_array* getOptionValuesStrVec() ;
126         void copyHypothesisDataFromImpl(const ::MG_ADAPT::MgAdaptHypothesisData* from, SMESH::MgAdaptHypothesisData* to) const;
127         void copyHypothesisDataToImpl(const SMESH::MgAdaptHypothesisData& from, ::MG_ADAPT::MgAdaptHypothesisData* to) const;
128         //~TOptionValues        getOptionValues()       const;
129         //~const TOptionValues& getCustomOptionValues() const ;
130 private:
131   ::MG_ADAPT::MgAdapt*          myMgAdapt;
132
133   //~CORBA::ORB_ptr         _orb;
134   //~ADAPT::ADAPT_Gen_var _gen_i;
135         
136 };
137 }
138 #endif // MG_ADAPT_I_HXX