X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FModuleList.h;h=9f6434ef81955b665ae698b665ec0edaaa7591d4;hb=f16b2cab75752e7b0fbec5520e231b068eb29072;hp=c9a6f1f4d7effbf8068206bd2fd281b02621de60;hpb=56146a93460bd4c56eaecc459ccd36aa0313ff9b;p=lyx.git diff --git a/src/ModuleList.h b/src/ModuleList.h index c9a6f1f4d7..9f6434ef81 100644 --- a/src/ModuleList.h +++ b/src/ModuleList.h @@ -12,19 +12,18 @@ #ifndef MODULELIST_H #define MODULELIST_H -#include #include #include namespace lyx { - + /** * This class represents a particular LyX "module", which is a like a layout - * file, except that it does not stand alone. In that sense, it is more like - * a LaTeX package, where a layout file corresponds to a LaTeX class. Or, in + * file, except that it does not stand alone. In that sense, it is more like + * a LaTeX package, where a layout file corresponds to a LaTeX class. Or, in * LyX's own terms, a module is more like an included file that can be used * with various document classes. The difference is that using a module only - * means selecting it in the Document>Settings dialog, whereas including a + * means selecting it in the Document>Settings dialog, whereas including a * layout file means layout file editing. * * In general, a given module can be used with any document class. That said, @@ -39,7 +38,7 @@ namespace lyx { * #Excludes: theorems-chap * #Category: theorems * The description is used in the gui to give information to the user. The - * Requires, Excludes, and Categofy lines are read by the configuration script + * Requires, Excludes, and Category lines are read by the configuration script * and written to a file lyxmodules.lst in the user configuration directory. * That file is then read on startup to populate the ModuleList, below. * @@ -50,14 +49,16 @@ namespace lyx { class LyXModule { public: /// - LyXModule(std::string const & name, std::string const & id, - std::string const & description, + LyXModule(std::string const & name, std::string const & id, + std::string const & description, std::vector const & packagelist, - std::vector const & requires, + std::vector const & requires, std::vector const & excludes, std::string const & catgy); /// whether the required packages are available bool isAvailable() const; + /// the missing prerequisites, if any + std::vector prerequisites() const; /// std::string const & getName() const { return name_; } /// @@ -70,10 +71,10 @@ public: std::vector const & getPackageList() const { return package_list_; } /// - std::vector const & getRequiredModules() const + std::vector const & getRequiredModules() const { return required_modules_; } /// Modules this one excludes: the list should be treated disjunctively - std::vector const & getExcludedModules() const + std::vector const & getExcludedModules() const { return excluded_modules_; } /// std::string category() const { return category_; } @@ -108,6 +109,8 @@ private: mutable bool checked_; /// mutable bool available_; + /// + mutable std::vector prerequisites_; }; typedef std::vector LyXModuleList; @@ -135,7 +138,7 @@ public: /// Returns a pointer to the LyXModule with filename str. /// Returns a null pointer if no such module is found. LyXModule const * operator[](std::string const & str) const; - /// + /// LyXModule * operator[](std::string const & str); private: /// noncopyable @@ -143,7 +146,7 @@ public: /// void operator=(ModuleList const &); /// add a module to the list - void addLayoutModule(std::string const &, std::string const &, + void addLayoutModule(std::string const &, std::string const &, std::string const &, std::vector const &, std::vector const &, std::vector const &, std::string const &);