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

Private GIT Repository
finished VHDL gen. (but have to test further
[blast.git] / Parameters.cpp
index 32bec53a4294bb1d377157de74cdf8a549862cb1..2ee625592f4e0f36f19a63ac33e4da397d7d4f61 100644 (file)
@@ -836,7 +836,7 @@ void Parameters::loadImplementationsFromXml() throw(Exception) {
       if (compList != "none") {\r
         QStringList compos = compList.split(",");\r
         foreach(QString s, compos) {\r
-          impl->addSource(s);\r
+          impl->addResource(s);\r
         }\r
       }\r
 \r
@@ -960,7 +960,7 @@ void Parameters::loadSources() throw(Exception) {
         QString netName = list.at(j);\r
         netName.truncate(list.at(j).size() -4);\r
         cout << "found netlist " << qPrintable(netName) << endl;\r
-        availableSources.append(new ExternalSource(netName,fileName,ExternalSource::Netlist));\r
+        availableResources.append(new ExternalResource(netName,fileName,ExternalResource::Netlist));\r
       }\r
       else {\r
         cout << "parsing " << qPrintable(fileName) << " ... ";\r
@@ -978,7 +978,7 @@ void Parameters::loadSources() throw(Exception) {
             if (matchPack.hasMatch()) {\r
               QString packName = matchPack.captured(1);\r
               cout << "found package " << qPrintable(packName) << endl;\r
-              availableSources.append(new ExternalSource(packName,fileName,ExternalSource::Package));\r
+              availableResources.append(new ExternalResource(packName,fileName,ExternalResource::Package));\r
             }\r
           }\r
           else if (line.contains("entity", Qt::CaseInsensitive)) {\r
@@ -987,7 +987,7 @@ void Parameters::loadSources() throw(Exception) {
             if (matchEnt.hasMatch()) {\r
               QString entityName = matchEnt.captured(1);\r
               cout << "found entity " << qPrintable(entityName) << endl;\r
-              availableSources.append(new ExternalSource(entityName,fileName,ExternalSource::Code));\r
+              availableResources.append(new ExternalResource(entityName,fileName,ExternalResource::Code));\r
             }\r
           }\r
           line = in.readLine();\r
@@ -999,11 +999,14 @@ void Parameters::loadSources() throw(Exception) {
   }\r
 }\r
 \r
-ExternalSource* Parameters::searchSourceByName(const QString& name) {\r
-  foreach(ExternalSource* s, availableSources) {\r
-    if (s->getName() == name) return s;\r
+QList<ExternalResource *> Parameters::searchResourceByName(const QString& name) {\r
+  QList<ExternalResource*> listRes;\r
+  foreach(ExternalResource* s, availableResources) {\r
+    if (s->getName() == name) {\r
+      listRes.append(s);\r
+    }\r
   }\r
-  return NULL;\r
+  return listRes;\r
 }\r
 \r
 void Parameters::addAvailableBlock(ReferenceBlock *block) {\r