+ /// Checks to make sure module's requriements are satisfied, that it does
+ /// not conflict with already-present modules, isn't already loaded, etc.
+ bool moduleCanBeAdded(std::string const & modName,
+ LayoutFile const * const lay) const;
+ /// Like !moduleCanBeAdded(), but does not check requirements
+ bool moduleConflicts(std::string const & modName,
+ LayoutFile const * const lay) const;
+ /// If the user changes the base class for a given document, then the
+ /// associated module list has to be updated. This just calls
+ /// (i) removeBadModules()
+ /// (ii) addDefaultModules()
+ /// (iii) checkModuleConsistency()
+ /// in that order, for which see below.
+ /// \param lay The new base class.
+ /// \param removedModules Modules the user explicitly removed and so
+ /// which should not be included.
+ /// \return true if no changes had to be made, false if some did have
+ /// to be made.
+ bool adaptToBaseClass(LayoutFile const * const lay,
+ std::list<std::string> const & removedModules);