]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_macrotable.h
Add In nsetOld * argument to updateInset to rebreak the correct par.
[lyx.git] / src / mathed / math_macrotable.h
index 1814e3a1aa69a2e145974a80e1eaccf6b719ce0b..8a6b191e4e1602ab336af568dc7e29555905c601 100644 (file)
@@ -1,34 +1,37 @@
 // -*- C++ -*-
-#ifndef MATHMACROTABLE
-#define MATHMACROTABLE
+/**
+ * \file math_macrotable.h
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ * \author André Pönitz
+ *
+ * Full author contact details are available in file CREDITS.
+ */
 
-#include <vector>
+#ifndef MATH_MACROTABLE_H
+#define MATH_MACROTABLE_H
+
+#include <map>
 #include "LString.h"
+#include "math_atom.h"
 
-class MathMacroTemplate;
-class MathMacro;
 
-///
 class MathMacroTable {
 public:
-    ///
-    void addTemplate(MathMacroTemplate *);
-    ///
-    MathMacro * getMacro(string const &) const;
-    ///
-    MathMacroTemplate * getTemplate(string const &) const;
-    ///
-    void builtinMacros();
-    ///
-    static MathMacroTable mathMTable;
-    ///
-    static bool built;
+       ///
+       static void create(MathAtom const &);
+       ///
+       static MathAtom & provide(string const & name);
+       ///
+       static bool has(string const & name);
+       ///
+       static void dump();
 private:
-    ///
-    typedef std::vector<MathMacroTemplate *> table_type;
-    ///
-    typedef table_type::size_type size_type;
-    ///
-    table_type macro_table;
+       ///
+       typedef std::map<string, MathAtom> table_type;
+       //
+       static table_type macro_table;
 };
+
 #endif