X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FMathMacroTable.h;h=28d2c289e61f4907951e103c3d1180bfa06740b3;hb=2db7521b7080d63acbcd3bd5bfe892f5a414b2b0;hp=cf8719583ae612bcb9c443ccbd895b1befd72b98;hpb=3b91a07daa8282dde3d860adf5bb932133d0b43d;p=features.git diff --git a/src/mathed/MathMacroTable.h b/src/mathed/MathMacroTable.h index cf8719583a..28d2c289e6 100644 --- a/src/mathed/MathMacroTable.h +++ b/src/mathed/MathMacroTable.h @@ -28,7 +28,7 @@ public: /// MacroData(); /// - MacroData(docstring const & def, int nargs, docstring const & disp); + MacroData(docstring const & def, int nargs, docstring const & disp, std::string const &); /// docstring def() const { return def_; } /// @@ -37,6 +37,10 @@ public: int numargs() const { return numargs_; } /// replace #1,#2,... by given MathAtom 0,1,.. void expand(std::vector const & from, MathArray & to) const; + /// + std::string requires() const { return requires_; } + /// + std::string & requires() { return requires_; } private: /// @@ -45,6 +49,8 @@ private: int numargs_; /// docstring disp_; + /// + std::string requires_; }; @@ -55,8 +61,8 @@ private: class MacroTable : public std::map { public: - /// Parse full "\def..." or "\newcommand..." or ... - void insert(docstring const & definition); + /// Parse full "\\def..." or "\\newcommand..." or ... + void insert(docstring const & definition, std::string const &); /// Insert pre-digested macro definition void insert(docstring const & name, MacroData const & data); /// Do we have a macro by that name?