+bool LyXModule::isCompatible(string const & modname) const
+{
+ // do we exclude it?
+ if (find(excluded_modules_.begin(), excluded_modules_.end(), modname) !=
+ excluded_modules_.end())
+ return false;
+
+ LyXModule const * const lm = theModuleList[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 = theModuleList[mod1];
+ if (lm1)
+ return lm1->isCompatible(mod2);
+ LyXModule const * const lm2 = theModuleList[mod2];
+ if (lm2)
+ return lm2->isCompatible(mod1);
+ // Can't check it either way.
+ return true;
+}
+