00001
00024 #ifndef XAPIAN_INCLUDED_POSTLISTITERATOR_H
00025 #define XAPIAN_INCLUDED_POSTLISTITERATOR_H
00026
00027 #include <iterator>
00028 #include <xapian/types.h>
00029
00030 namespace Xapian {
00031
00032 class Database;
00033 class PositionListIterator;
00034
00035 class PostListIterator {
00036 private:
00037 friend class Database;
00038
00039 PostListIterator(Internal *internal_);
00040
00041 public:
00042 class Internal;
00044 Internal *internal;
00045
00046 friend bool operator==(const PostListIterator &a,
00047 const PostListIterator &b);
00048
00050 PostListIterator();
00051
00053 ~PostListIterator();
00054
00058 PostListIterator(const PostListIterator &other);
00059
00063 void operator=(const PostListIterator &other);
00064
00065 PostListIterator & operator++();
00066
00067 void operator++(int);
00068
00069
00070 void skip_to(docid did);
00071
00072
00073
00074
00075
00077 docid operator *() const;
00078
00088 doclength get_doclength() const;
00089
00093 termcount get_wdf() const;
00094
00095
00096 PositionListIterator positionlist_begin();
00097 PositionListIterator positionlist_end();
00098
00099
00100
00101
00102
00103
00107 std::string get_description() const;
00108
00110
00111 typedef std::input_iterator_tag iterator_category;
00112 typedef docid value_type;
00113 typedef doccount_diff difference_type;
00114 typedef docid * pointer;
00115 typedef docid & reference;
00117 };
00118
00119 inline bool operator!=(const PostListIterator &a, const PostListIterator &b)
00120 {
00121 return !(a == b);
00122 }
00123
00124 };
00125
00126 #endif