00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef OM_HGUARD_OMPOSTLISTITERATOR_H
00025 #define OM_HGUARD_OMPOSTLISTITERATOR_H
00026
00027 #include <iterator>
00028 #include "om/omtypes.h"
00029
00030 class OmDatabase;
00031 class OmPositionListIterator;
00032
00033 class OmPostListIterator {
00034 public:
00035 class Internal;
00037 Internal *internal;
00038
00039 private:
00040 friend class OmDatabase;
00041
00042 OmPostListIterator(Internal *internal_);
00043
00044 public:
00045 friend bool operator==(const OmPostListIterator &a,
00046 const OmPostListIterator &b);
00047
00049 OmPostListIterator();
00050
00052 ~OmPostListIterator();
00053
00057 OmPostListIterator(const OmPostListIterator &other);
00058
00062 void operator=(const OmPostListIterator &other);
00063
00064 OmPostListIterator & operator++();
00065
00066 void operator++(int);
00067
00068
00069 void skip_to(om_docid did);
00070
00071
00072
00073
00074
00076 om_docid operator *() const;
00077
00087 om_doclength get_doclength() const;
00088
00092 om_termcount get_wdf() const;
00093
00094
00095 OmPositionListIterator positionlist_begin();
00096 OmPositionListIterator positionlist_end();
00097
00098
00099
00100
00101
00102
00106 std::string get_description() const;
00107
00109
00110 typedef std::input_iterator_tag iterator_category;
00111 typedef om_docid value_type;
00112 typedef om_doccount_diff difference_type;
00113 typedef om_docid * pointer;
00114 typedef om_docid & reference;
00116 };
00117
00118 inline bool operator!=(const OmPostListIterator &a,
00119 const OmPostListIterator &b)
00120 {
00121 return !(a == b);
00122 }
00123
00124 #endif