// -*- 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