]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/string.h
1. wxFontMapper seems to work for wxMSW
[wxWidgets.git] / include / wx / string.h
index 3c642cc6be19944a4cc0714b820dd0fae04c419b..d7cc2549e67a642d6086256b07bc741ec87d04ed 100644 (file)
@@ -370,21 +370,27 @@ public:
     wxChar& Last()
       { wxASSERT( !IsEmpty() ); CopyBeforeWrite(); return m_pchData[Len()-1]; }
 
-    // under Unix it is tested with configure, assume it works on other
-    // platforms (there might be overloading problems if size_t and int are
-    // the same type)
-#if !defined(__UNIX__) || wxUSE_SIZE_T_STRING_OPERATOR
     // operator version of GetChar
     wxChar  operator[](size_t n) const
       { ASSERT_VALID_INDEX( n ); return m_pchData[n]; }
-#endif
 
     // operator version of GetChar
     wxChar  operator[](int n) const
       { ASSERT_VALID_INDEX( n ); return m_pchData[n]; }
-    // operator version of GetWritableChar
+#ifdef __alpha__
+    // operator version of GetChar
+    wxChar  operator[](unsigned int n) const
+      { ASSERT_VALID_INDEX( n ); return m_pchData[n]; }
+#endif
+    
+    // operator version of GetWriteableChar
     wxChar& operator[](size_t n)
       { ASSERT_VALID_INDEX( n ); CopyBeforeWrite(); return m_pchData[n]; }
+#ifdef __alpha__
+    // operator version of GetWriteableChar
+    wxChar&  operator[](unsigned int n)
+      { ASSERT_VALID_INDEX( n ); CopyBeforeWrite(); return m_pchData[n]; }
+#endif
 
     // implicit conversion to C string
     operator const wxChar*() const { return m_pchData; }
@@ -912,8 +918,9 @@ public:
     // sensitive (default). Returns index of the first item matched or
     // wxNOT_FOUND
   int  Index (const wxChar *sz, bool bCase = TRUE, bool bFromEnd = FALSE) const;
-    // add new element at the end
-  void Add(const wxString& str);
+    // add new element at the end (if the array is not sorted), return its
+    // index
+  size_t Add(const wxString& str);
     // add new element at given position
   void Insert(const wxString& str, size_t uiIndex);
     // remove first item matching this value
@@ -1041,7 +1048,8 @@ inline wxString WXDLLEXPORT operator+(const wxCharBuffer& buf, const wxString& s
 
 #include "wx/ioswrap.h"
 
-WXDLLEXPORT istream& operator>>(istream& is, wxString& str);
+WXDLLEXPORT istream& operator>>(istream&, wxString&);
+WXDLLEXPORT ostream& operator<<(ostream&, const wxString&);
 
 #endif  // wxSTD_STRING_COMPATIBILITY