]> git.lyx.org Git - lyx.git/blobdiff - src/ParIterator.h
Account for old versions of Pygments
[lyx.git] / src / ParIterator.h
index af41cc0744ed91b69f4af2a471ee0de734498423..a7631838382f4c8159086bdd1512a00f1040ed5c 100644 (file)
@@ -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.
  */
 
 #include "support/types.h"
 
-#include <vector>
-
 
 namespace lyx {
 
+class Buffer;
 class Inset;
 class Text;
 class ParagraphList;
@@ -38,14 +37,15 @@ public:
        typedef StdIt::reference reference;
 
        ///
-       ParIterator() : DocIterator() {}
+       ///
+       ParIterator(Buffer * buf) : DocIterator(buf) {}
 
        ///
-       ParIterator(Inset &, 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,23 +71,21 @@ public:
 };
 
 
-DocIterator makeDocIterator(ParIterator const &, pos_type);
-
 ParIterator par_iterator_begin(Inset & inset);
 
 ParIterator par_iterator_end(Inset & inset);
 
 
 ///
-bool operator==(ParIterator const & iter1, ParIterator const & iter2);
+//bool operator==(ParIterator const & it1, ParIterator const & it2);
 
-// 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);
+// 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<std::forward_iterator_tag,
@@ -96,12 +94,13 @@ class ParConstIterator : public std::iterator<std::forward_iterator_tag,
 {
 public:
        ///
-       ParConstIterator(): DocIterator() {}
+       ParConstIterator(Buffer const * buf);
        ///
        ParConstIterator(ParConstIterator const &);
        ///
-       ParConstIterator(DocIterator const &);
+       explicit ParConstIterator(DocIterator const &);
        ///
+       void push_back(Inset const &);
 
        ParConstIterator & operator++();
        ///
@@ -114,17 +113,9 @@ public:
        ParagraphList const & plist() const;
 };
 
-bool operator==(ParConstIterator const & iter1,
-               ParConstIterator const & iter2);
-
-bool operator!=(ParConstIterator const & iter1,
-               ParConstIterator const & iter2);
-
-
-ParConstIterator par_const_iterator_begin(Inset const & inset);
-
-ParConstIterator par_const_iterator_end(Inset const & inset);
+//bool operator==(ParConstIterator const & it1, ParConstIterator const & it2);
 
+//bool operator!=(ParConstIterator const & it1, ParConstIterator const & it2);
 
 
 } // namespace lyx