]> git.lyx.org Git - features.git/blobdiff - src/ParagraphList.h
add more functions to ParagraphList
[features.git] / src / ParagraphList.h
index 7223b58e08c7c1baeb87d3af6959b813cc980dbd..52154c115648660789644491f4d6d69f0557711b 100644 (file)
@@ -4,6 +4,7 @@
 #define PARAGRAPH_LIST_H
 
 #include <iterator>
+#include <utility>
 
 class Paragraph;
 
@@ -46,8 +47,14 @@ public:
        ///
        ParagraphList();
        ///
+       ParagraphList(ParagraphList const &);
+       ///
+       ParagraphList & operator=(ParagraphList const &);
+       ///
        iterator insert(iterator it, Paragraph * par);
        ///
+       void assign(iterator beg, iterator end);
+       ///
        void clear();
        ///
        void erase(iterator it);
@@ -64,9 +71,13 @@ public:
        ///
        void push_back(Paragraph *);
        ///
-       Paragraph const * back() const;
+       Paragraph const & front() const;
        ///
-       Paragraph * back();
+       Paragraph & front();
+       ///
+       Paragraph const & back() const;
+       ///
+       Paragraph & back();
        ///
        int size() const;
        ///
@@ -76,6 +87,12 @@ private:
        Paragraph * parlist;
 };
 
+
+
+typedef std::pair<ParagraphList::iterator, int> PitPosPair;
+
+
+
 ///
 bool operator==(ParagraphList::iterator const & i1,
                ParagraphList::iterator const & i2);
@@ -83,4 +100,5 @@ bool operator==(ParagraphList::iterator const & i1,
 bool operator!=(ParagraphList::iterator const & i1,
                ParagraphList::iterator const & i2);
 
+
 #endif