+// this class provides a temporary wxString* from a
+// wxArrayString
+class WXDLLIMPEXP_BASE wxCArrayString
+{
+public:
+ wxCArrayString( const wxArrayString& array )
+ : m_array( array ), m_strings( NULL )
+ { }
+ ~wxCArrayString() { delete[] m_strings; }
+
+ size_t GetCount() const { return m_array.GetCount(); }
+ wxString* GetStrings()
+ {
+ if( m_strings ) return m_strings;
+ size_t count = m_array.GetCount();
+ m_strings = new wxString[count];
+ for( size_t i = 0; i < count; ++i )
+ m_strings[i] = m_array[i];
+ return m_strings;
+ }
+private:
+ const wxArrayString& m_array;
+ wxString* m_strings;
+};
+