X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FCmdDef.h;h=946730e64e44ffee41b8325c9395fde303369469;hb=233cfed3331e2a8fef39e2dff483dadbf011b772;hp=de6ad5bd480a7c66479cedeed030a32aad953d7d;hpb=1abe2423a011d15df9498485cb22d2ed5d8449e9;p=lyx.git diff --git a/src/CmdDef.h b/src/CmdDef.h index de6ad5bd48..946730e64e 100644 --- a/src/CmdDef.h +++ b/src/CmdDef.h @@ -12,35 +12,22 @@ #ifndef CMDDEF_H #define CMDDEF_H -#include "FuncRequest.h" +#include "support/strfwd.h" -#include "support/docstream.h" - -#include - -#include -#include #include - +#include namespace lyx { +class FuncRequest; + /// 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 @@ -72,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