2001-02-13 17:08:51 +00:00
|
|
|
// -*- C++ -*-
|
2001-06-25 00:06:33 +00:00
|
|
|
#ifndef MATH_MACROTABLE_H
|
|
|
|
#define MATH_MACROTABLE_H
|
2001-02-13 17:08:51 +00:00
|
|
|
|
2001-03-01 14:07:43 +00:00
|
|
|
#include <map>
|
2001-02-13 17:08:51 +00:00
|
|
|
#include "LString.h"
|
2001-10-12 12:02:49 +00:00
|
|
|
#include "math_atom.h"
|
2001-02-13 17:08:51 +00:00
|
|
|
|
2001-03-01 14:07:43 +00:00
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
2001-10-12 12:02:49 +00:00
|
|
|
class MathArray;
|
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-10-12 12:02:49 +00:00
|
|
|
static void create(string const &, int, string const &);
|
2001-03-01 14:07:43 +00:00
|
|
|
///
|
2001-10-12 12:02:49 +00:00
|
|
|
static void create(string const &, int, MathArray const &);
|
2001-03-01 14:07:43 +00:00
|
|
|
///
|
2001-10-12 12:02:49 +00:00
|
|
|
static MathAtom & provide(string const &);
|
2001-07-26 16:14:23 +00:00
|
|
|
///
|
2001-10-12 12:02:49 +00:00
|
|
|
static bool has(string const &);
|
2001-03-01 14:07:43 +00:00
|
|
|
///
|
2001-04-24 16:13:38 +00:00
|
|
|
static void builtinMacros();
|
2001-07-27 12:32:29 +00:00
|
|
|
private:
|
2001-03-01 14:07:43 +00:00
|
|
|
///
|
2001-10-12 12:02:49 +00:00
|
|
|
typedef std::map<string, MathAtom> table_type;
|
2001-04-24 16:13:38 +00:00
|
|
|
//
|
|
|
|
static table_type macro_table;
|
2001-06-25 00:06:33 +00:00
|
|
|
public:
|
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
|