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