]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Dump Python extension
authorouv <ouv@opencascade.com>
Mon, 24 Nov 2008 12:44:17 +0000 (12:44 +0000)
committerouv <ouv@opencascade.com>
Mon, 24 Nov 2008 12:44:17 +0000 (12:44 +0000)
src/GEOM_I/GEOM_DumpPython.cc
src/GEOM_I/GEOM_Gen_i.cc

index c3f7b5da9bde7efbe4d9b3b244f98bfa50607964..25ffab45b60db6d5175f600ee9b53a299830af51 100644 (file)
@@ -73,11 +73,14 @@ Engines::TMPFile* GEOM_Gen_i::DumpPython(CORBA::Object_ptr theStudy,
        vector<TVariable> aVariables;
        if(aValue->FindAttribute(anAttr,"AttributeString")){
          anAttrStr = SALOMEDS::AttributeString::_narrow(anAttr);
-         SALOMEDS::ListOfStrings_var aListOfVars = aStudy->ParseVariables(anAttrStr->Value());
-         for(int i = 0;i < aListOfVars->length();i++) {
-           bool isVar = aStudy->IsVariable(aListOfVars[i].in());
-           TVariable aVar = TVariable( (char*)aListOfVars[i].in(), isVar );
-           aVariables.push_back(aVar);
+         SALOMEDS::ListOfListOfStrings_var aSections = aStudy->ParseVariables(anAttrStr->Value());
+         for(int i = 0; i < aSections->length(); i++) {
+           SALOMEDS::ListOfStrings aListOfVars = aSections[i];
+           for(int j = 0; j < aListOfVars.length(); j++) {
+             bool isVar = aStudy->IsVariable(aListOfVars[j].in());
+             TVariable aVar = TVariable( (char*)aListOfVars[j].in(), isVar );
+             aVariables.push_back(aVar);
+           }
          }
        }
        aVariableMap.insert(pair<TCollection_AsciiString,vector<TVariable> >((char*)anEntry,aVariables));
index ce76a6fad321fadcb6e13a16a32171f34d125927..6c24a00a17a9ff2412b77ebc99164810c8280305 100644 (file)
@@ -276,14 +276,19 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::PublishInStudy(SALOMEDS::Study_ptr theStudy,
   //Set NoteBook variables used in the object creation
   bool isFound = false;
   TCollection_AsciiString aVars;
-  SALOMEDS::ListOfStrings_var aListOfVars = theStudy->ParseVariables(aShape->GetParameters());
-  for(int i = 0, n = aListOfVars->length(); i < n; i++) {
-    if(theStudy->IsVariable(aListOfVars[i].in())) {
-      aVars += TCollection_AsciiString(aListOfVars[i].in());
-      isFound = true;
+  SALOMEDS::ListOfListOfStrings_var aSections = theStudy->ParseVariables(aShape->GetParameters());
+  for(int i = 0, n = aSections->length(); i < n; i++) {
+    SALOMEDS::ListOfStrings aListOfVars = aSections[i];
+    for(int j = 0, m = aListOfVars.length(); j < m; j++) {
+      if(theStudy->IsVariable(aListOfVars[j].in())) {
+       aVars += TCollection_AsciiString(aListOfVars[j].in());
+       isFound = true;
+      }
+      if(j != m-1)
+       aVars += ":";
     }
     if(i != n-1)
-      aVars += ":";
+      aVars += "|";
   }
   if(isFound) {
     anAttr = aStudyBuilder->FindOrCreateAttribute(aResultSO, "AttributeString");