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_OMTERMLISTITERATOR_H
00026 #define OM_HGUARD_OMTERMLISTITERATOR_H
00027
00028 #include <iterator>
00029 #include "om/omtypes.h"
00030
00031 class OmDatabase;
00032 class OmPositionListIterator;
00033
00036 class OmTermIterator {
00037 private:
00038
00039 friend class OmDatabase;
00040 friend class OmDocument;
00041
00042 public:
00043 class Internal;
00045 Internal *internal;
00046
00047 friend bool operator==(const OmTermIterator &a,
00048 const OmTermIterator &b);
00049
00050 public:
00051
00052 OmTermIterator(Internal *internal_);
00053
00055 OmTermIterator();
00056
00058 ~OmTermIterator();
00059
00063 OmTermIterator(const OmTermIterator &other);
00064
00068 void operator=(const OmTermIterator &other);
00069
00070 om_termname operator *() const;
00071
00072 OmTermIterator & operator++();
00073
00074 void operator++(int);
00075
00076
00077 void skip_to(const om_termname & tname);
00078
00079 om_termcount get_wdf() const;
00080 om_doccount get_termfreq() const;
00081
00082
00083 OmPositionListIterator positionlist_begin();
00084 OmPositionListIterator positionlist_end();
00085
00089 std::string get_description() const;
00090
00092
00093 typedef std::input_iterator_tag iterator_category;
00094 typedef om_termname value_type;
00095 typedef om_termcount_diff difference_type;
00096 typedef om_termname * pointer;
00097 typedef om_termname & reference;
00099 };
00100
00101 inline bool
00102 operator!=(const OmTermIterator &a, const OmTermIterator &b)
00103 {
00104 return !(a == b);
00105 }
00106
00107 #endif