+#define wxSTRING_REVERSE_ITERATOR(name, const_or_not) \
+ class name \
+ { \
+ public: \
+ typedef wxChar value_type; \
+ typedef const_or_not value_type& reference; \
+ typedef const_or_not value_type *pointer; \
+ typedef const_or_not value_type *iterator_type; \
+ \
+ name(iterator_type i) : m_cur(i) { } \
+ name(const name& ri) : m_cur(ri.m_cur) { } \
+ \
+ iterator_type base() const { return m_cur; } \
+ \
+ reference operator*() const { return *(m_cur - 1); } \
+ \
+ name& operator++() { --m_cur; return *this; } \
+ name operator++(int) { name tmp = *this; --m_cur; return tmp; } \
+ name& operator--() { ++m_cur; return *this; } \
+ name operator--(int) { name tmp = *this; ++m_cur; return tmp; } \
+ \
+ bool operator==(name ri) const { return m_cur == ri.m_cur; } \
+ bool operator!=(name ri) const { return !(*this == ri); } \
+ \
+ private: \
+ iterator_type m_cur; \
+ }
+
+ wxSTRING_REVERSE_ITERATOR(const_reverse_iterator, const);
+
+ #define wxSTRING_CONST
+ wxSTRING_REVERSE_ITERATOR(reverse_iterator, wxSTRING_CONST);
+ #undef wxSTRING_CONST
+
+ #undef wxSTRING_REVERSE_ITERATOR
+
+