]> git.lyx.org Git - lyx.git/blob - src/mathed/math_mathmlstream.h
some support for matrix operations with maple ('M-x math-extern maple evalm')
[lyx.git] / src / mathed / math_mathmlstream.h
1 #ifndef MATH_MATHMLSTREAM_H
2 #define MATH_MATHMLSTREAM_H
3
4 #include <iosfwd>
5 #include "support/LOstream.h"
6
7 struct MathArray;
8 struct MathInset;
9 struct Buffer;
10
11 struct MTag {
12         ///
13         MTag(char const * const tag) : tag_(tag) {}
14         ///
15         char const * const tag_;
16 };
17
18 struct ETag {
19         ///
20         ETag(char const * const tag) : tag_(tag) {}
21         ///
22         char const * const tag_;
23 };
24
25 struct MathMLStream {
26         ///
27         explicit MathMLStream(std::ostream & os);
28         ///
29         MathMLStream & operator<<(MathInset const *);
30         ///
31         MathMLStream & operator<<(MathArray const &);
32         ///
33         MathMLStream & operator<<(char const *);
34         ///
35         MathMLStream & operator<<(char);
36         ///
37         MathMLStream & operator<<(MTag const &);
38         ///
39         MathMLStream & operator<<(ETag const &);
40         ///
41         void cr();
42
43         ///
44         std::ostream & os_;
45         ///
46         int tab_;
47         ///
48         int line_;
49 };
50
51
52 struct NormalStream {
53         ///
54         explicit NormalStream(std::ostream & os) : os_(os) {}
55         ///
56         std::ostream & os_;
57         ///
58         NormalStream & operator<<(MathInset const *);
59         ///
60         NormalStream & operator<<(MathArray const &);
61         ///
62         NormalStream & operator<<(char const *);
63         ///
64         NormalStream & operator<<(char);
65 };
66
67
68 struct MapleStream {
69         ///
70         explicit MapleStream(std::ostream & os) : os_(os) {}
71         ///
72         std::ostream & os_;
73         ///
74         MapleStream & operator<<(MathInset const *);
75         ///
76         MapleStream & operator<<(MathArray const &);
77         ///
78         MapleStream & operator<<(char const *);
79         ///
80         MapleStream & operator<<(char);
81         ///
82         MapleStream & operator<<(int);
83 };
84
85
86 struct OctaveStream {
87         ///
88         explicit OctaveStream(std::ostream & os) : os_(os) {}
89         ///
90         std::ostream & os_;
91         ///
92         OctaveStream & operator<<(MathInset const *);
93         ///
94         OctaveStream & operator<<(MathArray const &);
95         ///
96         OctaveStream & operator<<(char const *);
97         ///
98         OctaveStream & operator<<(char);
99 };
100
101
102 struct WriteStream {
103         ///
104         WriteStream(Buffer const * buffer_, std::ostream & os_, bool fragile_);
105         ///
106         explicit WriteStream(std::ostream & os_);
107
108         ///
109         WriteStream & operator<<(MathInset const *);
110         ///
111         WriteStream & operator<<(MathArray const &);
112         ///
113         WriteStream & operator<<(char const *);
114         ///
115         WriteStream & operator<<(char);
116
117         ///
118         Buffer const * buffer;
119         ///
120         std::ostream & os;
121         ///
122         bool fragile;
123 };
124
125
126 #endif