]> git.lyx.org Git - lyx.git/blobdiff - src/ModuleList.h
Initialize biblioChanged_ when we update the document settings dialog.
[lyx.git] / src / ModuleList.h
index 7ff5e19b88aceefdadd56b994d0cdea29cf78cd1..d3abef913a5450830365451e6f71c1f5697ed099 100644 (file)
@@ -57,7 +57,9 @@ public:
                  std::vector<std::string> const & excludes,
                  std::string const & catgy);
        /// whether the required packages are available
-       bool isAvailable();
+       bool isAvailable() const;
+       /// the missing prerequisites, if any
+       std::vector<std::string> prerequisites() const;
        ///
        std::string const & getName() const { return name_; }
        ///
@@ -102,10 +104,14 @@ private:
        std::vector<std::string> 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_;
+       ///
+       mutable std::vector<std::string> prerequisites_;
 };
 
 typedef std::vector<LyXModule> LyXModuleList;
@@ -132,8 +138,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 &);
        ///
@@ -147,6 +155,6 @@ private:
        std::vector<LyXModule> modlist_;
 };
 
-extern ModuleList moduleList;
+extern ModuleList theModuleList;
 }
 #endif