2001-11-08 12:06:56 +00:00
|
|
|
#ifndef MATH_MATHMLSTREAM_H
|
|
|
|
#define MATH_MATHMLSTREAM_H
|
2001-11-07 17:30:26 +00:00
|
|
|
|
|
|
|
#include <iosfwd>
|
2001-11-08 12:06:56 +00:00
|
|
|
#include "support/LOstream.h"
|
2001-11-07 17:30:26 +00:00
|
|
|
|
2001-11-08 12:06:56 +00:00
|
|
|
struct MathArray;
|
|
|
|
struct MathInset;
|
|
|
|
struct Buffer;
|
2001-11-07 17:30:26 +00:00
|
|
|
|
2001-11-08 12:06:56 +00:00
|
|
|
struct MTag {
|
2001-11-07 17:30:26 +00:00
|
|
|
///
|
2001-11-08 12:06:56 +00:00
|
|
|
MTag(char const * const tag) : tag_(tag) {}
|
2001-11-07 17:30:26 +00:00
|
|
|
///
|
2001-11-08 12:06:56 +00:00
|
|
|
char const * const tag_;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct ETag {
|
|
|
|
///
|
|
|
|
ETag(char const * const tag) : tag_(tag) {}
|
|
|
|
///
|
|
|
|
char const * const tag_;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct MathMLStream {
|
|
|
|
///
|
|
|
|
explicit MathMLStream(std::ostream & os);
|
2001-11-07 17:30:26 +00:00
|
|
|
///
|
|
|
|
MathMLStream & operator<<(MathInset const *);
|
|
|
|
///
|
|
|
|
MathMLStream & operator<<(MathArray const &);
|
|
|
|
///
|
|
|
|
MathMLStream & operator<<(char const *);
|
|
|
|
///
|
|
|
|
MathMLStream & operator<<(char);
|
2001-11-08 12:06:56 +00:00
|
|
|
///
|
|
|
|
MathMLStream & operator<<(MTag const &);
|
|
|
|
///
|
|
|
|
MathMLStream & operator<<(ETag const &);
|
|
|
|
///
|
|
|
|
void cr();
|
|
|
|
|
|
|
|
///
|
|
|
|
std::ostream & os_;
|
|
|
|
///
|
|
|
|
int tab_;
|
|
|
|
///
|
|
|
|
int line_;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
struct NormalStream {
|
|
|
|
///
|
|
|
|
explicit NormalStream(std::ostream & os) : os_(os) {}
|
|
|
|
///
|
|
|
|
std::ostream & os_;
|
|
|
|
///
|
|
|
|
NormalStream & operator<<(MathInset const *);
|
|
|
|
///
|
|
|
|
NormalStream & operator<<(MathArray const &);
|
|
|
|
///
|
|
|
|
NormalStream & operator<<(char const *);
|
|
|
|
///
|
|
|
|
NormalStream & operator<<(char);
|
2001-11-07 17:30:26 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
struct MapleStream {
|
|
|
|
///
|
|
|
|
explicit MapleStream(std::ostream & os) : os_(os) {}
|
|
|
|
///
|
|
|
|
std::ostream & os_;
|
|
|
|
///
|
|
|
|
MapleStream & operator<<(MathInset const *);
|
|
|
|
///
|
|
|
|
MapleStream & operator<<(MathArray const &);
|
|
|
|
///
|
|
|
|
MapleStream & operator<<(char const *);
|
|
|
|
///
|
|
|
|
MapleStream & operator<<(char);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
struct OctaveStream {
|
|
|
|
///
|
|
|
|
explicit OctaveStream(std::ostream & os) : os_(os) {}
|
|
|
|
///
|
|
|
|
std::ostream & os_;
|
|
|
|
///
|
|
|
|
OctaveStream & operator<<(MathInset const *);
|
|
|
|
///
|
|
|
|
OctaveStream & operator<<(MathArray const &);
|
|
|
|
///
|
|
|
|
OctaveStream & operator<<(char const *);
|
|
|
|
///
|
|
|
|
OctaveStream & operator<<(char);
|
|
|
|
};
|
|
|
|
|
2001-11-08 12:06:56 +00:00
|
|
|
|
|
|
|
struct MathWriteInfo {
|
|
|
|
///
|
|
|
|
MathWriteInfo(Buffer const * buffer_, std::ostream & os_, bool fragile_);
|
|
|
|
///
|
|
|
|
explicit MathWriteInfo(std::ostream & os_);
|
|
|
|
|
|
|
|
///
|
|
|
|
MathWriteInfo & operator<<(MathInset const *);
|
|
|
|
///
|
|
|
|
MathWriteInfo & operator<<(MathArray const &);
|
|
|
|
///
|
|
|
|
MathWriteInfo & operator<<(char const *);
|
|
|
|
///
|
|
|
|
MathWriteInfo & operator<<(char);
|
|
|
|
|
|
|
|
///
|
|
|
|
Buffer const * buffer;
|
|
|
|
///
|
|
|
|
std::ostream & os;
|
|
|
|
///
|
|
|
|
bool fragile;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2001-11-07 17:30:26 +00:00
|
|
|
#endif
|