X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fpariterator.h;h=9f4884184e1046c91e6816abb89f295af4e07b8e;hb=9667cb383640866f47aea57f059a9d2a5caefc3d;hp=4ce2b05994d379408e9a05e5e8067382607d01ff;hpb=303a6c126c3b00a831053897cba7a18615ef60eb;p=lyx.git diff --git a/src/pariterator.h b/src/pariterator.h index 4ce2b05994..9f4884184e 100644 --- a/src/pariterator.h +++ b/src/pariterator.h @@ -13,6 +13,7 @@ #define PARITERATOR_H #include "dociterator.h" +#include "ParagraphList_fwd.h" #include "support/types.h" @@ -21,43 +22,61 @@ #include +namespace lyx { + + class InsetBase; class LyXText; -class ParagraphList; class ParIterator : public std::iterator, public DocIterator { public: + typedef std::iterator StdIt; + + typedef StdIt::value_type value_type; + typedef StdIt::difference_type difference_type; + typedef StdIt::pointer pointer; + typedef StdIt::reference reference; + + /// + ParIterator() : DocIterator() {} + + /// - ParIterator(InsetBase &, lyx::par_type pit); + ParIterator(InsetBase &, pit_type pit); /// ParIterator(ParIterator const &); /// ParIterator(DocIterator const &); - /// - void operator=(ParIterator const &); + /// This really should be implemented... + //ParIterator & operator=(ParIterator const &); /// ParIterator & operator++(); /// - ParIterator & operator--(); + ParIterator operator++(int); + /// See comment in pariterator.C + //ParIterator & operator--(); /// Paragraph & operator*() const; /// Paragraph * operator->() const; /// This gives us the top-most parent paragraph - lyx::par_type outerPar() const; + pit_type outerPar() const; /// - lyx::par_type pit() const; + pit_type pit() const; /// + /// return the paragraph this cursor is in + pit_type & pit() { return DocIterator::pit(); } + ParagraphList & plist() const; }; -DocIterator makeDocIterator(ParIterator const &, lyx::pos_type); +DocIterator makeDocIterator(ParIterator const &, pos_type); ParIterator par_iterator_begin(InsetBase & inset); @@ -76,6 +95,8 @@ class ParConstIterator : public std::iterator