]> git.lyx.org Git - lyx.git/blob - src/mathed/math_liminset.C
the clone auto_ptr patch
[lyx.git] / src / mathed / math_liminset.C
1 #include "math_liminset.h"
2 #include "math_support.h"
3 #include "math_mathmlstream.h"
4 #include "math_symbolinset.h"
5 #include "debug.h"
6
7 using std::auto_ptr;
8
9
10 MathLimInset::MathLimInset
11         (MathArray const & f, MathArray const & x, MathArray const & x0)
12         : MathNestInset(3)
13 {
14         cell(0) = f;
15         cell(1) = x;
16         cell(2) = x0;
17 }
18
19
20 auto_ptr<InsetBase> MathLimInset::clone() const
21 {
22         return auto_ptr<InsetBase>(new MathLimInset(*this));
23 }
24
25
26 void MathLimInset::normalize(NormalStream & os) const
27 {
28         os << "[lim " << cell(0) << ' ' << cell(1) << ' ' << cell(2) << ']';
29 }
30
31
32 void MathLimInset::metrics(MetricsInfo &, Dimension &) const
33 {
34         lyxerr << "should not happen\n";
35 }
36
37
38 void MathLimInset::draw(PainterInfo &, int, int) const
39 {
40         lyxerr << "should not happen\n";
41 }
42
43
44 void MathLimInset::maple(MapleStream & os) const
45 {
46         os << "limit(" << cell(0) << ',' << cell(1) << '=' << cell(2) << ')';
47 }
48
49
50 void MathLimInset::mathematica(MathematicaStream & os) const
51 {
52         os << "Lim[" << cell(0) << ',' << cell(1) << ',' << cell(2) << ']';
53 }
54
55
56 void MathLimInset::mathmlize(MathMLStream & os) const
57 {
58         os << "lim(" << cell(0) << ',' << cell(1) << ',' << cell(2) << ')';
59 }
60
61
62 void MathLimInset::write(WriteStream &) const
63 {
64         lyxerr << "should not happen\n";
65 }