00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef _VMapIterator_incl_
00020 #define _VMapIterator_incl_
00021
00022 #include <iterator>
00023 #include <utility>
00024 #include <string>
00025
00026 #include <rel/SmartPtr.h>
00027
00028 namespace rel
00029 {
00030
00031 class VMap;
00032
00033
00034
00035
00036
00037 class VMapIterator : public std::iterator<std::forward_iterator_tag,
00038 std::pair<std::string,OpaqueValue> >
00039 {
00040 public:
00041 VMapIterator(VMap *map, const OpaqueValue &privateData);
00042 VMapIterator(const VMapIterator &src);
00043 ~VMapIterator();
00044
00045 VMapIterator &operator = (const VMapIterator &src);
00046
00047
00048
00049 bool operator == (const VMapIterator &rhs) const;
00050 bool operator != (const VMapIterator &rhs) const;
00051
00053 const std::pair<std::string,OpaqueValue> &operator*() const;
00054 const std::pair<std::string,OpaqueValue> *operator->() const;
00056 VMapIterator &operator++();
00060 VMapIterator operator++(int);
00061
00062 private:
00063 VMap *fMap;
00064 bool fCached;
00065 std::pair<std::string,OpaqueValue> fCachedValue;
00066 OpaqueValue fPrivateData;
00067 };
00068
00069
00070 inline bool VMapIterator::operator != (const VMapIterator &rhs) const
00071 { return !operator==(rhs); }
00072
00073
00074 }
00075
00076
00077 #endif
00078