]> git.lyx.org Git - lyx.git/blobdiff - src/ModuleList.h
* Call metrics of the parameters with the correct font in MathMacros, for example
[lyx.git] / src / ModuleList.h
index 2281a5d74c48c8d9e3ec2aef34880e4389d69a92..0ef152c06962ec2ee39a27169eb464e3010be936 100644 (file)
@@ -24,11 +24,10 @@ namespace lyx {
  *  a LaTeX package, where a layout file corresponds to a LaTeX class.
  */
 
-//FIXME Give us some access functions here.
 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 +36,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; }
@@ -49,11 +50,20 @@ public:
        /// Modules this one excludes: the list should be treated disjunctively
        std::vector<std::string> const & getExcludedModules() const 
                { return excludedModules; }
-       
+       /// \return true if the module is compatible with this one, i.e.,
+       /// it does not exclude us and we do not exclude it.
+       /// this will also return true if modName is unknown and we do not
+       /// exclude it, since in that case we cannot check its exclusions.
+       bool isCompatible(std::string const & modName) const;
+       ///
+       static bool areCompatible(std::string const & mod1, std::string const & mod2);
 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;
@@ -91,7 +101,7 @@ public:
        LyXModuleList::iterator end();
        ///
        bool empty() const { return modlist_.empty(); }
-       /// Returns a pointer to the LyXModule with name 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: