// -*- C++ -*-
-#ifndef MATHMACROTABLE
-#define MATHMACROTABLE
+#ifndef MATH_MACROTABLE_H
+#define MATH_MACROTABLE_H
#include <map>
#include "LString.h"
+#include "math_atom.h"
-#include <boost/utility.hpp>
-#include <boost/smart_ptr.hpp>
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-class MathMacroTemplate;
-class MathMacro;
///
-class MathMacroTable : noncopyable {
+class MathMacroTable {
public:
///
- void addTemplate(boost::shared_ptr<MathMacroTemplate> const &);
- ///
- MathMacro * createMacro(string const &) const;
+ static void create(MathAtom const &);
///
- boost::shared_ptr<MathMacroTemplate> const
- getTemplate(string const &) const;
+ static MathAtom & provide(string const & name);
///
- void builtinMacros();
+ static bool has(string const & name);
///
- static MathMacroTable mathMTable;
- ///
- static bool built;
+ static void dump();
private:
///
- 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