00001
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef OM_HGUARD_OMPOSTLISTITERATOR_H
00026 #define OM_HGUARD_OMPOSTLISTITERATOR_H
00027
00028 #include <iterator>
00029 #include "om/omtypes.h"
00030
00031 class OmDatabase;
00032 class OmPositionListIterator;
00033
00034 class OmPostListIterator {
00035 public:
00036 class Internal;
00038 Internal *internal;
00039
00040 private:
00041 friend class OmDatabase;
00042
00043 OmPostListIterator(Internal *internal_);
00044
00045 public:
00046 friend bool operator==(const OmPostListIterator &a,
00047 const OmPostListIterator &b);
00048
00050 OmPostListIterator();
00051
00053 ~OmPostListIterator();
00054
00058 OmPostListIterator(const OmPostListIterator &other);
00059
00063 void operator=(const OmPostListIterator &other);
00064
00065 OmPostListIterator & operator++();
00066
00067 void operator++(int);
00068
00069
00070 void skip_to(om_docid did);
00071
00072
00073
00074
00075
00077 om_docid operator *() const;
00078
00088 om_doclength get_doclength() const;
00089
00093 om_termcount get_wdf() const;
00094
00095
00096 OmPositionListIterator positionlist_begin();
00097 OmPositionListIterator 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 om_docid value_type;
00113 typedef om_doccount_diff difference_type;
00114 typedef om_docid * pointer;
00115 typedef om_docid & reference;
00117 };
00118
00119 inline bool operator!=(const OmPostListIterator &a,
00120 const OmPostListIterator &b)
00121 {
00122 return !(a == b);
00123 }
00124
00125 #endif