]> git.lyx.org Git - lyx.git/blobdiff - src/ModuleList.h
InsetHyperlink.cpp: fix a bug I introduced in r26218
[lyx.git] / src / ModuleList.h
index e0e52f72ee572408ca32f3f372afe493d344ad58..804cce1dea52a6c2563767316f1906e3f77f24b9 100644 (file)
@@ -28,7 +28,7 @@ namespace lyx {
 class LyXModule {
 public:
        ///
-       LyXModule(std::string const & n, std::string const & f
+       LyXModule(std::string const & n, std::string const & i
                  std::string const & d, std::vector<std::string> const & p,
                  std::vector<std::string> const & r, 
                  std::vector<std::string> const & e);
@@ -37,6 +37,8 @@ public:
        ///
        std::string const & getName() const { return name; }
        ///
+       std::string const & getID() const { return id; }
+       ///
        std::string const & getFilename() const { return filename; }
        ///
        std::string const & getDescription() const { return description; }
@@ -53,11 +55,14 @@ public:
 private:
        /// what appears in the ui
        std::string name;
-       /// the filename, without any path
+       /// the module's unique identifier
+       /// at present, this is the filename, without the extension
+       std::string id;
+       /// the filename
        std::string filename;
        /// a short description for use in the ui
        std::string description;
-       /// the LaTeX packages on which this depends, if any (not implemented)
+       /// the LaTeX packages on which this depends, if any
        std::vector<std::string> packageList;
        /// Modules this one requires: at least one
        std::vector<std::string> requiredModules;
@@ -93,8 +98,11 @@ public:
        bool empty() const { return modlist_.empty(); }
        /// Returns a pointer to the LyXModule with name str.
        /// Returns a null pointer if no such module is found.
+       LyXModule * getModuleByName(std::string const & str);
+       /// Returns a pointer to the LyXModule with filename str.
+       /// Returns a null pointer if no such module is found.
        LyXModule * operator[](std::string const & str);
-private:
+       private:
        /// noncopyable
        ModuleList(ModuleList const &);
        ///