X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FModuleList.h;h=804cce1dea52a6c2563767316f1906e3f77f24b9;hb=2f271f61bcd514da3ab5b44d2b7bf61e12ac0c44;hp=2281a5d74c48c8d9e3ec2aef34880e4389d69a92;hpb=d226da15597b3615cb669d6d09d004671efd24ed;p=lyx.git diff --git a/src/ModuleList.h b/src/ModuleList.h index 2281a5d74c..804cce1dea 100644 --- a/src/ModuleList.h +++ b/src/ModuleList.h @@ -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 const & p, std::vector const & r, std::vector 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,7 +55,10 @@ 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; @@ -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 &); ///