]> git.lyx.org Git - lyx.git/blob - src/mathed/math_streamstr.C
add #pragme interface/implementation
[lyx.git] / src / mathed / math_streamstr.C
1
2 #ifdef __GNUG__
3 #pragma implementation 
4 #endif
5
6 #include <config.h>
7
8 #include "math_streamstr.h"
9 #include "math_mathmlstream.h"
10 #include "support/LOstream.h"
11 #include "support/lyxalgo.h"
12
13
14 WriteStream & operator<<(WriteStream & ws, string const & s)
15 {
16         if (ws.pendingSpace()) {
17                 ws.os() << ' ';
18                 ws.pendingSpace(false);
19         }
20         ws.os() << s;
21         ws.addlines(int(lyx::count(s.begin(), s.end(), '\n')));
22         return ws;
23 }
24
25
26 NormalStream & operator<<(NormalStream & ns, string const & s)
27 {
28         ns.os() << s;
29         return ns;
30 }
31
32
33 MapleStream & operator<<(MapleStream & ms, string const & s)
34 {
35         ms.os() << s;
36         return ms;
37 }
38
39
40 MathematicaStream & operator<<(MathematicaStream & ms, string const & s)
41 {
42         ms.os() << s;
43         return ms;
44 }
45
46
47 MathMLStream & operator<<(MathMLStream & ms, string const & s)
48 {
49         ms.os() << s;
50         return ms;
51 }
52
53
54 OctaveStream & operator<<(OctaveStream & os, string const & s)
55 {
56         os.os() << s;
57         return os;
58 }