X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FParagraphList.h;h=eab59c1e11aff3f632bd60e102d66d408bb02412;hb=35204f8f33d7400a5fefeffea533fb4cb4097211;hp=a4bba61552756bdcc2276293731e5dc82c29ac12;hpb=4882d49f88259a3f33d3687f437060e9486116c6;p=lyx.git diff --git a/src/ParagraphList.h b/src/ParagraphList.h index a4bba61552..eab59c1e11 100644 --- a/src/ParagraphList.h +++ b/src/ParagraphList.h @@ -1,124 +1,28 @@ // -*- C++ -*- +/** + * \file ParagraphList_fwd.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 -#define NO_STD_LIST 1 - -#ifndef NO_STD_LIST - #include "paragraph.h" -#include - -typedef std::list ParagraphList; - -#else - -class Paragraph; +#include "support/RandomAccessList.h" -#include -#include -/// -class ParagraphList { -public: - /// - class iterator { - public: - friend class ParagraphList; - /// - typedef std::bidirectional_iterator_tag iterator_category; - /// - typedef Paragraph * value_type; - /// - typedef ptrdiff_t difference_type; - /// - typedef Paragraph * pointer; - /// - typedef Paragraph & reference; - /// - iterator(); - /// - reference operator*(); - /// - pointer operator->(); - /// - iterator & operator++(); - /// - iterator operator++(int); - /// - iterator & operator--(); - /// - iterator operator--(int); - private: - /// - iterator(value_type); - /// - Paragraph * ptr; - }; - /// - ParagraphList(); - /// - ParagraphList(ParagraphList const &); - /// - ParagraphList & operator=(ParagraphList const &); - /// - iterator insert(iterator it, Paragraph const & par); - /// - void insert(iterator pos, iterator beg, iterator end); - /// - void assign(iterator beg, iterator end); - /// - void splice(iterator pos, ParagraphList & pl); - /// - void clear(); - /// - iterator erase(iterator it); - /// - iterator erase(iterator first, iterator last); - /// - iterator begin(); - /// - iterator begin() const; - /// - iterator end(); - /// - iterator end() const; - /// - void push_back(Paragraph const &); - /// - Paragraph const & front() const; - /// - Paragraph & front(); - /// - Paragraph const & back() const; - /// - Paragraph & back(); - /// - int size() const; - /// - bool empty() const; - /// - iterator find(Paragraph const &); -private: - /// - Paragraph * parlist; -}; +namespace lyx { +/// Container for all kind of Paragraphs used in Lyx. +typedef RandomAccessList ParagraphList; -typedef std::pair PitPosPair; - - - -/// -bool operator==(ParagraphList::iterator const & i1, - ParagraphList::iterator const & i2); -/// -bool operator!=(ParagraphList::iterator const & i1, - ParagraphList::iterator const & i2); - -#endif +} // namespace lyx #endif