X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FParIterator.h;h=320493dac0832910b8f26eda8bf0874114cfbe99;hb=4be1b1a2a4f475297088820279494aa12aa3859d;hp=e06a3b503299f61a8e11c440a0e6ba7ecc13e5cb;hpb=345d7c00cd85576102a025daad82e6537fcb12d2;p=lyx.git diff --git a/src/ParIterator.h b/src/ParIterator.h index e06a3b5032..320493dac0 100644 --- a/src/ParIterator.h +++ b/src/ParIterator.h @@ -4,7 +4,7 @@ * Licence details can be found in the file COPYING. * * \author unknown - * \author Lars Gullik Bjønnes + * \author Lars Gullik Bjønnes * * Full author contact details are available in file CREDITS. */ @@ -21,8 +21,9 @@ namespace lyx { -class InsetBase; -class LyXText; +class Buffer; +class Inset; +class Text; class ParagraphList; @@ -38,14 +39,15 @@ public: typedef StdIt::reference reference; /// - ParIterator() : DocIterator() {} + /// + ParIterator(Buffer * buf) : DocIterator(buf) {} /// - ParIterator(InsetBase &, pit_type pit); + ParIterator(Buffer * buf, Inset &, pit_type pit); /// ParIterator(ParIterator const &); /// - ParIterator(DocIterator const &); + explicit ParIterator(DocIterator const &); /// This really should be implemented... //ParIterator & operator=(ParIterator const &); @@ -71,18 +73,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