PAL10237. Read HypothesesSet's

This commit is contained in:
eap 2005-11-01 10:14:10 +00:00
parent 60bdcf56b1
commit 12b34b1b56
2 changed files with 21 additions and 0 deletions

View 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

View File

@ -53,6 +53,8 @@ class SMESHGUI_XmlHandler : public QXmlDefaultHandler
std::map<std::string, HypothesisData*> myHypothesesMap;
std::map<std::string, HypothesisData*> myAlgorithmsMap;
std::list<HypothesesSet*> myListOfHypothesesSets;
private:
QString myErrorProt;
QString myPluginName;