2 #include "math_inset.h"
3 #include "math_mathmlstream.h"
6 MathMLStream::MathMLStream(std::ostream & os)
7 : os_(os), tab_(0), line_(0)
11 MathMLStream & MathMLStream::operator<<(MathInset const * p)
18 MathMLStream & MathMLStream::operator<<(MathArray const & ar)
25 MathMLStream & MathMLStream::operator<<(char const * s)
32 MathMLStream & MathMLStream::operator<<(char c)
39 MathMLStream & MathMLStream::operator<<(MTag const & t)
43 os_ << '<' << t.tag_ << '>';
48 MathMLStream & MathMLStream::operator<<(ETag const & t)
53 os_ << "</" << t.tag_ << '>';
58 void MathMLStream::cr()
61 for (int i = 0; i < tab_; ++i)
67 //////////////////////////////////////////////////////////////////////
70 MapleStream & MapleStream::operator<<(MathInset const * p)
77 MapleStream & MapleStream::operator<<(MathArray const & ar)
84 MapleStream & MapleStream::operator<<(char const * s)
91 MapleStream & MapleStream::operator<<(char c)
99 //////////////////////////////////////////////////////////////////////
102 OctaveStream & OctaveStream::operator<<(MathInset const * p)
109 OctaveStream & OctaveStream::operator<<(MathArray const & ar)
116 OctaveStream & OctaveStream::operator<<(char const * s)
123 OctaveStream & OctaveStream::operator<<(char c)
130 //////////////////////////////////////////////////////////////////////
133 NormalStream & NormalStream::operator<<(MathInset const * p)
135 p->writeNormal(*this);
140 NormalStream & NormalStream::operator<<(MathArray const & ar)
142 ar.writeNormal(*this);
147 NormalStream & NormalStream::operator<<(char const * s)
154 NormalStream & NormalStream::operator<<(char c)
162 //////////////////////////////////////////////////////////////////////
165 MathWriteInfo::MathWriteInfo
166 (Buffer const * buffer_, std::ostream & os_, bool fragile_)
167 : buffer(buffer_), os(os_), fragile(fragile_)
171 MathWriteInfo::MathWriteInfo(std::ostream & os_)
172 : buffer(0), os(os_), fragile(false)
176 MathWriteInfo & MathWriteInfo::operator<<(MathInset const * p)
183 MathWriteInfo & MathWriteInfo::operator<<(MathArray const & ar)
190 MathWriteInfo & MathWriteInfo::operator<<(char const * s)
197 MathWriteInfo & MathWriteInfo::operator<<(char c)