]> git.lyx.org Git - lyx.git/blobdiff - src/buffer.h
Lar's ParConstIterator
[lyx.git] / src / buffer.h
index 8aad387abe94167ebad97c37c6ad4d740827751b..b3f1feeb0a528fbf58ff747fdc0197d74a6027e6 100644 (file)
 #include "ParagraphList.h"
 #include "paragraph.h"
 
-#include <boost/scoped_ptr.hpp>
 #include <boost/shared_ptr.hpp>
 
 class BufferView;
-class Counters;
 class LyXRC;
 class TeXErrors;
 class LaTeXFeatures;
 class Language;
 class ParIterator;
+class ParConstIterator;
 
-#define NO_COMPABILITY 1
 
 ///
 struct DEPCLEAN {
@@ -111,7 +109,7 @@ public:
            \param par if != 0 insert the file.
            \return \c false if method fails.
        */
-       bool readFile(LyXLex &, Paragraph * par = 0);
+       bool readFile(LyXLex &, string const &, Paragraph * par = 0);
 
        /** Reads a file without header.
            \param par if != 0 insert the file.
@@ -128,13 +126,6 @@ public:
        ///
        void insertStringAsLines(Paragraph *&, lyx::pos_type &,
                                 LyXFont const &, string const &) const;
-#ifndef NO_COMPABILITY
-       ///
-       Inset * isErtInset(Paragraph * par, int pos) const;
-       ///
-       void insertErtContents(Paragraph * par, int & pos,
-                              bool set_inactive = true);
-#endif
        ///
        Paragraph * getParFromID(int id) const;
 private:
@@ -187,12 +178,6 @@ public:
        ///
        void makeDocBookFile(string const & filename,
                             bool nice, bool only_body = false);
-       /// Open SGML/XML tag.
-       int sgmlOpenTag(std::ostream & os, Paragraph::depth_type depth, bool mixcont,
-               string const & latexname) const;
-       /// Closes SGML/XML tag.
-       int sgmlCloseTag(std::ostream & os, Paragraph::depth_type depth, bool mixcont,
-               string const & latexname) const;
        ///
        void sgmlError(Paragraph * par, int pos, string const & message) const;
 
@@ -275,8 +260,6 @@ public:
        */
        void validate(LaTeXFeatures &) const;
 
-       ///
-       string const getIncludeonlyList(char delim = ',');
        ///
        std::vector<std::pair<string, string> > const getBibkeyList() const;
        ///
@@ -319,9 +302,6 @@ public:
 
        /// Used when typesetting to place errorboxes.
        TexRow texrow;
-       /// Buffer-wide counter array
-       Counters & counters() const;
-       
 private:
        /// is save needed
        mutable bool lyx_clean;
@@ -354,10 +334,6 @@ private:
            of the buffers in the list of users to do a #updateLayoutChoice#.
        */
        BufferView * users;
-
-       /// The pointer is const although its contents may not be
-       boost::scoped_ptr<Counters> const ctrs;
-       
 public:
        ///
        class inset_iterator {
@@ -369,15 +345,15 @@ public:
                typedef Inset & reference;
                typedef ParagraphList::iterator base_type;
 
-               ///
-               inset_iterator();
-               ///
-               inset_iterator(base_type p, base_type e);
-               ///
-               inset_iterator(base_type p, lyx::pos_type pos, base_type e);
+               ///
+               inset_iterator();
+               ///
+               inset_iterator(base_type p, base_type e);
+               ///
+               inset_iterator(base_type p, lyx::pos_type pos, base_type e);
 
-               /// prefix ++
-               inset_iterator & operator++();
+               /// prefix ++
+               inset_iterator & operator++();
                /// postfix ++
                inset_iterator operator++(int);
                ///
@@ -427,10 +403,19 @@ public:
        ///
        ParIterator par_iterator_begin();
        ///
+       ParConstIterator par_iterator_begin() const;
+       ///
        ParIterator par_iterator_end();
+       ///
+       ParConstIterator par_iterator_end() const;
 
        ///
        Inset * getInsetFromID(int id_arg) const;
 };
 
+bool operator==(Buffer::inset_iterator const & iter1,
+               Buffer::inset_iterator const & iter2);
+
+bool operator!=(Buffer::inset_iterator const & iter1,
+               Buffer::inset_iterator const & iter2);
 #endif