]> git.lyx.org Git - lyx.git/blob - src/mathed/math_diffinset.C
Always use std::endl with lyxerr
[lyx.git] / src / mathed / math_diffinset.C
1 #include <config.h>
2
3 #include "math_diffinset.h"
4 #include "math_support.h"
5 #include "math_mathmlstream.h"
6 #include "math_symbolinset.h"
7 #include "debug.h"
8
9 using std::auto_ptr;
10 using std::endl;
11
12
13 MathDiffInset::MathDiffInset()
14         : MathNestInset(1)
15 {}
16
17
18 auto_ptr<InsetBase> MathDiffInset::clone() const
19 {
20         return auto_ptr<InsetBase>(new MathDiffInset(*this));
21 }
22
23
24 void MathDiffInset::addDer(MathArray const & der)
25 {
26         cells_.push_back(der);
27 }
28
29
30 void MathDiffInset::normalize(NormalStream & os) const
31 {
32         os << "[diff";
33         for (idx_type idx = 0; idx < nargs(); ++idx)
34                 os << ' ' << cell(idx);
35         os << ']';
36 }
37
38
39 void MathDiffInset::metrics(MetricsInfo &, Dimension &) const
40 {
41         lyxerr << "should not happen" << endl;
42 }
43
44
45 void MathDiffInset::draw(PainterInfo &, int, int) const
46 {
47         lyxerr << "should not happen" << endl;
48 }
49
50
51 void MathDiffInset::maple(MapleStream & os) const
52 {
53         os << "diff(";
54         for (idx_type idx = 0; idx < nargs(); ++idx) {
55                 if (idx != 0)
56                         os << ',';
57                 os << cell(idx);
58         }
59         os << ')';
60 }
61
62
63 void MathDiffInset::mathematica(MathematicaStream & os) const
64 {
65         os << "Dt[";
66         for (idx_type idx = 0; idx < nargs(); ++idx) {
67                 if (idx != 0)
68                         os << ',';
69                 os << cell(idx);
70         }
71         os << ']';
72 }
73
74
75 void MathDiffInset::mathmlize(MathMLStream & os) const
76 {
77         os << "diff(";
78         for (idx_type idx = 0; idx < nargs(); ++idx) {
79                 if (idx != 0)
80                         os << ',';
81                 os << cell(idx);
82         }
83         os << ')';
84 }
85
86
87 void MathDiffInset::write(WriteStream &) const
88 {
89         lyxerr << "should not happen" << endl;
90 }