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"
32 \brief Low level container for math insets
34 \author Alejandro Aguilar Sierra
36 \author Lars Gullik Bjønnes
37 \version February 2001
43 typedef std::vector<MathAtom> buffer_type;
45 typedef buffer_type::const_iterator const_iterator;
47 typedef buffer_type::iterator iterator;
49 typedef buffer_type::size_type size_type;
55 MathArray(MathArray const &, size_type from, size_type to);
58 size_type size() const;
64 void swap(MathArray &);
67 void insert(size_type pos, MathInset * inset);
69 void insert(size_type pos, MathArray const &);
72 void erase(size_type pos1, size_type pos2);
74 void erase(size_type pos);
79 void push_back(MathInset * inset);
81 void push_back(MathArray const &);
83 void push_back(MathAtom const &);
90 void dump(std::ostream &) const;
92 void dump2(std::ostream &) const;
94 void substitute(MathMacro const &);
97 MathAtom * at(size_type pos);
99 MathAtom const * at(size_type pos) const;
101 void write(std::ostream &, bool) const;
103 void writeNormal(std::ostream &) const;
105 void validate(LaTeXFeatures &) const;
107 const_iterator begin() const;
109 const_iterator end() const;
120 std::ostream & operator<<(std::ostream & os, MathArray const & ar);