]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_macrotable.h
fix pullArg when pressing <Delete> at the end of an cell
[lyx.git] / src / mathed / math_macrotable.h
index cbf848659ac907754a476e87878be969bfe64a07..3d3241640f12d751a0b0f4be1d084d4cba4d4dbf 100644 (file)
@@ -1,40 +1,40 @@
 // -*- C++ -*-
-#ifndef MATHMACROTABLE
-#define MATHMACROTABLE
+#ifndef MATH_MACROTABLE_H
+#define MATH_MACROTABLE_H
 
 #include <map>
 #include "LString.h"
 
-#include <boost/utility.hpp>
-#include <boost/smart_ptr.hpp>
-
 #ifdef __GNUG__
 #pragma interface
 #endif
 
-class MathMacroTemplate;
+
 class MathMacro;
+class MathMacroTemplate;
 
 ///
-class MathMacroTable : noncopyable {
+struct MathMacroTable {
 public:
        ///
-       void addTemplate(boost::shared_ptr<MathMacroTemplate> const &);
+       static void updateTemplate(MathMacroTemplate *);
        ///
-       MathMacro * createMacro(string const &) const;
+       static void insertTemplate(MathMacroTemplate *);
        ///
-       boost::shared_ptr<MathMacroTemplate> const
-       getTemplate(string const &) const;
+       static MathMacroTemplate & provideTemplate(string const &);
        ///
-       void builtinMacros();
+       static bool hasTemplate(string const &);
        ///
-       static MathMacroTable mathMTable;
-       ///
-       static bool built;
+       static MathMacro * cloneTemplate(string const &);
 private:
        ///
-       typedef std::map<string, boost::shared_ptr<MathMacroTemplate> > table_type;
+       static void builtinMacros();
+       ///
+       typedef std::map<string, MathMacroTemplate *> table_type;
+       //
+       static table_type macro_table;
+public:
        ///
-       table_type macro_table;
+       static void dump();
 };
 #endif