]> git.lyx.org Git - features.git/blob - src/mathed/math_mathmlstream.h
1d1839359caa5f12be78fa95fa74c1b0c8cb52ee
[features.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
83
84 struct OctaveStream {
85         ///
86         explicit OctaveStream(std::ostream & os) : os_(os) {}
87         ///
88         std::ostream & os_;
89         ///
90         OctaveStream & operator<<(MathInset const *);
91         ///
92         OctaveStream & operator<<(MathArray const &);
93         ///
94         OctaveStream & operator<<(char const *);
95         ///
96         OctaveStream & operator<<(char);
97 };
98
99
100 struct MathWriteInfo {
101         ///
102         MathWriteInfo(Buffer const * buffer_, std::ostream & os_, bool fragile_);
103         ///
104         explicit MathWriteInfo(std::ostream & os_);
105
106         ///
107         MathWriteInfo & operator<<(MathInset const *);
108         ///
109         MathWriteInfo & operator<<(MathArray const &);
110         ///
111         MathWriteInfo & operator<<(char const *);
112         ///
113         MathWriteInfo & operator<<(char);
114
115         ///
116         Buffer const * buffer;
117         ///
118         std::ostream & os;
119         ///
120         bool fragile;
121 };
122
123
124 #endif