for MG-adapt TUI

This commit is contained in:
azakir 2021-01-12 17:36:13 +01:00
parent 456850beda
commit 8196d751b1
4 changed files with 24 additions and 8 deletions

View File

@ -124,7 +124,9 @@ module SMESH{
boolean setAll(); boolean setAll();
string getCommandToRun() ; string getCommandToRun() ;
long compute(out string errStr); //long compute(out string errStr);
long compute();
string getErrMsg();
string getFileName() ; string getFileName() ;
string getExeName(); string getExeName();
void copyMgAdaptHypothesisData(in MgAdaptHypothesisData f ) ; void copyMgAdaptHypothesisData(in MgAdaptHypothesisData f ) ;

View File

@ -376,7 +376,8 @@ bool SMESHGUI_MG_ADAPTDRIVER::execute()
char* errStr; char* errStr;
try try
{ {
err = getModel()->compute(errStr); err = getModel()->compute();
errStr = getModel()->getErrMsg();
std::string msg = err == 0 ? " ok" : std::string("Not ok \n")+CORBA::string_dup(errStr) ; std::string msg = err == 0 ? " ok" : std::string("Not ok \n")+CORBA::string_dup(errStr) ;
} }
catch (const std::exception& e) catch (const std::exception& e)

View File

@ -354,13 +354,24 @@ char* MG_ADAPT_i::getCommandToRun()
return CORBA::string_dup(myMgAdapt->getCommandToRun().c_str()); return CORBA::string_dup(myMgAdapt->getCommandToRun().c_str());
} }
CORBA::Long MG_ADAPT_i::compute(::CORBA::String_out errStr) //~CORBA::Long MG_ADAPT_i::compute(::CORBA::String_out errStr)
//~{
//~std::string err("");
//~CORBA::Long ret = myMgAdapt->compute(err);
//~errStr = err.c_str();
//~return ret;
//~}
CORBA::Long MG_ADAPT_i::compute()
{ {
std::string err(""); errStr = "";
CORBA::Long ret = myMgAdapt->compute(err); CORBA::Long ret = myMgAdapt->compute(errStr);
errStr = err.c_str(); //~errStr = err.c_str();
return ret; return ret;
} }
char* MG_ADAPT_i::getErrMsg()
{
return CORBA::string_dup(errStr.c_str());
}
char* MG_ADAPT_i::getFileName() char* MG_ADAPT_i::getFileName()
{ {
return CORBA::string_dup(myMgAdapt->getFileName().c_str()); return CORBA::string_dup(myMgAdapt->getFileName().c_str());

View File

@ -106,7 +106,8 @@ public:
bool setAll(); bool setAll();
char* getCommandToRun() ; char* getCommandToRun() ;
CORBA::Long compute(::CORBA::String_out errStr); //~CORBA::Long compute(::CORBA::String_out errStr);
CORBA::Long compute();
char* getFileName(); char* getFileName();
char* getExeName(); char* getExeName();
void copyMgAdaptHypothesisData( const SMESH::MgAdaptHypothesisData& data ) ; void copyMgAdaptHypothesisData( const SMESH::MgAdaptHypothesisData& data ) ;
@ -127,9 +128,10 @@ public:
void copyHypothesisDataToImpl(const SMESH::MgAdaptHypothesisData& from, ::MG_ADAPT::MgAdaptHypothesisData* to) const; void copyHypothesisDataToImpl(const SMESH::MgAdaptHypothesisData& from, ::MG_ADAPT::MgAdaptHypothesisData* to) const;
//~TOptionValues getOptionValues() const; //~TOptionValues getOptionValues() const;
//~const TOptionValues& getCustomOptionValues() const ; //~const TOptionValues& getCustomOptionValues() const ;
char* getErrMsg();
private: private:
::MG_ADAPT::MgAdapt* myMgAdapt; ::MG_ADAPT::MgAdapt* myMgAdapt;
std::string errStr;
//~CORBA::ORB_ptr _orb; //~CORBA::ORB_ptr _orb;
//~ADAPT::ADAPT_Gen_var _gen_i; //~ADAPT::ADAPT_Gen_var _gen_i;