]> SALOME platform Git repositories - modules/smesh.git/blob - src/ADAPT_I/MG_ADAPT_i.cxx
Salome HOME
add src/ADAPT_I/MG_ADAPT_i.* files
[modules/smesh.git] / src / ADAPT_I / MG_ADAPT_i.cxx
1 // Copyright (C) 2011-2020  CEA/DEN, EDF R&D
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 // Remarques :
21 // L'ordre de description des fonctions est le meme dans tous les fichiers
22 // HOMARD_aaaa.idl, HOMARD_aaaa.hxx, HOMARD_aaaa.cxx, HOMARD_aaaa_i.hxx, HOMARD_aaaa_i.cxx :
23 // 1. Les generalites : Name, Delete, DumpPython, Dump, Restore
24 // 2. Les caracteristiques
25 // 3. Le lien avec les autres structures
26 //
27 // Quand les 2 fonctions Setxxx et Getxxx sont presentes, Setxxx est decrit en premier
28 //
29
30 #include "MG_ADAPT_i.hxx"
31 #include "ADAPT_Gen_i.hxx"
32 #include "MG_ADAPT.hxx"
33 #include "string.h"
34
35 //=============================================================================
36 /*!
37  *  standard constructor
38  */
39 //=============================================================================
40 MG_ADAPT_i::MG_ADAPT_i()
41 {
42   MESSAGE( "Default constructor, not for use" );
43   ASSERT( 0 );
44 }
45
46 //=============================================================================
47 /*!
48  *  standard constructor
49  */
50 //=============================================================================
51 MG_ADAPT_i::MG_ADAPT_i( CORBA::ORB_ptr orb,
52                             ADAPT::ADAPT_Gen_var engine )
53 {
54
55   _gen_i = engine;
56   _orb = orb;
57   myMgAdapt = new MgAdapt();
58   //~ASSERT( myHomardCas );
59 }
60
61 //=============================================================================
62 /*!
63  *  standard destructor
64  */
65 //=============================================================================
66 MG_ADAPT_i::~MG_ADAPT_i()
67 {
68 }
69 void MG_ADAPT_i::setData( MgAdaptHypothesisData* data)
70 {
71         myMgAdapt->setData(data);
72 }       
73 void MG_ADAPT_i::setMedFileIn(char* str)
74 {
75         myMgAdapt->setMedFileIn(str);
76 }
77 char* MG_ADAPT_i::getMedFileIn()
78 {
79         return CORBA::string_dup(myMgAdapt->getMedFileIn().c_str());
80 }
81 void MG_ADAPT_i::setMedFileOut(char* str)
82 {
83         myMgAdapt->setMedFileOut(str);
84 }
85 char* MG_ADAPT_i::getMedFileOut()
86 {
87         return CORBA::string_dup(myMgAdapt->getMedFileOut().c_str());
88 }
89 void MG_ADAPT_i::setMeshName(char* str)
90 {
91         myMgAdapt->setMeshName(str);
92 }
93 char* MG_ADAPT_i::getMeshName()
94 {
95         return CORBA::string_dup(myMgAdapt->getMeshName().c_str());
96 }
97 void MG_ADAPT_i::setMeshNameOut(char* str)
98 {
99         myMgAdapt->setMeshNameOut(str);
100 }
101 char* MG_ADAPT_i::getMeshNameOut()
102 {
103         return CORBA::string_dup(myMgAdapt->getMeshNameOut().c_str());
104 }
105 void MG_ADAPT_i::setMeshOutMed(bool mybool)
106 {
107         myMgAdapt->setMeshOutMed(mybool);
108 }
109 bool MG_ADAPT_i::getMeshOutMed()
110 {
111         return myMgAdapt->getMeshOutMed();
112 }
113 void MG_ADAPT_i::setPublish(bool mybool)
114 {
115         myMgAdapt->setPublish(mybool);
116 }
117 bool MG_ADAPT_i::getPublish()
118 {
119         return myMgAdapt->getPublish();
120 }
121 void MG_ADAPT_i::setFieldName(char* str)
122 {
123         myMgAdapt->setFieldName(str);
124 }
125 char* MG_ADAPT_i::getFieldName()
126 {
127         return CORBA::string_dup(myMgAdapt->getFieldName().c_str());
128 }
129 void MG_ADAPT_i::setTimeStep(CORBA::Long t)
130 {
131         myMgAdapt->setTimeStep(t);
132 }
133 CORBA::Long MG_ADAPT_i::getTimeStep() const
134 {
135         return myMgAdapt->getTimeStep();
136 }
137 void MG_ADAPT_i::setRankTimeStep(CORBA::Long t, CORBA::Long r)
138 {
139         myMgAdapt->setRankTimeStep(t, r);
140 }
141 CORBA::Long MG_ADAPT_i::getRank()
142 {
143         return myMgAdapt->getRank();
144 }
145 void MG_ADAPT_i::setLogFile(char* str)
146 {
147         myMgAdapt->setLogFile(str);
148 }
149 char* MG_ADAPT_i::getLogFile()
150 {
151         return CORBA::string_dup(myMgAdapt->getLogFile().c_str());
152 }
153
154 void MG_ADAPT_i::setVerbosityLevel(CORBA::Long v)
155 {
156         myMgAdapt->setVerbosityLevel(v);
157 }
158 CORBA::Long MG_ADAPT_i::getVerbosityLevel()
159 {
160         return myMgAdapt->getVerbosityLevel();
161 }
162 void MG_ADAPT_i::setRemoveOnSuccess(bool mybool)
163 {
164         myMgAdapt->setRemoveOnSuccess(mybool);
165 }
166 bool MG_ADAPT_i::getRemoveOnSuccess()
167 {
168         myMgAdapt->getRemoveOnSuccess();
169 }
170 MgAdaptHypothesisData* MG_ADAPT_i::getData() const
171 {
172         return myMgAdapt->getData();
173 }
174 void MG_ADAPT_i::setUseLocalMap(bool mybool)
175 {
176         myMgAdapt->setUseLocalMap(mybool);
177 }
178 bool MG_ADAPT_i::getUseLocalMap()
179 {
180         return myMgAdapt->getUseLocalMap();
181 }
182 void MG_ADAPT_i::setUseBackgroundMap(bool mybool)
183 {
184         myMgAdapt->setUseBackgroundMap(mybool);
185 }
186 bool MG_ADAPT_i::getUseBackgroundMap()
187 {
188         return myMgAdapt->getUseBackgroundMap();
189 }
190 void MG_ADAPT_i::setUseConstantValue(bool mybool)
191 {
192         myMgAdapt->setUseConstantValue(mybool);
193 }
194 bool MG_ADAPT_i::getUseConstantValue()
195 {
196         return myMgAdapt->getUseConstantValue();
197 }
198
199 void MG_ADAPT_i::setConstantValue(double value)
200 {
201         myMgAdapt->setConstantValue(value);
202 }
203 double MG_ADAPT_i::getConstantValue() const
204 {
205         return myMgAdapt->getConstantValue();
206 }
207 void MG_ADAPT_i::setSizeMapFile(char* str)
208 {
209         myMgAdapt->setSizeMapFile(str);
210 }
211 char* MG_ADAPT_i::getSizeMapFile()
212 {
213         return CORBA::string_dup(myMgAdapt->getSizeMapFile().c_str());
214 }
215 void MG_ADAPT_i::setFromMedFile(bool mybool)
216 {
217         myMgAdapt->setFromMedFile(mybool);
218 }
219 bool MG_ADAPT_i::isFromMedFile()
220 {
221         return myMgAdapt->isFromMedFile();
222 }
223
224 void MG_ADAPT_i::setKeepWorkingFiles(bool mybool)
225 {
226         myMgAdapt->setKeepWorkingFiles(mybool);
227 }
228 bool MG_ADAPT_i::getKeepWorkingFiles()
229 {
230         return myMgAdapt->getKeepWorkingFiles();
231 }
232
233 //~void MG_ADAPT_i::setPrCORBA::LongLogInFile(bool);
234 //~bool MG_ADAPT_i::getPrCORBA::LongLogInFile();
235
236 void MG_ADAPT_i::setWorkingDir(char* dir)
237 {
238         myMgAdapt->setWorkingDir(dir);
239 }
240 char* MG_ADAPT_i::getWorkingDir() const
241 {
242         return CORBA::string_dup(myMgAdapt->getWorkingDir().c_str());
243 }
244 bool MG_ADAPT_i::setAll()
245 {
246         return myMgAdapt->setAll();
247 }
248 char* MG_ADAPT_i::getCommandToRun()
249 {
250         return CORBA::string_dup(myMgAdapt->getCommandToRun().c_str());
251 }
252 CORBA::Long MG_ADAPT_i::compute(char* errStr)
253 {
254         std::string err("");
255         CORBA::Long ret = myMgAdapt->compute(err);
256         strcpy(errStr, err.c_str());
257         return ret;
258 }
259 char* MG_ADAPT_i::getFileName() const
260 {
261         return CORBA::string_dup(myMgAdapt->getFileName().c_str());
262 }
263 char* MG_ADAPT_i::getExeName()
264 {
265         return CORBA::string_dup(myMgAdapt->getExeName().c_str());
266 }
267 void MG_ADAPT_i::copyMgAdaptHypothesisData( MgAdaptHypothesisData* data)
268 {
269         myMgAdapt->copyMgAdaptHypothesisData(data);
270 }
271
272 void MG_ADAPT_i::checkDirPath(std::string& str)
273 {
274         myMgAdapt->checkDirPath(str);
275 }
276
277 bool MG_ADAPT_i::hasOptionDefined( const char* optionName ) const
278 {
279         return myMgAdapt->hasOptionDefined(optionName);
280 }
281 void MG_ADAPT_i::setOptionValue(const char* optionName,
282                                         const char* optionValue) throw (std::invalid_argument)
283 {
284         myMgAdapt->setOptionValue(optionName, optionValue);
285 }                                       
286 std::string MG_ADAPT_i::getOptionValue(const char* optionName,
287                                                    bool*              isDefault) const throw (std::invalid_argument)
288 {
289     return myMgAdapt->getOptionValue(optionName, isDefault);
290 }
291 std::vector <std::string> MG_ADAPT_i::getCustomOptionValuesStrVec() const
292 {
293         return myMgAdapt->getCustomOptionValuesStrVec();
294 }
295 std::vector <std::string> MG_ADAPT_i::getOptionValuesStrVec() const
296 {
297         return myMgAdapt->getOptionValuesStrVec();
298 }
299
300
301 //~TOptionValues        MG_ADAPT_i::getOptionValues()       const;
302 //~const TOptionValues& MG_ADAPT_i::getCustomOptionValues() const ;