2001-02-13 17:08:51 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
#ifndef MATHMACROTABLE
|
|
|
|
#define MATHMACROTABLE
|
|
|
|
|
2001-03-01 14:07:43 +00:00
|
|
|
#include <map>
|
2001-02-13 17:08:51 +00:00
|
|
|
#include "LString.h"
|
|
|
|
|
2001-03-01 14:07:43 +00:00
|
|
|
#include <boost/utility.hpp>
|
|
|
|
#include <boost/smart_ptr.hpp>
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
2001-02-13 17:08:51 +00:00
|
|
|
class MathMacroTemplate;
|
|
|
|
class MathMacro;
|
|
|
|
|
|
|
|
///
|
2001-03-15 16:04:46 +00:00
|
|
|
class MathMacroTable : boost::noncopyable {
|
2001-02-13 17:08:51 +00:00
|
|
|
public:
|
2001-03-01 14:07:43 +00:00
|
|
|
///
|
|
|
|
void addTemplate(boost::shared_ptr<MathMacroTemplate> const &);
|
|
|
|
///
|
|
|
|
MathMacro * createMacro(string const &) const;
|
|
|
|
///
|
|
|
|
boost::shared_ptr<MathMacroTemplate> const
|
|
|
|
getTemplate(string const &) const;
|
|
|
|
///
|
|
|
|
void builtinMacros();
|
|
|
|
///
|
|
|
|
static MathMacroTable mathMTable;
|
|
|
|
///
|
|
|
|
static bool built;
|
2001-02-13 17:08:51 +00:00
|
|
|
private:
|
2001-03-01 14:07:43 +00:00
|
|
|
///
|
|
|
|
typedef std::map<string, boost::shared_ptr<MathMacroTemplate> > table_type;
|
|
|
|
///
|
|
|
|
table_type macro_table;
|
2001-02-13 17:08:51 +00:00
|
|
|
};
|
|
|
|
#endif
|