X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FCmdDef.h;h=5fb6e366b6d3d9347ea2c923060339462eee2de0;hb=bf2bf2eaedadf39a6398db624c8b6c52099ca31d;hp=9ef25fa5fe9168f445f708c94a47acba80c59df0;hpb=f914298c49d7fafd4a2fe48b04a0460d0e41527c;p=lyx.git diff --git a/src/CmdDef.h b/src/CmdDef.h index 9ef25fa5fe..5fb6e366b6 100644 --- a/src/CmdDef.h +++ b/src/CmdDef.h @@ -14,31 +14,20 @@ #include "FuncRequest.h" -#include "support/docstream.h" - -#include +#include "support/strfwd.h" #include - +#include namespace lyx { /// Creates command definitions class CmdDef { private: - /// information for a definition - struct CmdDefInfo { - CmdDefInfo(FuncRequest const & f): func(f), locked(false) {} - /// the expanded FuncRequest - FuncRequest func; - /// to avoid recursive calls - bool locked; - }; - - /// type for map between a macro name and its info - typedef std::map > CmdDefMap; - + typedef std::map CmdDefMap; + /// type for a set containing all locked definitions + typedef std::set LockSet; public: /// Parse a def file @@ -70,11 +59,13 @@ private: * Add a new command definition. * @param name internal recursion level */ - newCmdDefResult newCmdDef(std::string const & name, - std::string const & def); + newCmdDefResult newCmdDef(std::string const & name, + std::string const & def); /// CmdDefMap cmdDefMap; + /// + LockSet lockSet; }; /// Implementation is in LyX.cpp