]> git.lyx.org Git - lyx.git/blob - src/iterators.h
Make lyx2lyx output the new external inset format.
[lyx.git] / src / iterators.h
1 // -*- C++ -*-
2 /* \file iterators.h
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author unknown
7  * \author Lars Gullik Bjønnes
8  *
9  * Full author contact details are available in file CREDITS
10  */
11
12 #ifndef ITERATORS_H
13 #define ITERATORS_H
14
15 #include "ParagraphList.h"
16
17 #include <boost/scoped_ptr.hpp>
18
19 class ParIterator {
20 public:
21         ///
22         ParIterator(ParagraphList::iterator pit, ParagraphList const & pl);
23         ///
24         ~ParIterator();
25         ///
26         ParIterator(ParIterator const &);
27         ///
28         void operator=(ParIterator const &);
29         ///
30         ParIterator & operator++();
31         ///
32         ParagraphList::iterator operator*() const;
33         ///
34         ParagraphList::iterator operator->() const;
35         ///
36         ParagraphList::iterator outerPar() const;
37         ///
38         ParagraphList & plist() const;
39         ///
40         size_t size() const;
41         ///
42         friend
43         bool operator==(ParIterator const & iter1, ParIterator const & iter2);
44 private:
45         struct Pimpl;
46         boost::scoped_ptr<Pimpl> pimpl_;
47 };
48
49 ///
50 bool operator==(ParIterator const & iter1, ParIterator const & iter2);
51
52 ///
53 bool operator!=(ParIterator const & iter1, ParIterator const & iter2);
54
55
56 class ParConstIterator {
57 public:
58         ///
59         ParConstIterator(ParagraphList::iterator pit, ParagraphList const & pl);
60         ///
61         ~ParConstIterator();
62         ///
63         ParConstIterator(ParConstIterator const &);
64         ///
65         ParConstIterator & operator++();
66         ///
67         ParagraphList::iterator operator*() const;
68         ///
69         ParagraphList::iterator operator->() const;
70
71         ///
72         size_t size() const;
73         ///
74         friend
75         bool operator==(ParConstIterator const & iter1,
76                         ParConstIterator const & iter2);
77 private:
78         struct Pimpl;
79         boost::scoped_ptr<Pimpl> pimpl_;
80 };
81
82 bool operator==(ParConstIterator const & iter1,
83                 ParConstIterator const & iter2);
84
85 bool operator!=(ParConstIterator const & iter1,
86                 ParConstIterator const & iter2);
87
88 #endif