]> AND Private Git Repository - blast.git/blobdiff - BlockImplementation.cpp
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
modifying pattern methods to throw exceptions
[blast.git] / BlockImplementation.cpp
index e6b61caa640d6eb10dff9035d11a0998f103d843..b7510217a5cce885b85b5c522d381fa26ab50e39 100644 (file)
@@ -52,8 +52,9 @@ void BlockImplementation::loadPatterns(QDomElement& root) throw(Exception) {
   }\r
   \r
   QDomElement eltProd  = eltCons.nextSiblingElement("production");\r
+  \r
   productionCounter = eltProd.attribute("counter","none");\r
-  QDomNodeList listNodeOutput = eltCons.elementsByTagName("output");\r
+  QDomNodeList listNodeOutput = eltProd.elementsByTagName("output");\r
   for(int i=0; i<listNodeOutput.size(); i++) {\r
     QDomNode node = listNodeOutput.at(i);    \r
     QDomElement elt = node.toElement();        \r
@@ -62,6 +63,12 @@ void BlockImplementation::loadPatterns(QDomElement& root) throw(Exception) {
     QString patternStr = elt.attribute("pattern","none");    \r
     productionPattern.insert(nameStr,patternStr);    \r
   }\r
+  cout << "patterns summary:" << endl;\r
+  QHashIterator<QString,QString> iterP(productionPattern);\r
+  while (iterP.hasNext()) {\r
+    iterP.next();\r
+    cout << qPrintable(iterP.key()) << " -> " << qPrintable(iterP.value()) << endl;\r
+  }\r
   cout << "impls patterns read correctly" << endl;\r
 }\r
 \r