12 ParPosition(Paragraph * p)
13 : par(p), it(p->inset_iterator_begin()), index(-1) {}
17 Paragraph::inset_iterator it;
24 bool operator==(ParPosition const & pos1, ParPosition const & pos2) {
25 return pos1.par == pos2.par &&
27 pos1.index == pos2.index;
31 bool operator!=(ParPosition const & pos1, ParPosition const & pos2) {
32 return !(pos1 == pos2);
41 ParIterator(Paragraph * par)
42 : positions(1, ParPosition(par)) {}
44 ParIterator & operator++();
46 Paragraph * operator*() { return positions.back().par; }
48 vector<ParPosition>::size_type size() const
49 { return positions.size(); }
52 bool operator==(ParIterator const & iter1, ParIterator const & iter2);
55 std::vector<ParPosition> positions;
61 bool operator==(ParIterator const & iter1, ParIterator const & iter2) {
62 return iter1.positions == iter2.positions;
68 bool operator!=(ParIterator const & iter1, ParIterator const & iter2) {
69 return !(iter1 == iter2);