#ifndef PARAGRAPH_LIST_H
#define PARAGRAPH_LIST_H
-#include <iterator>
-#include <utility>
+#define NO_STD_LIST 1
+
+#ifndef NO_STD_LIST
+
+#include "paragraph.h"
+
+#include <list>
+
+typedef std::list<Paragraph> ParagraphList;
+
+#else
class Paragraph;
+#include <iterator>
+#include <utility>
+
///
class ParagraphList {
public:
///
class iterator {
public:
+ friend class ParagraphList;
///
typedef std::bidirectional_iterator_tag iterator_category;
///
///
iterator();
///
- iterator(value_type);
- ///
reference operator*();
///
pointer operator->();
///
iterator operator--(int);
private:
+ ///
+ iterator(value_type);
///
Paragraph * ptr;
};
///
ParagraphList & operator=(ParagraphList const &);
///
- iterator insert(iterator it, Paragraph * par);
+ iterator insert(iterator it, Paragraph const & par);
///
void insert(iterator pos, iterator beg, iterator end);
///
///
iterator end() const;
///
- void set(Paragraph *);
- ///
- void push_back(Paragraph *);
+ void push_back(Paragraph const &);
///
Paragraph const & front() const;
///
bool operator!=(ParagraphList::iterator const & i1,
ParagraphList::iterator const & i2);
+#endif
#endif