]> SALOME platform Git repositories - tools/hxx2salome.git/commitdiff
Salome HOME
bug report from V3_0_maintenance (09/07/2007)
authorcrouzet <crouzet>
Mon, 9 Jul 2007 10:32:52 +0000 (10:32 +0000)
committercrouzet <crouzet>
Mon, 9 Jul 2007 10:32:52 +0000 (10:32 +0000)
scripts/cpp_compo_template.tgz
scripts/parse3.awk

index 50cebcf20eb6d35b2a0215bd175635faa0488f19..6097ce350c72abd7f42c248e874b45d89fb83382 100644 (file)
Binary files a/scripts/cpp_compo_template.tgz and b/scripts/cpp_compo_template.tgz differ
index 79038ed9f73614fb27fecfbbae7521bd7219de0e..315e1ee40ad7cd244de4ee854a9a5860f5347232 100644 (file)
@@ -139,7 +139,7 @@ BEGIN {
   cpp_impl_a["std::vector<double>*&"]="\tstd::vector<double>* _%s;\n"
   cpp_impl_a["const std::vector<std::vector<double> >&"]="\tMatrixClient _%s_client;\n\tint _%s_nbRow;\n\tint _%s_nbCol;\n"\
              "\tdouble* _%s_tab = _%s_client.getValue(%s,_%s_nbCol,_%s_nbRow);\n\tstd::vector<std::vector<double> > _%s(_%s_nbRow);\n"\
-            "\tfor (int i=0; i!=_%s_nbRow; ++i)\n\t{\n\t    _%s.reserve(_%s_nbCol);\n"\
+            "\tfor (int i=0; i!=_%s_nbRow; ++i)\n\t{\n\t    _%s[i].resize(_%s_nbCol);\n"\
             "\t    std::copy(_%s_tab+_%s_nbCol*i,_%s_tab+_%s_nbCol*(i+1), _%s[i].begin());\n\t}\n\tdelete [] _%s_tab;\n"
   cpp_impl_a["MEDMEM::FIELD<int>*&"]="\tMEDMEM::FIELD<int>* _%s;\n"
   cpp_impl_a["const MEDMEM::FIELD<int>*"]="\tstd::auto_ptr<MEDMEM::FIELD<int> > _%s ( new MEDMEM::FIELDClient<int>(%s) );\n"
@@ -193,7 +193,7 @@ BEGIN {
              "\tint _rtn_cpp_i=(*_rtn_cpp).size();\n\tint _rtn_cpp_j=(*_rtn_cpp)[0].size();\n"\
             "\tdouble* _rtn_tab = new double[_rtn_cpp_i*_rtn_cpp_j];\n"\
             "\tfor (int i=0; i!=_rtn_cpp_i; ++i)\n\t    std::copy((*_rtn_cpp)[i].begin(),(*_rtn_cpp)[i].end(),_rtn_tab+i*_rtn_cpp_j);\n"\
-            "\tSALOME_Matrix_i* _rtn_matrix_i = new SALOME_Matrix_i(*this,_rtn_tab,_rtn_cpp_j,_rtn_cpp_i,true);\n"\
+            "\tSALOME_Matrix_i* _rtn_matrix_i = new SALOME_Matrix_i(*this,_rtn_tab,_rtn_cpp_i,_rtn_cpp_j,true);\n"\
             "\tSALOME::Matrix_ptr _rtn_ior = _rtn_matrix_i->_this();\n\tdelete _rtn_cpp;\n"
   cpp_impl_b["const MEDMEM::FIELD<int>*"]=\
              "\tMEDMEM::FIELDINT_i * _rtn_field_i = new MEDMEM::FIELDINT_i(const_cast<MEDMEM::FIELD<int>*>(_rtn_cpp),false);\n"\
@@ -225,18 +225,18 @@ BEGIN {
   cpp_impl_c["std::vector<int>*&"]=\
              "\t%s = SenderFactory::buildSender(*this,&(*_%s)[0],(*_%s).size(),true);\n"
   cpp_impl_c["std::string&"]="\t%s = CORBA::string_dup(_%s.c_str());\n"
-  cpp_impl_c["int&"]="\t%s = _%s"
-  cpp_impl_c["double&"]="\t%s = _%s"
-  cpp_impl_c["float&"]="\t%s = _%s"
-  cpp_impl_c["long&"]="\t%s = _%s"
-  cpp_impl_c["short&"]="\t%s = _%s"
-  cpp_impl_c["unsigned&"]="\t%s = _%s"
+  cpp_impl_c["int&"]="\t%s = _%s;\n"
+  cpp_impl_c["double&"]="\t%s = _%s;\n"
+  cpp_impl_c["float&"]="\t%s = _%s;\n"
+  cpp_impl_c["long&"]="\t%s = _%s;\n"
+  cpp_impl_c["short&"]="\t%s = _%s;\n"
+  cpp_impl_c["unsigned&"]="\t%s = _%s;\n"
   cpp_impl_c["const MEDMEM::MESH&"]="\t_%s->removeReference();\n"
   cpp_impl_c["const MEDMEM::MESH*"]="\t_%s->removeReference();\n"
 #
 #
 # record sep is ");\n" whith blanks all around, and optional "(" at the beginning
-  RS="[(]?[ \t]*\)[ \t]*;[ \t]*\n"  
+  RS="[(]?[ \t]*[)][ \t]*[;][ \t]*[\n]"  
   FS="[ \t]*[(,][ \t]*"  # field sep is either "(" or "," surrounded by blanks 
 }