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
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
2001-04-24 16:13:38 +00:00
|
|
|
|
2001-02-13 17:08:51 +00:00
|
|
|
class MathMacro;
|
2001-04-24 16:13:38 +00:00
|
|
|
class MathMacroTemplate;
|
2001-02-13 17:08:51 +00:00
|
|
|
|
|
|
|
///
|
2001-04-24 16:13:38 +00:00
|
|
|
struct MathMacroTable {
|
2001-02-13 17:08:51 +00:00
|
|
|
public:
|
2001-03-01 14:07:43 +00:00
|
|
|
///
|
2001-04-24 16:13:38 +00:00
|
|
|
static MathMacroTemplate & provideTemplate(string const &, int);
|
2001-03-01 14:07:43 +00:00
|
|
|
///
|
2001-04-24 16:13:38 +00:00
|
|
|
static MathMacroTemplate & provideTemplate(string const &);
|
2001-03-01 14:07:43 +00:00
|
|
|
///
|
2001-04-24 16:13:38 +00:00
|
|
|
static bool hasTemplate(string const &);
|
2001-03-01 14:07:43 +00:00
|
|
|
///
|
2001-04-24 16:13:38 +00:00
|
|
|
static MathMacro * cloneTemplate(string const &);
|
|
|
|
private:
|
2001-03-01 14:07:43 +00:00
|
|
|
///
|
2001-04-24 16:13:38 +00:00
|
|
|
static void builtinMacros();
|
2001-03-01 14:07:43 +00:00
|
|
|
///
|
|
|
|
static bool built;
|
|
|
|
///
|
2001-04-24 16:13:38 +00:00
|
|
|
typedef std::map<string, MathMacroTemplate *> table_type;
|
|
|
|
//
|
|
|
|
static table_type macro_table;
|
2001-03-01 14:07:43 +00:00
|
|
|
///
|
2001-04-24 16:13:38 +00:00
|
|
|
static void dump();
|
2001-02-13 17:08:51 +00:00
|
|
|
};
|
|
|
|
#endif
|