Salome HOME
PAL10237. Read HypothesesSet's
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_XmlHandler.cxx
index 00a1e26e1c21b7178c727d5189c47f2324e5d23d..76e13851121aaad8cfe30da10b0e2904c25ed5a2 100644 (file)
@@ -143,6 +143,25 @@ bool SMESHGUI_XmlHandler::startElement (const QString&, const QString&,
       }
     }
   }
+  else if (qName == "hypotheses-set-group") // group of sets of hypotheses
+  {
+  }
+  else if (qName == "hypotheses-set") // a set of hypotheses
+  {
+    if (atts.value("name") != "")
+    {
+      HypothesesSet* aHypoSet = new HypothesesSet ( atts.value("name") );
+      myListOfHypothesesSets.push_back( aHypoSet );
+
+      for ( int isHypo = 0; isHypo < 2; ++isHypo )
+      {
+        QString aHypos = isHypo ? atts.value("hypos") : atts.value("algos");
+        aHypos = aHypos.remove( ' ' );
+        QStringList* aHypoList = isHypo ? & aHypoSet->HypoList : & aHypoSet->AlgoList;
+        *aHypoList = QStringList::split( ',', aHypos );
+      }
+    }
+  }
   else
   {
     // error