///////////////////////////////////////////////////////////////////////////////
-// Name: include/wx/arrstr.h
+// Name: wx/arrstr.h
// Purpose: wxArrayString class
// Author: Mattia Barbon and Vadim Zeitlin
// Modified by:
}
int Index(const wxString& str, bool bCase = true, bool bFromEnd = false) const;
+
+private:
+ void Insert()
+ {
+ wxFAIL_MSG( "wxSortedArrayString::Insert() is not to be used" );
+ }
+
+ void Sort()
+ {
+ wxFAIL_MSG( "wxSortedArrayString::Sort() is not to be used" );
+ }
};
#else // if !wxUSE_STL
// FIXME-VC6: currently it's only not defined for VC6 in DLL build as it
// doesn't export template methods from DLL correctly so even though
// it compiles them fine, we get link errors when using wxArrayString
-#if !defined(__VISUALC6__) || !(defined(WXMAKINGDLL || defined(WXUSINGDLL)))
+#if !defined(__VISUALC6__) || !(defined(WXMAKINGDLL) || defined(WXUSINGDLL))
#define wxHAS_VECTOR_TEMPLATE_ASSIGN
#endif
//
// NB: the reason for using int and not bool is that like this we can avoid
// using this ctor for implicit conversions from "const char *" (which
- // we'd like to be implicitly converted to wxString instead!)
- //
- // of course, using explicit would be even better - if all compilers
- // supported it...
- wxArrayString(int autoSort) { Init(autoSort != 0); }
+ // we'd like to be implicitly converted to wxString instead!). This
+ // wouldn't be needed if the 'explicit' keyword was supported by all
+ // compilers, or if this was protected ctor for wxSortedArrayString,
+ // but we're stuck with it now.
+ wxEXPLICIT wxArrayString(int autoSort) { Init(autoSort != 0); }
// C string array ctor
wxArrayString(size_t sz, const char** a);
wxArrayString(size_t sz, const wchar_t** a);
wxString& Item(size_t nIndex) const
{
wxASSERT_MSG( nIndex < m_nCount,
- _T("wxArrayString: index out of bounds") );
+ wxT("wxArrayString: index out of bounds") );
return m_pItems[nIndex];
}
wxString& Last() const
{
wxASSERT_MSG( !IsEmpty(),
- _T("wxArrayString: index out of bounds") );
+ wxT("wxArrayString: index out of bounds") );
return Item(GetCount() - 1);
}