X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FModuleList.h;h=c9a6f1f4d7effbf8068206bd2fd281b02621de60;hb=aee4e7ba34d87f609ea50327449b3eb67731561a;hp=d79138f213196121683b8d77192955e1e7970f2e;hpb=ea0501025e880514787d2148d58d49caa7859eaf;p=lyx.git diff --git a/src/ModuleList.h b/src/ModuleList.h index d79138f213..c9a6f1f4d7 100644 --- a/src/ModuleList.h +++ b/src/ModuleList.h @@ -57,7 +57,7 @@ public: std::vector const & excludes, std::string const & catgy); /// whether the required packages are available - bool isAvailable(); + bool isAvailable() const; /// std::string const & getName() const { return name_; } /// @@ -102,10 +102,12 @@ private: std::vector excluded_modules_; /// Category, also used in the UI std::string category_; + // these are mutable because they are used to cache the results + // or an otherwise const operation. /// - bool checked_; + mutable bool checked_; /// - bool available_; + mutable bool available_; }; typedef std::vector LyXModuleList; @@ -132,8 +134,10 @@ public: bool empty() const { return modlist_.empty(); } /// 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: + private: /// noncopyable ModuleList(ModuleList const &); ///