-
-MathIterator::MathIterator()
-{}
-
-
-MathIterator::MathIterator(MathInset * p)
-{
- push(p);
-}
-
-
-MathInset const * MathIterator::par() const
-{
- return back().par_;
-}
-
-
-MathInset * MathIterator::par()
-{
- return back().par_;
-}
-
-
-MathArray const & MathIterator::cell() const
-{
- MathCursorPos const & top = back();
- return top.par_->cell(top.idx_);
-}
-
-
-
-void MathIterator::push(MathInset * p)
-{
- //lyxerr << "push: " << p << endl;
- push_back(MathCursorPos(p));
-}
-
-
-void MathIterator::pop()
-{
- //lyxerr << "pop: " << endl;
- lyx::Assert(size());
- pop_back();
-}
-
-
-MathCursorPos const & MathIterator::operator*() const
-{
- return back();
-}
-
-
-MathCursorPos const & MathIterator::operator->() const
-{
- return back();
-}
-
-
-void MathIterator::goEnd()
-{
- MathCursorPos & top = back();
- top.idx_ = top.par_->nargs() - 1;
- top.pos_ = cell().size();
-}