+// -*- C++ -*-
#ifndef MATH_ITERATOR_H
#define MATH_ITERATOR_H
public:
/// default constructor, used for end of range
//MathIterator();
- /// start with given formula
- explicit MathIterator(MathAtom & t);
+ /// start with given inset
+ explicit MathIterator(MathInset * p);
/// start with given position
- explicit MathIterator(MathCursor::cursor_type const & cursor);
+ //explicit MathIterator(MathCursor::cursor_type const & cursor);
///
MathCursorPos const & operator*() const;
///
MathCursorPos const & operator->() const;
- ///
+ /// move on one step
void operator++();
+ /// move on several steps
+ void jump(MathInset::difference_type);
/// read access to top most item
MathCursorPos const & position() const;
/// write access to top most item
/// read access to full path
MathCursor::cursor_type const & cursor() const;
/// read access to top most inset
- MathAtom const & par() const;
+ MathInset const * par() const;
/// read access to top most inset
- MathAtom & par();
+ MathInset * par();
/// helper for iend
void goEnd();
-
-private:
- /// write access to top most item
+ /// read access to top most item
+ MathArray const & cell() const;
+
+private:
+ /// read access to top most item
MathXArray const & xcell() const;
/// write access to top most item
- MathAtom * nextInset() const;
+ MathInset * nextInset() const;
/// own level down
- void push(MathAtom &);
+ void push(MathInset *);
/// own level up
void pop();
bool operator!=(MathIterator const &, MathIterator const &);
///
-MathIterator ibegin(MathAtom & p);
+MathIterator ibegin(MathInset * p);
///
-MathIterator iend(MathAtom & p);
+MathIterator iend(MathInset * p);
#endif