+bool LayoutModuleList::moduleConflicts(string const & modName,
+ LayoutFile const * const lay) const
+{
+ // Is this module explicitly excluded by the document class?
+ const_iterator const exclmodstart = lay->excludedModules().begin();
+ const_iterator const exclmodend = lay->excludedModules().end();
+ if (find(exclmodstart, exclmodend, modName) != exclmodend)
+ return true;
+ // Check for conflicts with used modules
+ // first the provided modules...
+ const_iterator provmodit = lay->providedModules().begin();
+ const_iterator const provmodend = lay->providedModules().end();
+ for (; provmodit != provmodend; ++provmodit) {
+ if (!LyXModule::areCompatible(modName, *provmodit))
+ return true;
+ }
+ // and then the selected modules
+ const_iterator mit = begin();
+ const_iterator const men = end();
+ for (; mit != men; ++mit)
+ if (!LyXModule::areCompatible(modName, *mit))
+ return true;
+ return false;
+}
+
+