X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/8f0bedf735fe2b306c11c3f4a168245a05e37ccd..14cd6d834ab531525a51c6a6992583b3e9143e02:/Parameters.cpp diff --git a/Parameters.cpp b/Parameters.cpp index 32bec53..2ee6255 100644 --- a/Parameters.cpp +++ b/Parameters.cpp @@ -836,7 +836,7 @@ void Parameters::loadImplementationsFromXml() throw(Exception) { if (compList != "none") { QStringList compos = compList.split(","); foreach(QString s, compos) { - impl->addSource(s); + impl->addResource(s); } } @@ -960,7 +960,7 @@ void Parameters::loadSources() throw(Exception) { QString netName = list.at(j); netName.truncate(list.at(j).size() -4); cout << "found netlist " << qPrintable(netName) << endl; - availableSources.append(new ExternalSource(netName,fileName,ExternalSource::Netlist)); + availableResources.append(new ExternalResource(netName,fileName,ExternalResource::Netlist)); } else { cout << "parsing " << qPrintable(fileName) << " ... "; @@ -978,7 +978,7 @@ void Parameters::loadSources() throw(Exception) { if (matchPack.hasMatch()) { QString packName = matchPack.captured(1); cout << "found package " << qPrintable(packName) << endl; - availableSources.append(new ExternalSource(packName,fileName,ExternalSource::Package)); + availableResources.append(new ExternalResource(packName,fileName,ExternalResource::Package)); } } else if (line.contains("entity", Qt::CaseInsensitive)) { @@ -987,7 +987,7 @@ void Parameters::loadSources() throw(Exception) { if (matchEnt.hasMatch()) { QString entityName = matchEnt.captured(1); cout << "found entity " << qPrintable(entityName) << endl; - availableSources.append(new ExternalSource(entityName,fileName,ExternalSource::Code)); + availableResources.append(new ExternalResource(entityName,fileName,ExternalResource::Code)); } } line = in.readLine(); @@ -999,11 +999,14 @@ void Parameters::loadSources() throw(Exception) { } } -ExternalSource* Parameters::searchSourceByName(const QString& name) { - foreach(ExternalSource* s, availableSources) { - if (s->getName() == name) return s; +QList Parameters::searchResourceByName(const QString& name) { + QList listRes; + foreach(ExternalResource* s, availableResources) { + if (s->getName() == name) { + listRes.append(s); + } } - return NULL; + return listRes; } void Parameters::addAvailableBlock(ReferenceBlock *block) {