From: eap Date: Tue, 1 Nov 2005 10:14:10 +0000 (+0000) Subject: PAL10237. Read HypothesesSet's X-Git-Tag: V3_1_0a3~31 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=12b34b1b56add2bc44228da392aaf68a79128b8b;p=modules%2Fsmesh.git PAL10237. Read HypothesesSet's --- diff --git a/src/SMESHGUI/SMESHGUI_XmlHandler.cxx b/src/SMESHGUI/SMESHGUI_XmlHandler.cxx index 00a1e26e1..76e138511 100644 --- a/src/SMESHGUI/SMESHGUI_XmlHandler.cxx +++ b/src/SMESHGUI/SMESHGUI_XmlHandler.cxx @@ -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 diff --git a/src/SMESHGUI/SMESHGUI_XmlHandler.h b/src/SMESHGUI/SMESHGUI_XmlHandler.h index c64ff86c8..ecf738528 100644 --- a/src/SMESHGUI/SMESHGUI_XmlHandler.h +++ b/src/SMESHGUI/SMESHGUI_XmlHandler.h @@ -53,6 +53,8 @@ class SMESHGUI_XmlHandler : public QXmlDefaultHandler std::map myHypothesesMap; std::map myAlgorithmsMap; + std::list myListOfHypothesesSets; + private: QString myErrorProt; QString myPluginName;