+#if wxUSE_UNICODE_UTF8
+// see the comment near wxString::iterator for why we need this
+class WXDLLIMPEXP_BASE wxStringIteratorNode
+{
+public:
+ wxStringIteratorNode()
+ : m_str(NULL), m_citer(NULL), m_iter(NULL), m_prev(NULL), m_next(NULL) {}
+ wxStringIteratorNode(const wxString *str,
+ wxStringImpl::const_iterator *citer)
+ { DoSet(str, citer, NULL); }
+ wxStringIteratorNode(const wxString *str, wxStringImpl::iterator *iter)
+ { DoSet(str, NULL, iter); }
+ ~wxStringIteratorNode()
+ { clear(); }
+
+ inline void set(const wxString *str, wxStringImpl::const_iterator *citer)
+ { clear(); DoSet(str, citer, NULL); }
+ inline void set(const wxString *str, wxStringImpl::iterator *iter)
+ { clear(); DoSet(str, NULL, iter); }
+
+ const wxString *m_str;
+ wxStringImpl::const_iterator *m_citer;
+ wxStringImpl::iterator *m_iter;
+ wxStringIteratorNode *m_prev, *m_next;
+
+private:
+ inline void clear();
+ inline void DoSet(const wxString *str,
+ wxStringImpl::const_iterator *citer,
+ wxStringImpl::iterator *iter);
+
+ // the node belongs to a particular iterator instance, it's not copied
+ // when a copy of the iterator is made
+ DECLARE_NO_COPY_CLASS(wxStringIteratorNode)
+};
+#endif // wxUSE_UNICODE_UTF8
+