X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/18fecf25efe710631fabecbb9f689c2997fdfe18..e45bacc6bd342a1b19e42b62133ddabc99aa9edd:/Parameters.cpp?ds=inline diff --git a/Parameters.cpp b/Parameters.cpp index 46437c3..c903f5d 100644 --- a/Parameters.cpp +++ b/Parameters.cpp @@ -574,10 +574,27 @@ void Parameters::loadBlastConfiguration(QString confFile) throw(Exception) { implPathes.append(path); cout << "impl path : " << qPrintable(path) << endl << endl; } + + QDomElement eltSource = eltImpl.nextSiblingElement("sources"); + nbPathesStr = eltSource.attribute("nb","none"); + nbPathes = nbPathesStr.toInt(&ok); + QDomNodeList listSourceDir = eltSource.elementsByTagName("source_lib"); + if ((!ok) || (nbPathes != listSourceDir.size())) throw(Exception(CONFIGFILE_CORRUPTED)); + + for(int i=0;i // for each child element, initialize the associated attributes of Parameters - QDomElement eltDefaults = eltImpl.nextSiblingElement("defaults"); + QDomElement eltDefaults = eltSource.nextSiblingElement("defaults"); QDomElement eltBlocks = eltDefaults.firstChildElement("blocks"); QString attributeStr = eltBlocks.attribute("width", "none"); @@ -807,6 +824,22 @@ void Parameters::loadImplementationsFromXml() throw(Exception) { QString refXml = implRoot.attribute("ref_name","none"); QString refMd5 = implRoot.attribute("ref_md5","none"); BlockImplementation* impl = new BlockImplementation(fileName,refXml,refMd5); + + QDomNodeList archNode = implRoot.elementsByTagName("architecture"); + + if (archNode.isEmpty()) { + cout << "impl has no architecture" << endl; + return; + } + QDomElement archElt = archNode.at(0).toElement(); + QString compList = archElt.attribute("comp_list","none"); + if (compList != "none") { + QStringList compos = compList.split(","); + foreach(QString s, compos) { + impl->addSource(s); + } + } + try { impl->loadPatterns(implRoot); } @@ -908,6 +941,64 @@ void Parameters::saveImplementationsToLib() throw(Exception) { libFile.close(); } + + +void Parameters::loadSources() throw(Exception) { + + for(int i=0;igetName() == name) return s; + } + return NULL; +} + void Parameters::addAvailableBlock(ReferenceBlock *block) { availableBlocks.append(block); foreach (int id,block->getCategories()) {