]> git.lyx.org Git - lyx.git/blob - src/ParagraphList.h
update no.po
[lyx.git] / src / ParagraphList.h
1 // -*- C++ -*-
2
3 #ifndef PARAGRAPH_LIST_H
4 #define PARAGRAPH_LIST_H
5
6 #include <iterator>
7
8 class Paragraph;
9
10 ///
11 class ParagraphList {
12 public:
13         ///
14         class iterator {
15         public:
16                 ///
17                 typedef std::bidirectional_iterator_tag iterator_category;
18                 ///
19                 typedef Paragraph * value_type;
20                 ///
21                 typedef ptrdiff_t difference_type;
22                 ///
23                 typedef Paragraph * pointer;
24                 ///
25                 typedef Paragraph & reference;
26                 ///
27                 iterator();
28                 ///
29                 iterator(value_type);
30                 ///
31                 reference operator*();
32                 ///
33                 pointer operator->();
34                 ///
35                 iterator & operator++();
36                 ///
37                 iterator operator++(int);
38                 ///
39                 iterator & operator--();
40                 ///
41                 iterator operator--(int);
42         private:
43                 ///
44                 Paragraph * ptr;
45         };
46         ///
47         ParagraphList();
48         ///
49         void clear();
50         ///
51         iterator begin();
52         ///
53         iterator begin() const;
54         ///
55         iterator end();
56         ///
57         iterator end() const;
58         ///
59         void set(Paragraph *);
60         ///
61         void push_back(Paragraph *);
62         ///
63         Paragraph const * back() const;
64         ///
65         Paragraph * back();
66         ///
67         int size() const;
68         ///
69         bool empty() const;
70 private:
71         ///
72         Paragraph * parlist;
73 };
74
75 ///
76 bool operator==(ParagraphList::iterator const & i1,
77                 ParagraphList::iterator const & i2);
78 ///
79 bool operator!=(ParagraphList::iterator const & i1,
80                 ParagraphList::iterator const & i2);
81
82 #endif