]> git.lyx.org Git - features.git/blobdiff - src/mathed/array.h
iterators for MathArray; cosmetics;
[features.git] / src / mathed / array.h
index 8947ef4d47c00c03ed784959c3123a61ead24766..f37e0c9843912eab04ac8e95346b684ce760b5b8 100644 (file)
@@ -40,6 +40,14 @@ class LaTeXFeatures;
     \version February 2001
   */
 class MathArray  {
+public:
+       ///
+       typedef std::vector<MathInset *>     buffer_type;
+       ///
+       typedef buffer_type::const_iterator  const_iterator;
+       ///
+       typedef buffer_type::iterator        iterator;
+
 public:
        ///
        MathArray();
@@ -102,22 +110,22 @@ public:
        ///
        MathInset const * nextInset(int pos) const;
        ///
-       unsigned char getChar(int pos) const;
-       ///
-       MathTextCodes getCode(int pos) const;
-       ///
-       void setCode(int pos, MathTextCodes t);
-       ///
        void write(std::ostream &, bool) const;
        ///
        void writeNormal(std::ostream &) const;
        ///
        void validate(LaTeXFeatures &) const;
-private:
        ///
-       typedef std::vector<MathInset *>           buffer_type;
+       const_iterator begin() const;   
+       ///
+       const_iterator end() const;     
+       ///
+       iterator begin();
+       ///
+       iterator end();
+private:
        ///
-       void deep_copy(int pos1, int pos2);
+       void deep_copy(iterator from, iterator to);
        /// Buffer
        buffer_type bf_;
 };