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"
34 \brief Low level container for math insets
36 \author Alejandro Aguilar Sierra
38 \author Lars Gullik Bjønnes
39 \version February 2001
45 typedef std::vector<MathAtom> buffer_type;
47 typedef buffer_type::const_iterator const_iterator;
49 typedef buffer_type::iterator iterator;
51 typedef buffer_type::size_type size_type;
53 typedef buffer_type::size_type idx_type;
55 typedef buffer_type::size_type pos_type;
61 MathArray(MathArray const &, size_type from, size_type to);
63 MathArray(iterator from, iterator to);
66 size_type size() const;
72 void swap(MathArray &);
75 void insert(size_type pos, MathAtom const &);
77 void insert(size_type pos, MathArray const &);
80 void erase(iterator pos1, iterator pos2);
82 void erase(iterator pos);
84 void erase(size_type pos1, size_type pos2);
86 void erase(size_type pos);
91 void push_back(MathAtom const &);
93 void push_back(MathArray const &);
102 MathAtom const & front() const;
109 void substitute(MathMacro const &);
111 bool match(MathArray const &) const;
113 void replace(ReplaceData &);
116 MathAtom & at(size_type pos);
118 MathAtom const & at(size_type pos) const;
120 void validate(LaTeXFeatures &) const;
122 const_iterator begin() const;
124 const_iterator end() const;