+bool LyXModule::isCompatible(string const & modName) const
+{
+ // do we exclude it?
+ if (find(excludedModules.begin(), excludedModules.end(), modName) !=
+ excludedModules.end())
+ return false;
+
+ LyXModule const * const lm = moduleList[modName];
+ if (!lm)
+ return true;
+
+ // does it exclude us?
+ vector<string> const excMods = lm->getExcludedModules();
+ if (find(excMods.begin(), excMods.end(), id) != excMods.end())
+ return false;
+
+ return true;
+}
+
+
+bool LyXModule::areCompatible(string const & mod1, string const & mod2)
+{
+ LyXModule const * const lm1 = moduleList[mod1];
+ if (lm1)
+ return lm1->isCompatible(mod2);
+ LyXModule const * const lm2 = moduleList[mod2];
+ if (lm2)
+ return lm2->isCompatible(mod1);
+ // Can't check it either way.
+ return true;
+}
+