4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
9 * Full author contact details are available in file CREDITS.
22 * This struct represents a particular LyX "module", which is a like a layout
23 * file, except that it does not stand alone. In that sense, it is more like
24 * a LaTeX package, where a layout file corresponds to a LaTeX class.
27 //FIXME Give us some access functions here.
31 LyXModule(std::string const & n, std::string const & f,
32 std::string const & d, std::vector<std::string> const & p);
33 /// whether the required packages are available
35 /// what appears in the ui
37 /// the filename, without any path
39 /// a short description for use in the ui
40 std::string description;
41 /// the LaTeX packages on which this depends, if any (not implemented)
42 std::vector<std::string> packageList;
50 typedef std::vector<LyXModule> LyXModuleList;
53 * The ModuleList represents the various LyXModule's that are available at
60 /// reads the modules from a file generated by configure.py
62 /// add a module to the list
63 void addLayoutModule(std::string const & name,
64 std::string const & filename, std::string const & description,
65 std::vector<std::string> const & packages);
67 LyXModuleList::const_iterator begin() const;
69 LyXModuleList::iterator begin();
71 LyXModuleList::const_iterator end() const;
73 LyXModuleList::iterator end();
75 bool empty() const { return modlist_.empty(); }
76 /// Returns a pointer to the LyXModule with name str.
77 /// Returns a null pointer if no such module is found.
78 LyXModule * operator[](std::string const & str);
81 ModuleList(ModuleList const &);
82 void operator=(ModuleList const &);
85 std::vector<LyXModule> modlist_;
88 extern ModuleList moduleList;