X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FParIterator.h;h=f5e74ca8dc4f5d7271a52cc6bc79c53f29813327;hb=d145c2dc9f27666ca0ed9f8589f99f502d7b2a4d;hp=bcae0b96e80533a80fb7eb364f386a6aadb56224;hpb=f630be890494c849981e4fb52ea4740506e92bed;p=lyx.git diff --git a/src/ParIterator.h b/src/ParIterator.h index bcae0b96e8..f5e74ca8dc 100644 --- a/src/ParIterator.h +++ b/src/ParIterator.h @@ -13,21 +13,17 @@ #define PARITERATOR_H #include "DocIterator.h" -#include "ParagraphList_fwd.h" #include "support/types.h" -#include - #include namespace lyx { - - -class InsetBase; -class LyXText; +class Inset; +class Text; +class ParagraphList; class ParIterator : public std::iterator, @@ -44,13 +40,12 @@ public: /// ParIterator() : DocIterator() {} - /// - ParIterator(InsetBase &, pit_type pit); + ParIterator(Inset &, pit_type pit); /// ParIterator(ParIterator const &); /// - ParIterator(DocIterator const &); + explicit ParIterator(DocIterator const &); /// This really should be implemented... //ParIterator & operator=(ParIterator const &); @@ -76,18 +71,21 @@ public: }; -DocIterator makeDocIterator(ParIterator const &, pos_type); - -ParIterator par_iterator_begin(InsetBase & inset); +ParIterator par_iterator_begin(Inset & inset); -ParIterator par_iterator_end(InsetBase & inset); +ParIterator par_iterator_end(Inset & inset); /// -bool operator==(ParIterator const & iter1, ParIterator const & iter2); +//bool operator==(ParIterator const & it1, ParIterator const & it2); -/// -bool operator!=(ParIterator const & iter1, ParIterator const & iter2); +// FIXME: Unfortunately operator!=(ParIterator &, ParIterator &) is +// implemented with operator!=(DocIterator &, DocIterator &) that gives +// false if the positions are different, even if the pars are the same. +// So ultimately it's a bug in operator!=(ParIterator &, ParIterator &) +// I'd say (nevertheless, I would be reluctant to change it, because I +// fear that some part of the code could rely on this "bug". --Alfredo +//bool operator!=(ParIterator const & it1, ParIterator const & it2); class ParConstIterator : public std::iterator