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 std::vector<std::string> const & r,
34 std::vector<std::string> const & e);
35 /// whether the required packages are available
38 std::string const & getName() const { return name; }
40 std::string const & getFilename() const { return filename; }
42 std::string const & getDescription() const { return description; }
44 std::vector<std::string> const & getPackageList() const
45 { return packageList; }
47 std::vector<std::string> const & getRequiredModules() const
48 { return requiredModules; }
49 /// Modules this one excludes: the list should be treated disjunctively
50 std::vector<std::string> const & getExcludedModules() const
51 { return excludedModules; }
54 /// what appears in the ui
56 /// the filename, without any path
58 /// a short description for use in the ui
59 std::string description;
60 /// the LaTeX packages on which this depends, if any
61 std::vector<std::string> packageList;
62 /// Modules this one requires: at least one
63 std::vector<std::string> requiredModules;
64 /// Modules this one excludes: none of these
65 std::vector<std::string> excludedModules;
72 typedef std::vector<LyXModule> LyXModuleList;
75 * The ModuleList represents the various LyXModule's that are available at
82 /// reads the modules from a file generated by configure.py
85 LyXModuleList::const_iterator begin() const;
87 LyXModuleList::iterator begin();
89 LyXModuleList::const_iterator end() const;
91 LyXModuleList::iterator end();
93 bool empty() const { return modlist_.empty(); }
94 /// Returns a pointer to the LyXModule with name str.
95 /// Returns a null pointer if no such module is found.
96 LyXModule * operator[](std::string const & str);
99 ModuleList(ModuleList const &);
101 void operator=(ModuleList const &);
102 /// add a module to the list
103 void addLayoutModule(std::string const &, std::string const &,
104 std::string const &, std::vector<std::string> const &,
105 std::vector<std::string> const &, std::vector<std::string> const &);
107 std::vector<LyXModule> modlist_;
110 extern ModuleList moduleList;