]> git.lyx.org Git - lyx.git/blobdiff - src/CmdDef.h
Rename the minted 'lang' external template option as 'language'
[lyx.git] / src / CmdDef.h
index de6ad5bd480a7c66479cedeed030a32aad953d7d..fa24fe76152121925f4490e15a23a6824053d9d8 100644 (file)
 
 #include "FuncRequest.h"
 
-#include "support/docstream.h"
+#include "support/strfwd.h"
 
-#include <boost/shared_ptr.hpp>
-
-#include <vector>
-#include <deque>
 #include <map>
-
+#include <set>
 
 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<std::string, boost::shared_ptr<CmdDefInfo> > CmdDefMap;
-
+       typedef std::map<std::string, FuncRequest> CmdDefMap;
+       /// type for a set containing all locked definitions
+       typedef std::set<std::string> LockSet;
 public:
 
        /// Parse a def file
@@ -73,10 +60,12 @@ private:
         * @param name internal recursion level
         */
        newCmdDefResult newCmdDef(std::string const & name, 
-               std::string const & def);
+                                     std::string const & def);
 
        ///
        CmdDefMap cmdDefMap;
+       ///
+       LockSet lockSet;
 };
 
 /// Implementation is in LyX.cpp