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_OMVALUEITERATOR_H
00025 #define OM_HGUARD_OMVALUEITERATOR_H
00026
00027 #include <iterator>
00028 #include <string>
00029 using std::string;
00030 #include "om/omtypes.h"
00031
00032 class OmDocument;
00033
00036 class OmValueIterator {
00037 public:
00038 class Internal;
00040 Internal *internal;
00041
00042 private:
00043 friend class OmDocument;
00044
00045 friend bool operator==(const OmValueIterator &a, const OmValueIterator &b);
00046
00047 OmValueIterator(Internal *internal_);
00048
00049 public:
00051 OmValueIterator();
00052
00054 ~OmValueIterator();
00055
00057 OmValueIterator(const OmValueIterator &other);
00058
00060 void operator=(const OmValueIterator &other);
00061
00062 OmValueIterator & operator++();
00063
00064 void operator++(int);
00065
00067 const string & operator *() const;
00068
00070 const string * operator ->() const;
00071
00073 om_valueno get_valueno() const;
00074
00078 std::string get_description() const;
00079
00081
00082 typedef std::input_iterator_tag iterator_category;
00083 typedef string value_type;
00084 typedef om_valueno_diff difference_type;
00085 typedef string * pointer;
00086 typedef string & reference;
00088 };
00089
00090 inline bool operator!=(const OmValueIterator &a, const OmValueIterator &b)
00091 {
00092 return !(a == b);
00093 }
00094
00095 #endif