1 // Copyright (C) 2011-2020 CEA/DEN, EDF R&D
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.
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.
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
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
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
27 // Quand les 2 fonctions Setxxx et Getxxx sont presentes, Setxxx est decrit en premier
30 #include "MG_ADAPT_i.hxx"
31 #include "ADAPT_Gen_i.hxx"
32 #include "MG_ADAPT.hxx"
35 //=============================================================================
37 * standard constructor
39 //=============================================================================
40 MG_ADAPT_i::MG_ADAPT_i()
42 MESSAGE( "Default constructor, not for use" );
46 //=============================================================================
48 * standard constructor
50 //=============================================================================
51 MG_ADAPT_i::MG_ADAPT_i( CORBA::ORB_ptr orb,
52 ADAPT::ADAPT_Gen_var engine )
57 myMgAdapt = new MgAdapt();
58 //~ASSERT( myHomardCas );
61 //=============================================================================
65 //=============================================================================
66 MG_ADAPT_i::~MG_ADAPT_i()
69 void MG_ADAPT_i::setData( MgAdaptHypothesisData* data)
71 myMgAdapt->setData(data);
73 void MG_ADAPT_i::setMedFileIn(char* str)
75 myMgAdapt->setMedFileIn(str);
77 char* MG_ADAPT_i::getMedFileIn()
79 return CORBA::string_dup(myMgAdapt->getMedFileIn().c_str());
81 void MG_ADAPT_i::setMedFileOut(char* str)
83 myMgAdapt->setMedFileOut(str);
85 char* MG_ADAPT_i::getMedFileOut()
87 return CORBA::string_dup(myMgAdapt->getMedFileOut().c_str());
89 void MG_ADAPT_i::setMeshName(char* str)
91 myMgAdapt->setMeshName(str);
93 char* MG_ADAPT_i::getMeshName()
95 return CORBA::string_dup(myMgAdapt->getMeshName().c_str());
97 void MG_ADAPT_i::setMeshNameOut(char* str)
99 myMgAdapt->setMeshNameOut(str);
101 char* MG_ADAPT_i::getMeshNameOut()
103 return CORBA::string_dup(myMgAdapt->getMeshNameOut().c_str());
105 void MG_ADAPT_i::setMeshOutMed(bool mybool)
107 myMgAdapt->setMeshOutMed(mybool);
109 bool MG_ADAPT_i::getMeshOutMed()
111 return myMgAdapt->getMeshOutMed();
113 void MG_ADAPT_i::setPublish(bool mybool)
115 myMgAdapt->setPublish(mybool);
117 bool MG_ADAPT_i::getPublish()
119 return myMgAdapt->getPublish();
121 void MG_ADAPT_i::setFieldName(char* str)
123 myMgAdapt->setFieldName(str);
125 char* MG_ADAPT_i::getFieldName()
127 return CORBA::string_dup(myMgAdapt->getFieldName().c_str());
129 void MG_ADAPT_i::setTimeStep(CORBA::Long t)
131 myMgAdapt->setTimeStep(t);
133 CORBA::Long MG_ADAPT_i::getTimeStep() const
135 return myMgAdapt->getTimeStep();
137 void MG_ADAPT_i::setRankTimeStep(CORBA::Long t, CORBA::Long r)
139 myMgAdapt->setRankTimeStep(t, r);
141 CORBA::Long MG_ADAPT_i::getRank()
143 return myMgAdapt->getRank();
145 void MG_ADAPT_i::setLogFile(char* str)
147 myMgAdapt->setLogFile(str);
149 char* MG_ADAPT_i::getLogFile()
151 return CORBA::string_dup(myMgAdapt->getLogFile().c_str());
154 void MG_ADAPT_i::setVerbosityLevel(CORBA::Long v)
156 myMgAdapt->setVerbosityLevel(v);
158 CORBA::Long MG_ADAPT_i::getVerbosityLevel()
160 return myMgAdapt->getVerbosityLevel();
162 void MG_ADAPT_i::setRemoveOnSuccess(bool mybool)
164 myMgAdapt->setRemoveOnSuccess(mybool);
166 bool MG_ADAPT_i::getRemoveOnSuccess()
168 myMgAdapt->getRemoveOnSuccess();
170 MgAdaptHypothesisData* MG_ADAPT_i::getData() const
172 return myMgAdapt->getData();
174 void MG_ADAPT_i::setUseLocalMap(bool mybool)
176 myMgAdapt->setUseLocalMap(mybool);
178 bool MG_ADAPT_i::getUseLocalMap()
180 return myMgAdapt->getUseLocalMap();
182 void MG_ADAPT_i::setUseBackgroundMap(bool mybool)
184 myMgAdapt->setUseBackgroundMap(mybool);
186 bool MG_ADAPT_i::getUseBackgroundMap()
188 return myMgAdapt->getUseBackgroundMap();
190 void MG_ADAPT_i::setUseConstantValue(bool mybool)
192 myMgAdapt->setUseConstantValue(mybool);
194 bool MG_ADAPT_i::getUseConstantValue()
196 return myMgAdapt->getUseConstantValue();
199 void MG_ADAPT_i::setConstantValue(double value)
201 myMgAdapt->setConstantValue(value);
203 double MG_ADAPT_i::getConstantValue() const
205 return myMgAdapt->getConstantValue();
207 void MG_ADAPT_i::setSizeMapFile(char* str)
209 myMgAdapt->setSizeMapFile(str);
211 char* MG_ADAPT_i::getSizeMapFile()
213 return CORBA::string_dup(myMgAdapt->getSizeMapFile().c_str());
215 void MG_ADAPT_i::setFromMedFile(bool mybool)
217 myMgAdapt->setFromMedFile(mybool);
219 bool MG_ADAPT_i::isFromMedFile()
221 return myMgAdapt->isFromMedFile();
224 void MG_ADAPT_i::setKeepWorkingFiles(bool mybool)
226 myMgAdapt->setKeepWorkingFiles(mybool);
228 bool MG_ADAPT_i::getKeepWorkingFiles()
230 return myMgAdapt->getKeepWorkingFiles();
233 //~void MG_ADAPT_i::setPrCORBA::LongLogInFile(bool);
234 //~bool MG_ADAPT_i::getPrCORBA::LongLogInFile();
236 void MG_ADAPT_i::setWorkingDir(char* dir)
238 myMgAdapt->setWorkingDir(dir);
240 char* MG_ADAPT_i::getWorkingDir() const
242 return CORBA::string_dup(myMgAdapt->getWorkingDir().c_str());
244 bool MG_ADAPT_i::setAll()
246 return myMgAdapt->setAll();
248 char* MG_ADAPT_i::getCommandToRun()
250 return CORBA::string_dup(myMgAdapt->getCommandToRun().c_str());
252 CORBA::Long MG_ADAPT_i::compute(char* errStr)
255 CORBA::Long ret = myMgAdapt->compute(err);
256 strcpy(errStr, err.c_str());
259 char* MG_ADAPT_i::getFileName() const
261 return CORBA::string_dup(myMgAdapt->getFileName().c_str());
263 char* MG_ADAPT_i::getExeName()
265 return CORBA::string_dup(myMgAdapt->getExeName().c_str());
267 void MG_ADAPT_i::copyMgAdaptHypothesisData( MgAdaptHypothesisData* data)
269 myMgAdapt->copyMgAdaptHypothesisData(data);
272 void MG_ADAPT_i::checkDirPath(std::string& str)
274 myMgAdapt->checkDirPath(str);
277 bool MG_ADAPT_i::hasOptionDefined( const char* optionName ) const
279 return myMgAdapt->hasOptionDefined(optionName);
281 void MG_ADAPT_i::setOptionValue(const char* optionName,
282 const char* optionValue) throw (std::invalid_argument)
284 myMgAdapt->setOptionValue(optionName, optionValue);
286 std::string MG_ADAPT_i::getOptionValue(const char* optionName,
287 bool* isDefault) const throw (std::invalid_argument)
289 return myMgAdapt->getOptionValue(optionName, isDefault);
291 std::vector <std::string> MG_ADAPT_i::getCustomOptionValuesStrVec() const
293 return myMgAdapt->getCustomOptionValuesStrVec();
295 std::vector <std::string> MG_ADAPT_i::getOptionValuesStrVec() const
297 return myMgAdapt->getOptionValuesStrVec();
301 //~TOptionValues MG_ADAPT_i::getOptionValues() const;
302 //~const TOptionValues& MG_ADAPT_i::getCustomOptionValues() const ;