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.
15 #include "support/FileName.h"
24 * This struct represents a particular LyX "module", which is a like a layout
25 * file, except that it does not stand alone. In that sense, it is more like
26 * a LaTeX package, where a layout file corresponds to a LaTeX class.
29 /// what appears in the ui
31 /// the filename, without any path
33 /// a short description for use in the ui
34 std::string description;
35 /// the LaTeX packages on which this depends, if any (not implemented)
36 std::vector<std::string> packageList;
37 /// whether those packages are available (not implemented yet)
41 typedef std::vector<LyXModule> LyXModuleList;
44 * The ModuleList represents the various LyXModule's that are available at
51 /// reads the modules from a file generated by configure.py
53 /// add a module to the list
54 void addLayoutModule(std::string const & name,
55 std::string const & filename, std::string const & description,
56 std::vector<std::string> const & packages);
58 LyXModuleList::const_iterator begin() const;
60 LyXModuleList::iterator begin();
62 LyXModuleList::const_iterator end() const;
64 LyXModuleList::iterator end();
66 bool empty() const { return modlist_.empty(); }
67 /// Returns a pointer to the LyXModule with name str.
68 /// Returns a null pointer if no such module is found.
69 LyXModule * operator[](std::string const & str);
72 ModuleList(ModuleList const &);
73 void operator=(ModuleList const &);
76 std::vector<LyXModule> modlist_;
79 extern ModuleList moduleList;