From d9c3e3e8a97210eb433a58ea65aa10017f6e29c6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20P=C3=B6nitz?= Date: Mon, 13 Aug 2001 14:19:16 +0000 Subject: [PATCH] forgotten files again... git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2502 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/math_factory.C | 48 +++++++++++++++++++++++++++++++++++++++ src/mathed/math_factory.h | 9 ++++++++ 2 files changed, 57 insertions(+) create mode 100644 src/mathed/math_factory.C create mode 100644 src/mathed/math_factory.h diff --git a/src/mathed/math_factory.C b/src/mathed/math_factory.C new file mode 100644 index 0000000000..ae776ade0e --- /dev/null +++ b/src/mathed/math_factory.C @@ -0,0 +1,48 @@ +#include + +#include "math_parser.h" +#include "math_bigopinset.h" +#include "math_decorationinset.h" +#include "math_dotsinset.h" +#include "math_funcinset.h" +#include "math_funcliminset.h" +#include "math_fracinset.h" +#include "math_macro.h" +#include "math_macrotable.h" +#include "math_noglyphinset.h" +#include "math_rootinset.h" +#include "math_spaceinset.h" +#include "math_sqrtinset.h" +#include "math_symbolinset.h" +#include "math_stackrelinset.h" + + +MathInset * createMathInset(latexkeys const * l) +{ + switch (l->token) { + case LM_TK_NOGLYPH: + case LM_TK_NOGLYPHB: + return new MathNoglyphInset(l); + case LM_TK_BIGSYM: + return new MathBigopInset(l); + case LM_TK_FUNCLIM: + return new MathFuncLimInset(l); + case LM_TK_SYM: + return new MathSymbolInset(l); + case LM_TK_STACK: + return new MathStackrelInset; + case LM_TK_FRAC: + return new MathFracInset; + case LM_TK_SQRT: + return new MathSqrtInset; + case LM_TK_ROOT: + return new MathRootInset; + case LM_TK_DECORATION: + return new MathDecorationInset(l); + case LM_TK_SPACE: + return new MathSpaceInset(l->id); + case LM_TK_DOTS: + return new MathDotsInset(l); + } + return new MathFuncInset(l->name); +} diff --git a/src/mathed/math_factory.h b/src/mathed/math_factory.h new file mode 100644 index 0000000000..8ed810fd04 --- /dev/null +++ b/src/mathed/math_factory.h @@ -0,0 +1,9 @@ +#ifndef MATH_FACTORY_H +#define MATH_FACTORY_H + +class MathInset; +class latexkeys; + +MathInset * createMathInset(latexkeys const *); + +#endif -- 2.39.2