- /**
- * The ModuleList represents the various LyXModule's that are available at
- * present.
- */
- class ModuleList : boost::noncopyable {
- public:
- /// reads the modules from a file generated by configure.py
- bool load();
- /// add a module to the list
- void addLayoutModule(std::string name, std::string filename,
- std::string description);
- ///
- LyXModuleList::const_iterator begin() const;
- ///
- LyXModuleList::iterator begin();
- ///
- LyXModuleList::const_iterator end() const;
- ///
- LyXModuleList::iterator end();
- ///
- bool empty() { return modlist_.empty(); };
- /// Returns a pointer to the LyXModule with name str.
- /// Returns a null pointer if no such module is found.
- LyXModule * operator[](std::string str);
- private:
- std::vector<LyXModule> modlist_;
- };
+private:
+ /// what appears in the ui
+ std::string name;
+ /// the module's unique identifier
+ /// at present, this is the filename, without the extension
+ std::string id;
+ /// the filename
+ std::string filename;
+ /// a short description for use in the ui
+ std::string description;
+ /// the LaTeX packages on which this depends, if any
+ std::vector<std::string> packageList;
+ /// Modules this one requires: at least one
+ std::vector<std::string> requiredModules;
+ /// Modules this one excludes: none of these
+ std::vector<std::string> excludedModules;
+ ///
+ bool checked;
+ ///
+ bool available;
+};
+
+typedef std::vector<LyXModule> LyXModuleList;
+
+/**
+ * The ModuleList represents the various LyXModule's that are available at
+ * present.
+ */
+class ModuleList {
+public:
+ ///
+ ModuleList() {}
+ /// reads the modules from a file generated by configure.py
+ bool load();
+ ///
+ LyXModuleList::const_iterator begin() const;
+ ///
+ LyXModuleList::iterator begin();
+ ///
+ LyXModuleList::const_iterator end() const;
+ ///
+ LyXModuleList::iterator end();
+ ///
+ bool empty() const { return modlist_.empty(); }
+ /// Returns a pointer to the LyXModule with name str.
+ /// Returns a null pointer if no such module is found.
+ LyXModule * getModuleByName(std::string const & str);
+ /// Returns a pointer to the LyXModule with filename str.
+ /// Returns a null pointer if no such module is found.
+ LyXModule * operator[](std::string const & str);
+ private:
+ /// noncopyable
+ ModuleList(ModuleList const &);
+ ///
+ void operator=(ModuleList const &);
+ /// add a module to the list
+ void addLayoutModule(std::string const &, std::string const &,
+ std::string const &, std::vector<std::string> const &,
+ std::vector<std::string> const &, std::vector<std::string> const &);
+ ///
+ std::vector<LyXModule> modlist_;
+};