X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FLayoutModuleList.h;h=f5741dede1657d6c3d016d01dd3f2222c28d1d47;hb=4cfc110d4aeb28c4d570ec47ab1607ad7672e792;hp=d2a3efc181f28a38a16273e194086d3bba54d1d4;hpb=f946b6ed0bb582d0d8cd2775459ea2c001bfca47;p=lyx.git diff --git a/src/LayoutModuleList.h b/src/LayoutModuleList.h index d2a3efc181..f5741dede1 100644 --- a/src/LayoutModuleList.h +++ b/src/LayoutModuleList.h @@ -19,6 +19,12 @@ namespace lyx { class LayoutFile; +/** + Represents a list of modules, such as might be associated with + a particular document. Provides methods for adding modules, checking + if a module can be added, and, importantly, adapting the list to a + new DocumentClass. +*/ class LayoutModuleList { public: /// @@ -51,7 +57,10 @@ public: std::list const & list() const { return lml_; } /// 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, + 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 @@ -65,7 +74,7 @@ public: /// \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 removedModules); + std::list const & removedModules); private: /// Removes modules excluded by, provided by, etc, the base class. /// \param lay The document class against which to check.