From: eap Date: Thu, 15 Dec 2005 08:38:29 +0000 (+0000) Subject: PAL10494 (SMESH python dump uses idl interface). Python dump using TPythonDump tool X-Git-Tag: T_Before_Join_BR_3_1_0deb~13 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=71d173d51a36d3a3ad7b51972b5be88c2df9865e;p=modules%2Fsmesh.git PAL10494 (SMESH python dump uses idl interface). Python dump using TPythonDump tool --- diff --git a/src/StdMeshers_I/StdMeshers_Arithmetic1D_i.cxx b/src/StdMeshers_I/StdMeshers_Arithmetic1D_i.cxx index 9c39bc72b..1208075f5 100644 --- a/src/StdMeshers_I/StdMeshers_Arithmetic1D_i.cxx +++ b/src/StdMeshers_I/StdMeshers_Arithmetic1D_i.cxx @@ -30,6 +30,7 @@ using namespace std; #include "StdMeshers_Arithmetic1D_i.hxx" #include "SMESH_Gen_i.hxx" #include "SMESH_Gen.hxx" +#include "SMESH_PythonDump.hxx" #include "Utils_CorbaException.hxx" #include "utilities.h" @@ -92,11 +93,8 @@ void StdMeshers_Arithmetic1D_i::SetLength(CORBA::Double theLength, } // Update Python script - TCollection_AsciiString aStr, aStrLen ((double)theLength), aStrFlag ((int)theIsStart); - SMESH_Gen_i::AddObject(aStr, _this()) += ".SetLength("; - aStr += aStrLen + ", " + aStrFlag + ")"; - - SMESH_Gen_i::AddToCurrentPyScript(aStr); + SMESH::TPythonDump() << _this() << ".SetLength( " + << theLength << ", " << theIsStart << " )"; } //============================================================================= diff --git a/src/StdMeshers_I/StdMeshers_Deflection1D_i.cxx b/src/StdMeshers_I/StdMeshers_Deflection1D_i.cxx index 0f3f4a942..72a715d81 100644 --- a/src/StdMeshers_I/StdMeshers_Deflection1D_i.cxx +++ b/src/StdMeshers_I/StdMeshers_Deflection1D_i.cxx @@ -31,6 +31,7 @@ using namespace std; #include "StdMeshers_Deflection1D_i.hxx" #include "SMESH_Gen_i.hxx" #include "SMESH_Gen.hxx" +#include "SMESH_PythonDump.hxx" #include "Utils_CorbaException.hxx" #include "utilities.h" @@ -92,11 +93,7 @@ void StdMeshers_Deflection1D_i::SetDeflection( CORBA::Double theValue ) } // Update Python script - TCollection_AsciiString aStr, aStrVal ((double)theValue); - SMESH_Gen_i::AddObject(aStr, _this()) += ".SetDeflection("; - aStr += aStrVal + ")"; - - SMESH_Gen_i::AddToCurrentPyScript(aStr); + SMESH::TPythonDump() << _this() << ".SetDeflection( " << theValue << " )"; } //============================================================================= diff --git a/src/StdMeshers_I/StdMeshers_LocalLength_i.cxx b/src/StdMeshers_I/StdMeshers_LocalLength_i.cxx index a37b8e14a..deb431fca 100644 --- a/src/StdMeshers_I/StdMeshers_LocalLength_i.cxx +++ b/src/StdMeshers_I/StdMeshers_LocalLength_i.cxx @@ -31,6 +31,7 @@ using namespace std; #include "StdMeshers_LocalLength_i.hxx" #include "SMESH_Gen_i.hxx" #include "SMESH_Gen.hxx" +#include "SMESH_PythonDump.hxx" #include "Utils_CorbaException.hxx" #include "utilities.h" @@ -92,11 +93,7 @@ void StdMeshers_LocalLength_i::SetLength( CORBA::Double theLength ) } // Update Python script - TCollection_AsciiString aStr, aStrLen ((double)theLength); - SMESH_Gen_i::AddObject(aStr, _this()) += ".SetLength("; - aStr += aStrLen + ")"; - - SMESH_Gen_i::AddToCurrentPyScript(aStr); + SMESH::TPythonDump() << _this() << ".SetLength( " << theLength << " )"; } //============================================================================= diff --git a/src/StdMeshers_I/StdMeshers_MaxElementArea_i.cxx b/src/StdMeshers_I/StdMeshers_MaxElementArea_i.cxx index c7ab79555..af8513b7a 100644 --- a/src/StdMeshers_I/StdMeshers_MaxElementArea_i.cxx +++ b/src/StdMeshers_I/StdMeshers_MaxElementArea_i.cxx @@ -31,6 +31,7 @@ using namespace std; #include "StdMeshers_MaxElementArea_i.hxx" #include "SMESH_Gen_i.hxx" #include "SMESH_Gen.hxx" +#include "SMESH_PythonDump.hxx" #include "Utils_CorbaException.hxx" #include "utilities.h" @@ -92,11 +93,7 @@ void StdMeshers_MaxElementArea_i::SetMaxElementArea( CORBA::Double theArea ) } // Update Python script - TCollection_AsciiString aStr, aStrArea ((double)theArea); - SMESH_Gen_i::AddObject(aStr, _this()) += ".SetMaxElementArea("; - aStr += aStrArea + ")"; - - SMESH_Gen_i::AddToCurrentPyScript(aStr); + SMESH::TPythonDump() << _this() << ".SetMaxElementArea( " << theArea << " )"; } //============================================================================= diff --git a/src/StdMeshers_I/StdMeshers_MaxElementVolume_i.cxx b/src/StdMeshers_I/StdMeshers_MaxElementVolume_i.cxx index d8686ab33..582938b94 100644 --- a/src/StdMeshers_I/StdMeshers_MaxElementVolume_i.cxx +++ b/src/StdMeshers_I/StdMeshers_MaxElementVolume_i.cxx @@ -31,6 +31,7 @@ using namespace std; #include "StdMeshers_MaxElementVolume_i.hxx" #include "SMESH_Gen_i.hxx" #include "SMESH_Gen.hxx" +#include "SMESH_PythonDump.hxx" #include "Utils_CorbaException.hxx" #include "utilities.h" @@ -92,11 +93,7 @@ void StdMeshers_MaxElementVolume_i::SetMaxElementVolume( CORBA::Double theVolume } // Update Python script - TCollection_AsciiString aStr, aStrVol ((double)theVolume); - SMESH_Gen_i::AddObject(aStr, _this()) += ".SetMaxElementVolume("; - aStr += aStrVol + ")"; - - SMESH_Gen_i::AddToCurrentPyScript(aStr); + SMESH::TPythonDump() << _this() << ".SetMaxElementVolume( " << theVolume << " )"; } //============================================================================= diff --git a/src/StdMeshers_I/StdMeshers_NumberOfSegments_i.cxx b/src/StdMeshers_I/StdMeshers_NumberOfSegments_i.cxx index 69d507346..88149b400 100644 --- a/src/StdMeshers_I/StdMeshers_NumberOfSegments_i.cxx +++ b/src/StdMeshers_I/StdMeshers_NumberOfSegments_i.cxx @@ -31,6 +31,7 @@ using namespace std; #include "StdMeshers_NumberOfSegments_i.hxx" #include "SMESH_Gen_i.hxx" #include "SMESH_Gen.hxx" +#include "SMESH_PythonDump.hxx" #include "Utils_CorbaException.hxx" #include "utilities.h" @@ -92,11 +93,7 @@ void StdMeshers_NumberOfSegments_i::SetNumberOfSegments( CORBA::Long theSegments } // Update Python script - TCollection_AsciiString aStr, aStrNb ((int)theSegmentsNumber); - SMESH_Gen_i::AddObject(aStr, _this()) += ".SetNumberOfSegments("; - aStr += aStrNb + ")"; - - SMESH_Gen_i::AddToCurrentPyScript(aStr); + SMESH::TPythonDump() << _this() << ".SetNumberOfSegments( " << theSegmentsNumber << " )"; } //============================================================================= @@ -126,6 +123,9 @@ void StdMeshers_NumberOfSegments_i::SetDistrType(CORBA::Long typ) ASSERT( myBaseImpl ); try { this->GetImpl()->SetDistrType( (::StdMeshers_NumberOfSegments::DistrType) typ ); + + // Update Python script + SMESH::TPythonDump() << _this() << ".SetDistrType( " << typ << " )"; } catch ( SALOME_Exception& S_ex ) { THROW_SALOME_CORBA_EXCEPTION( S_ex.what(), @@ -160,6 +160,8 @@ void StdMeshers_NumberOfSegments_i::SetScaleFactor( CORBA::Double theScaleFactor ASSERT( myBaseImpl ); try { this->GetImpl()->SetScaleFactor( theScaleFactor ); + // Update Python script + SMESH::TPythonDump() << _this() << ".SetScaleFactor( " << theScaleFactor << " )"; } catch ( SALOME_Exception& S_ex ) { THROW_SALOME_CORBA_EXCEPTION( S_ex.what(), @@ -206,6 +208,8 @@ void StdMeshers_NumberOfSegments_i::SetTableFunction(const SMESH::double_array& tbl[i] = table[i]; try { this->GetImpl()->SetTableFunction( tbl ); + // Update Python script + SMESH::TPythonDump() << _this() << ".SetTableFunction( " << table << " )"; } catch ( SALOME_Exception& S_ex ) { THROW_SALOME_CORBA_EXCEPTION( S_ex.what(), @@ -250,6 +254,8 @@ void StdMeshers_NumberOfSegments_i::SetExpressionFunction(const char* expr) ASSERT( myBaseImpl ); try { this->GetImpl()->SetExpressionFunction( expr ); + // Update Python script + SMESH::TPythonDump() << _this() << ".SetExpressionFunction( " << expr << " )"; } catch ( SALOME_Exception& S_ex ) { THROW_SALOME_CORBA_EXCEPTION( S_ex.what(), @@ -290,6 +296,8 @@ void StdMeshers_NumberOfSegments_i::SetExponentMode(CORBA::Boolean isExp) ASSERT( myBaseImpl ); try { this->GetImpl()->SetExponentMode( isExp ); + // Update Python script + SMESH::TPythonDump() << _this() << ".SetExponentMode( " << isExp << " )"; } catch ( SALOME_Exception& S_ex ) { THROW_SALOME_CORBA_EXCEPTION( S_ex.what(), diff --git a/src/StdMeshers_I/StdMeshers_StartEndLength_i.cxx b/src/StdMeshers_I/StdMeshers_StartEndLength_i.cxx index 56ce6f51d..91d398a99 100644 --- a/src/StdMeshers_I/StdMeshers_StartEndLength_i.cxx +++ b/src/StdMeshers_I/StdMeshers_StartEndLength_i.cxx @@ -31,6 +31,7 @@ using namespace std; #include "StdMeshers_StartEndLength_i.hxx" #include "SMESH_Gen_i.hxx" #include "SMESH_Gen.hxx" +#include "SMESH_PythonDump.hxx" #include "Utils_CorbaException.hxx" #include "utilities.h" @@ -93,11 +94,8 @@ void StdMeshers_StartEndLength_i::SetLength(CORBA::Double theLength, } // Update Python script - TCollection_AsciiString aStr, aStrLen ((double)theLength), aStrFlag ((int)theIsStart); - SMESH_Gen_i::AddObject(aStr, _this()) += ".SetLength("; - aStr += aStrLen + ", " + aStrFlag + ")"; - - SMESH_Gen_i::AddToCurrentPyScript(aStr); + SMESH::TPythonDump() << _this() << ".SetLength( " + << theLength << ", " << theIsStart << " )"; } //=============================================================================