3 #include "math_macrotable.h"
4 #include "math_macro.h"
5 #include "math_macrotemplate.h"
6 #include "math_parser.h"
7 #include "math_mathmlstream.h"
9 #include "math_support.h" // math_font_available
16 MathMacroTable::table_type MathMacroTable::macro_table;
19 void MathMacroTable::dump()
22 lyxerr << "\n------------------------------------------" << endl;
23 table_type::const_iterator it;
24 for (it = macro_table.begin(); it != macro_table.end(); ++it)
26 << " [" << it->second->asMacroTemplate()->nargs() << "] : "
27 << it->second->cell(0) << endl;
28 lyxerr << "------------------------------------------" << endl;
33 MathAtom & MathMacroTable::provide(string const & name)
35 table_type::iterator pos = macro_table.find(name);
36 if (pos == macro_table.end()) {
37 lyxerr << "MathMacroTable::provideTemplate: no template with name '"
38 << name << "' available." << endl;
44 void MathMacroTable::create(MathAtom const & at)
46 macro_table[at->asMacroTemplate()->name()] = at;
50 bool MathMacroTable::has(string const & name)
52 return macro_table.find(name) != macro_table.end();