]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_macrotable.h
preview as preview can...
[lyx.git] / src / mathed / math_macrotable.h
index 5da3a0940c2d10e3655004e2f3f846035c101e65..ab377190581e041ca6d1fa1f099721c6a36340d0 100644 (file)
@@ -1,40 +1,39 @@
 // -*- 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>
+#include "math_atom.h"
 
 #ifdef __GNUG__
 #pragma interface
 #endif
 
-class MathMacroTemplate;
-class MathMacro;
+class MathArray;
 
 ///
-class MathMacroTable : boost::noncopyable {
+struct MathMacroTable {
 public:
        ///
-       void addTemplate(boost::shared_ptr<MathMacroTemplate> const &);
+       static void create(string const &, int);
        ///
-       MathMacro * createMacro(string const &) const;
+       static void create(string const &, int, MathArray const &, MathArray const &);
        ///
-       boost::shared_ptr<MathMacroTemplate> const
-       getTemplate(string const &) const;
+       static MathAtom & provide(string const &);
        ///
-       void builtinMacros();
+       static bool has(string const &);
        ///
-       static MathMacroTable mathMTable;
+       static void builtinMacros();
        ///
-       static bool built;
+       static void dump();
 private:
+       /// create internal macros (like \longrightarrow...)
+       static void define(string const & display);
+
        ///
-       typedef std::map<string, boost::shared_ptr<MathMacroTemplate> > table_type;
-       ///
-       table_type macro_table;
+       typedef std::map<string, MathAtom> table_type;
+       //
+       static table_type macro_table;
 };
 #endif