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.
16 #include "support/FileName.h"
18 #include <boost/noncopyable.hpp>
25 * This struct represents a particular LyX "module", which is a like a layout
26 * file, except that it does not stand alone. In that sense, it is more like
27 * a LaTeX package, where a layout file corresponds to a LaTeX class.
30 /// what appears in the ui
32 /// the filename, without any path
34 /// a short description for use in the ui
35 std::string description;
36 /// the LaTeX packages on which this depends, if any (not implemented)
37 std::vector<std::string> packageList;
38 /// whether those packages are available (not implemented yet)
42 typedef std::vector<LyXModule> LyXModuleList;
45 * The ModuleList represents the various LyXModule's that are available at
48 class ModuleList : boost::noncopyable {
50 /// reads the modules from a file generated by configure.py
52 /// add a module to the list
53 void addLayoutModule(std::string name, std::string filename,
54 std::string description,
55 std::vector<std::string> packages);
57 LyXModuleList::const_iterator begin() const;
59 LyXModuleList::iterator begin();
61 LyXModuleList::const_iterator end() const;
63 LyXModuleList::iterator end();
65 bool empty() { return modlist_.empty(); };
66 /// Returns a pointer to the LyXModule with name str.
67 /// Returns a null pointer if no such module is found.
68 LyXModule * operator[](std::string str);
70 std::vector<LyXModule> modlist_;
73 extern ModuleList moduleList;