]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Bug IPAL8742. Add comments into generated files of DumpPython
authoreap <eap@opencascade.com>
Fri, 6 May 2005 06:48:11 +0000 (06:48 +0000)
committereap <eap@opencascade.com>
Fri, 6 May 2005 06:48:11 +0000 (06:48 +0000)
src/GEOM_I/GEOM_DumpPython.cc

index 6b9b92e8ee45812bcaf90f9694bf665e9d648c6c..6a3d3ea9bc1bd7dfbd8ce3725212b83aa6e47287 100644 (file)
@@ -5,6 +5,7 @@ using namespace std;
 #include <TCollection_ExtendedString.hxx>
 #include <TColStd_HSequenceOfAsciiString.hxx>
 #include <Resource_DataMapOfAsciiStringAsciiString.hxx>
+#include "SALOMEDSImpl_Study.hxx"
 
 //=======================================================================
 //function : DumpPython
@@ -45,8 +46,9 @@ Engines::TMPFile* GEOM_Gen_i::DumpPython(CORBA::Object_ptr theStudy,
     }
   }
 
-  bool aValidScript;
-  TCollection_AsciiString aScript = _impl->DumpPython(aStudy->StudyId(), aMap, isPublished, aValidScript);
+  TCollection_AsciiString aScript =
+    SALOMEDSImpl_Study::GetDumpStudyComment("GEOM") + "\n\n" +
+      _impl->DumpPython(aStudy->StudyId(), aMap, isPublished, isValidScript);
 
   int aLen = aScript.Length(); 
   unsigned char* aBuffer = new unsigned char[aLen+1];
@@ -54,7 +56,6 @@ Engines::TMPFile* GEOM_Gen_i::DumpPython(CORBA::Object_ptr theStudy,
 
   CORBA::Octet* anOctetBuf =  (CORBA::Octet*)aBuffer;
   Engines::TMPFile_var aStreamFile = new Engines::TMPFile(aLen+1, aLen+1, anOctetBuf, 1); 
-  isValidScript = aValidScript;
 
   return aStreamFile._retn(); 
 }