X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FParagraphList.h;h=a57deb4eea7b2a7e8582ef7cdedeb1deb62176f0;hb=0c7bd9a57f2a308bb9659200eda3b7e45f8d5d3c;hp=6b3f643de9bb7db83dfff28a6e5fb3458a286a80;hpb=808973619b70166c140acfd12467ddc84ed6a848;p=lyx.git diff --git a/src/ParagraphList.h b/src/ParagraphList.h index 6b3f643de9..a57deb4eea 100644 --- a/src/ParagraphList.h +++ b/src/ParagraphList.h @@ -1,78 +1,36 @@ // -*- C++ -*- +/** + * \file ParagraphList.h + * This file is part of LyX, the document processor. + * Licence details can be found in the file COPYING. + * + * \author Angus Leeming + * + * Full author contact details are available in file CREDITS. + */ #ifndef PARAGRAPH_LIST_H #define PARAGRAPH_LIST_H -#include +#include "Paragraph.h" -class Paragraph; +#include "support/RandomAccessList.h" -/// -class ParagraphList { + +namespace lyx { + +/// Container for all kind of Paragraphs used in LyX. +class ParagraphList : public RandomAccessList { public: /// - class iterator { - public: - /// - typedef std::bidirectional_iterator_tag iterator_category; - /// - typedef Paragraph * value_type; - /// - typedef ptrdiff_t difference_type; - /// - typedef Paragraph * pointer; - /// - typedef Paragraph & reference; - /// - iterator(); - /// - iterator(value_type); - /// - reference operator*(); - /// - pointer operator->(); - /// - iterator & operator++(); - /// - iterator operator++(int); - /// - iterator & operator--(); - /// - iterator operator--(int); - private: - /// - Paragraph * ptr; - }; - /// - ParagraphList(); - /// - void clear(); - /// - iterator begin(); - /// - iterator begin() const; - /// - iterator end(); - /// - iterator end() const; - /// - void set(Paragraph *); - /// - void push_back(Paragraph *); - /// - int size() const; - /// - bool empty() const; -private: + ParagraphList() {} /// - Paragraph * parlist; + template + ParagraphList(InputIterator first, InputIterator last) + : RandomAccessList(first, last) + {} }; -/// -bool operator==(ParagraphList::iterator const & i1, - ParagraphList::iterator const & i2); -/// -bool operator!=(ParagraphList::iterator const & i1, - ParagraphList::iterator const & i2); +} // namespace lyx #endif