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
47 MathArray(MathArray const &);
49 MathArray(MathArray const &, int from, int to);
51 MathArray & operator=(MathArray const &);
62 void swap(MathArray &);
65 void insert(int pos, MathInset * inset);
67 void insert(int pos, unsigned char, MathTextCodes);
69 void insert(int pos, MathArray const &);
72 void erase(int pos1, int pos2);
82 void push_back(MathInset * inset);
84 void push_back(unsigned char, MathTextCodes);
86 void push_back(MathArray const &);
90 MathInset * back() const;
93 void dump(std::ostream &) const;
95 void dump2(std::ostream &) const;
97 void substitute(MathMacro const &);
101 MathInset * nextInset(int pos);
103 MathInset const * nextInset(int pos) const;
105 unsigned char getChar(int pos) const;
107 MathTextCodes getCode(int pos) const;
109 void setCode(int pos, MathTextCodes t);
111 void write(std::ostream &, bool) const;
113 void writeNormal(std::ostream &) const;
115 void validate(LaTeXFeatures &) const;
118 typedef std::vector<MathInset *> buffer_type;
120 void deep_copy(int pos1, int pos2);
126 std::ostream & operator<<(std::ostream & os, MathArray const & ar);