]> git.lyx.org Git - lyx.git/blobdiff - src/ParIterator.h
Embedding: saving inzip name to .lyx file so that embedded files can always be found...
[lyx.git] / src / ParIterator.h
index bcae0b96e80533a80fb7eb364f386a6aadb56224..af41cc0744ed91b69f4af2a471ee0de734498423 100644 (file)
 #define PARITERATOR_H
 
 #include "DocIterator.h"
-#include "ParagraphList_fwd.h"
 
 #include "support/types.h"
 
-#include <boost/optional.hpp>
-
 #include <vector>
 
 
 namespace lyx {
 
-
-
-class InsetBase;
-class LyXText;
+class Inset;
+class Text;
+class ParagraphList;
 
 
 class ParIterator : public std::iterator<std::forward_iterator_tag, Paragraph>,
@@ -44,9 +40,8 @@ public:
        ///
        ParIterator() : DocIterator() {}
 
-
        ///
-       ParIterator(InsetBase &, pit_type pit);
+       ParIterator(Inset &, pit_type pit);
        ///
        ParIterator(ParIterator const &);
        ///
@@ -78,15 +73,20 @@ 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);
 
-///
+// 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 & iter1, ParIterator const & iter2);
 
 
@@ -121,9 +121,9 @@ bool operator!=(ParConstIterator const & iter1,
                ParConstIterator const & iter2);
 
 
-ParConstIterator par_const_iterator_begin(InsetBase const & inset);
+ParConstIterator par_const_iterator_begin(Inset const & inset);
 
-ParConstIterator par_const_iterator_end(InsetBase const & inset);
+ParConstIterator par_const_iterator_end(Inset const & inset);