From 12b34b1b56add2bc44228da392aaf68a79128b8b Mon Sep 17 00:00:00 2001 From: eap Date: Tue, 1 Nov 2005 10:14:10 +0000 Subject: [PATCH] PAL10237. Read HypothesesSet's --- src/SMESHGUI/SMESHGUI_XmlHandler.cxx | 19 +++++++++++++++++++ src/SMESHGUI/SMESHGUI_XmlHandler.h | 2 ++ 2 files changed, 21 insertions(+) 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; -- 2.39.2