Mercurial > hg > svcore
comparison transform/TransformFactory.cpp @ 576:2ba202c5be8d
* various minor bits
author | Chris Cannam |
---|---|
date | Mon, 16 Mar 2009 16:36:23 +0000 |
parents | 2d551c765d51 |
children | ecbd99d5d2c4 |
comparison
equal
deleted
inserted
replaced
575:8688430850d6 | 576:2ba202c5be8d |
---|---|
323 } | 323 } |
324 | 324 |
325 TransformDescriptionMap transforms; | 325 TransformDescriptionMap transforms; |
326 | 326 |
327 populateFeatureExtractionPlugins(transforms); | 327 populateFeatureExtractionPlugins(transforms); |
328 if (m_exiting) return; | |
328 populateRealTimePlugins(transforms); | 329 populateRealTimePlugins(transforms); |
330 if (m_exiting) return; | |
329 | 331 |
330 // disambiguate plugins with similar names | 332 // disambiguate plugins with similar names |
331 | 333 |
332 std::map<QString, int> names; | 334 std::map<QString, int> names; |
333 std::map<QString, QString> pluginSources; | 335 std::map<QString, QString> pluginSources; |
387 void | 389 void |
388 TransformFactory::populateFeatureExtractionPlugins(TransformDescriptionMap &transforms) | 390 TransformFactory::populateFeatureExtractionPlugins(TransformDescriptionMap &transforms) |
389 { | 391 { |
390 std::vector<QString> plugs = | 392 std::vector<QString> plugs = |
391 FeatureExtractionPluginFactory::getAllPluginIdentifiers(); | 393 FeatureExtractionPluginFactory::getAllPluginIdentifiers(); |
394 if (m_exiting) return; | |
392 | 395 |
393 for (size_t i = 0; i < plugs.size(); ++i) { | 396 for (size_t i = 0; i < plugs.size(); ++i) { |
394 | 397 |
395 QString pluginId = plugs[i]; | 398 QString pluginId = plugs[i]; |
396 | 399 |
483 void | 486 void |
484 TransformFactory::populateRealTimePlugins(TransformDescriptionMap &transforms) | 487 TransformFactory::populateRealTimePlugins(TransformDescriptionMap &transforms) |
485 { | 488 { |
486 std::vector<QString> plugs = | 489 std::vector<QString> plugs = |
487 RealTimePluginFactory::getAllPluginIdentifiers(); | 490 RealTimePluginFactory::getAllPluginIdentifiers(); |
491 if (m_exiting) return; | |
488 | 492 |
489 static QRegExp unitRE("[\\[\\(]([A-Za-z0-9/]+)[\\)\\]]$"); | 493 static QRegExp unitRE("[\\[\\(]([A-Za-z0-9/]+)[\\)\\]]$"); |
490 | 494 |
491 for (size_t i = 0; i < plugs.size(); ++i) { | 495 for (size_t i = 0; i < plugs.size(); ++i) { |
492 | 496 |
615 } | 619 } |
616 | 620 |
617 void | 621 void |
618 TransformFactory::populateUninstalledTransforms() | 622 TransformFactory::populateUninstalledTransforms() |
619 { | 623 { |
624 if (m_exiting) return; | |
625 | |
620 populateTransforms(); | 626 populateTransforms(); |
627 if (m_exiting) return; | |
621 | 628 |
622 MutexLocker locker(&m_uninstalledTransformsMutex, | 629 MutexLocker locker(&m_uninstalledTransformsMutex, |
623 "TransformFactory::populateUninstalledTransforms"); | 630 "TransformFactory::populateUninstalledTransforms"); |
624 if (m_uninstalledTransformsPopulated) return; | 631 if (m_uninstalledTransformsPopulated) return; |
625 | 632 |
626 PluginRDFIndexer::getInstance()->indexConfiguredURLs(); | 633 PluginRDFIndexer::getInstance()->indexConfiguredURLs(); |
634 if (m_exiting) return; | |
627 | 635 |
628 //!!! This will be amazingly slow | 636 //!!! This will be amazingly slow |
629 | 637 |
630 QStringList ids = PluginRDFIndexer::getInstance()->getIndexedPluginIds(); | 638 QStringList ids = PluginRDFIndexer::getInstance()->getIndexedPluginIds(); |
631 | 639 |
708 td.configurable = false; | 716 td.configurable = false; |
709 | 717 |
710 m_uninstalledTransforms[tid] = td; | 718 m_uninstalledTransforms[tid] = td; |
711 } | 719 } |
712 | 720 |
713 if (m_exiting) break; | 721 if (m_exiting) return; |
714 } | 722 } |
715 | 723 |
716 m_uninstalledTransformsPopulated = true; | 724 m_uninstalledTransformsPopulated = true; |
717 | 725 |
718 std::cerr << "populateUninstalledTransforms exiting" << std::endl; | 726 std::cerr << "populateUninstalledTransforms exiting" << std::endl; |