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.
22 #include "mathed/support.h"
23 #include "math_defs.h"
35 \brief Low level container for math insets
37 \author Alejandro Aguilar Sierra
39 \author Lars Gullik Bjønnes
40 \version February 2001
45 typedef std::vector<MathInset *> buffer_type;
47 typedef buffer_type::const_iterator const_iterator;
49 typedef buffer_type::iterator iterator;
55 MathArray(MathArray const &);
57 MathArray(MathArray const &, int from, int to);
59 MathArray & operator=(MathArray const &);
70 void swap(MathArray &);
73 void insert(int pos, MathInset * inset);
75 void insert(int pos, unsigned char, MathTextCodes);
77 void insert(int pos, MathArray const &);
80 void erase(int pos1, int pos2);
90 void push_back(MathInset * inset);
92 void push_back(unsigned char, MathTextCodes);
94 void push_back(MathArray const &);
98 MathInset * back() const;
101 void dump(std::ostream &) const;
103 void dump2(std::ostream &) const;
105 void substitute(MathMacro const &);
109 MathInset * nextInset(int pos);
111 MathInset const * nextInset(int pos) const;
113 void write(std::ostream &, bool) const;
115 void writeNormal(std::ostream &) const;
117 void validate(LaTeXFeatures &) const;
119 const_iterator begin() const;
121 const_iterator end() const;
128 void deep_copy(iterator from, iterator to);
134 std::ostream & operator<<(std::ostream & os, MathArray const & ar);