]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Bug IPAL8747. insert 'a' at the head of a name starting with a digit
authoreap <eap@opencascade.com>
Fri, 6 May 2005 12:54:40 +0000 (12:54 +0000)
committereap <eap@opencascade.com>
Fri, 6 May 2005 12:54:40 +0000 (12:54 +0000)
Bug IPAL8742. Add comments into generated files of DumpPython

src/VISU_I/VISU_DumpPython.cc

index 251d46659045efcb0dadf2e2bef161363d302881..d0cb7c2bd1a37b1f8cb06a128de266a22495c40e 100644 (file)
@@ -39,6 +39,7 @@
 #include "VISU_StreamLines_i.hh"
 #include "VISU_Table_i.hh"
 
+#include "SALOMEDSImpl_Study.hxx"
 #include "utilities.h"
 
 #include <cctype>      
@@ -96,6 +97,9 @@ namespace VISU{
     //replace_if(aName.begin(),aName.end(),not1(ptr_fun(isxdigit)),'_');
     replace_if(aName.begin(),aName.end(),TReplacePredicate(),'_');
 
+    if ( isdigit( aName[0] ))
+      aName.insert( 0, 1, 'a' );
+
     return aName;
   }
 
@@ -1157,6 +1161,7 @@ namespace VISU{
 #endif
 
     std::string aPrefix(PREFIX);
+    aStr<<SALOMEDSImpl_Study::GetDumpStudyComment("VISU")<<endl<<endl;
     aStr<<"def RebuildData(theStudy):"<<endl;
     aStr<<aPrefix<<"from batchmode_salome import orb, naming_service, lcc, myStudyManager"<<endl;
     aStr<<aPrefix<<"import SALOME_MED"<<endl;