]> git.lyx.org Git - lyx.git/blob - src/mathed/math_diffinset.C
Strip out redundant #includes
[lyx.git] / src / mathed / math_diffinset.C
1 /**
2  * \file math_diffinset.C
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author André Pönitz
7  *
8  * Full author contact details are available in file CREDITS.
9  */
10
11 #include <config.h>
12
13 #include "math_diffinset.h"
14 #include "math_mathmlstream.h"
15 #include "debug.h"
16
17 using std::auto_ptr;
18 using std::endl;
19
20
21 MathDiffInset::MathDiffInset()
22         : MathNestInset(1)
23 {}
24
25
26 auto_ptr<InsetBase> MathDiffInset::clone() const
27 {
28         return auto_ptr<InsetBase>(new MathDiffInset(*this));
29 }
30
31
32 void MathDiffInset::addDer(MathArray const & der)
33 {
34         cells_.push_back(der);
35 }
36
37
38 void MathDiffInset::normalize(NormalStream & os) const
39 {
40         os << "[diff";
41         for (idx_type idx = 0; idx < nargs(); ++idx)
42                 os << ' ' << cell(idx);
43         os << ']';
44 }
45
46
47 void MathDiffInset::metrics(MetricsInfo &, Dimension &) const
48 {
49         lyxerr << "should not happen" << endl;
50 }
51
52
53 void MathDiffInset::draw(PainterInfo &, int, int) const
54 {
55         lyxerr << "should not happen" << endl;
56 }
57
58
59 void MathDiffInset::maple(MapleStream & os) const
60 {
61         os << "diff(";
62         for (idx_type idx = 0; idx < nargs(); ++idx) {
63                 if (idx != 0)
64                         os << ',';
65                 os << cell(idx);
66         }
67         os << ')';
68 }
69
70
71 void MathDiffInset::mathematica(MathematicaStream & os) const
72 {
73         os << "Dt[";
74         for (idx_type idx = 0; idx < nargs(); ++idx) {
75                 if (idx != 0)
76                         os << ',';
77                 os << cell(idx);
78         }
79         os << ']';
80 }
81
82
83 void MathDiffInset::mathmlize(MathMLStream & os) const
84 {
85         os << "diff(";
86         for (idx_type idx = 0; idx < nargs(); ++idx) {
87                 if (idx != 0)
88                         os << ',';
89                 os << cell(idx);
90         }
91         os << ')';
92 }
93
94
95 void MathDiffInset::write(WriteStream &) const
96 {
97         lyxerr << "should not happen" << endl;
98 }