3 * Purpose: A general purpose resizable array.
4 * Author: Alejandro Aguilar Sierra <asierra@servidor.unam.mx>
5 * Created: January 1996
7 * Dependencies: None (almost)
9 * Copyright: 1996, Alejandro Aguilar Sierra
12 * You are free to use and modify this code under the terms of
13 * the GNU General Public Licence version 2 or later.
21 #include "math_atom.h"
24 class MathScriptInset;
27 class MathMetricsInfo;
41 \brief Low level container for math insets
43 \author Alejandro Aguilar Sierra
45 \author Lars Gullik Bjønnes
46 \version February 2001
52 typedef std::vector<MathAtom> buffer_type;
54 typedef buffer_type::const_iterator const_iterator;
56 typedef buffer_type::iterator iterator;
58 typedef buffer_type::size_type size_type;
64 MathArray(MathArray const &, size_type from, size_type to);
67 size_type size() const;
73 void swap(MathArray &);
76 void insert(size_type pos, MathAtom const &);
78 void insert(size_type pos, MathArray const &);
81 void erase(size_type pos1, size_type pos2);
83 void erase(size_type pos);
88 void push_back(MathAtom const &);
90 void push_back(MathArray const &);
101 void substitute(MathMacro const &);
104 MathAtom & at(size_type pos);
106 MathAtom const & at(size_type pos) const;
107 /// glue chars if necessary
108 void write(MathWriteInfo & os) const;
110 void writeNormal(NormalStream &) const;
112 void validate(LaTeXFeatures &) const;
114 const_iterator begin() const;
116 const_iterator end() const;
122 MathScriptInset const * asScript(const_iterator it) const;
123 /// glues chars with the same attributes into MathStringInsets
124 MathArray glueChars() const;
125 /// insert asterisks in "suitable" places
126 MathArray guessAsterisks() const;
128 /// interface to Octave
129 void octavize(OctaveStream &) const;
130 /// interface to Maple
131 void maplize(MapleStream &) const;
132 /// interface to MathML
133 void mathmlize(MathMLStream &) const;
136 bool isMatrix() const;