3 #include "ParagraphList.h"
7 ////////// The ParagraphList::iterator
9 ParagraphList::iterator::iterator()
14 ParagraphList::iterator::iterator(Paragraph * p)
19 ParagraphList::iterator::reference
20 ParagraphList::iterator::operator*()
26 ParagraphList::iterator::pointer
27 ParagraphList::iterator::operator->()
33 ParagraphList::iterator &
34 ParagraphList::iterator::operator++()
41 ParagraphList::iterator
42 ParagraphList::iterator::operator++(int)
50 ParagraphList::iterator &
51 ParagraphList::iterator::operator--()
53 ptr = ptr->previous();
58 ParagraphList::iterator
59 ParagraphList::iterator::operator--(int)
67 bool operator==(ParagraphList::iterator const & i1,
68 ParagraphList::iterator const & i2)
70 return &(*const_cast<ParagraphList::iterator&>(i1)) == &(*const_cast<ParagraphList::iterator&>(i2));
74 bool operator!=(ParagraphList::iterator const & i1,
75 ParagraphList::iterator const & i2)
81 ////////// The ParagraphList proper
82 ParagraphList::ParagraphList()
87 void ParagraphList::clear()
90 Paragraph * tmp = parlist->next();
97 ParagraphList::iterator ParagraphList::begin()
99 return iterator(parlist);
103 ParagraphList::iterator ParagraphList::begin() const
105 return iterator(parlist);
109 ParagraphList::iterator ParagraphList::end()
115 ParagraphList::iterator ParagraphList::end() const
121 void ParagraphList::set(Paragraph * p)
127 int ParagraphList::size() const
129 // When we switch to a std::container this will be O(1)
130 // instead of O(n). (Lgb)
131 Paragraph * tmp = parlist;
141 bool ParagraphList::empty() const