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