]> git.lyx.org Git - lyx.git/blob - src/mathed/math_macrotable.h
move ownership of the templates from the formulamacro
[lyx.git] / src / mathed / math_macrotable.h
1 // -*- C++ -*-
2 #ifndef MATH_MACROTABLE_H
3 #define MATH_MACROTABLE_H
4
5 #include <map>
6 #include "LString.h"
7 #include "math_macrotemplate.h"
8
9 #ifdef __GNUG__
10 #pragma interface
11 #endif
12
13
14 class MathMacro;
15
16
17 ///
18 struct MathMacroTable {
19 public:
20         ///
21         static void insertTemplate(MathMacroTemplate const &);
22         ///
23         static MathMacroTemplate & provideTemplate(string const &);
24         ///
25         static bool hasTemplate(string const &);
26         ///
27         static MathMacro * cloneTemplate(string const &);
28         ///
29         static void createTemplate(string const &, int, string const &);
30         ///
31         static void builtinMacros();
32 private:
33         ///
34         typedef std::map<string, MathMacroTemplate> table_type;
35         //
36         static table_type macro_table;
37 public:
38         ///
39         static void dump();
40 };
41 #endif