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 & i
,
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 & getID() const { return id
; }
42 std::string
const & getFilename() const { return filename
; }
44 std::string
const & getDescription() const { return description
; }
46 std::vector
<std::string
> const & getPackageList() const
47 { return packageList
; }
49 std::vector
<std::string
> const & getRequiredModules() const
50 { return requiredModules
; }
51 /// Modules this one excludes: the list should be treated disjunctively
52 std::vector
<std::string
> const & getExcludedModules() const
53 { return excludedModules
; }
56 /// what appears in the ui
58 /// the module's unique identifier
59 /// at present, this is the filename, without the extension
63 /// a short description for use in the ui
64 std::string description
;
65 /// the LaTeX packages on which this depends, if any
66 std::vector
<std::string
> packageList
;
67 /// Modules this one requires: at least one
68 std::vector
<std::string
> requiredModules
;
69 /// Modules this one excludes: none of these
70 std::vector
<std::string
> excludedModules
;
77 typedef std::vector
<LyXModule
> LyXModuleList
;
80 * The ModuleList represents the various LyXModule's that are available at
87 /// reads the modules from a file generated by configure.py
90 LyXModuleList::const_iterator
begin() const;
92 LyXModuleList::iterator
begin();
94 LyXModuleList::const_iterator
end() const;
96 LyXModuleList::iterator
end();
98 bool empty() const { return modlist_
.empty(); }
99 /// Returns a pointer to the LyXModule with name str.
100 /// Returns a null pointer if no such module is found.
101 LyXModule
* getModuleByName(std::string
const & str
);
102 /// Returns a pointer to the LyXModule with filename str.
103 /// Returns a null pointer if no such module is found.
104 LyXModule
* operator[](std::string
const & str
);
107 ModuleList(ModuleList
const &);
109 void operator=(ModuleList
const &);
110 /// add a module to the list
111 void addLayoutModule(std::string
const &, std::string
const &,
112 std::string
const &, std::vector
<std::string
> const &,
113 std::vector
<std::string
> const &, std::vector
<std::string
> const &);
115 std::vector
<LyXModule
> modlist_
;
118 extern ModuleList moduleList
;