28 #ifndef PTLIB_WXSTRING_H
29 #define PTLIB_WXSTRING_H
39 PwxString(
const char * str) : wxString( str, wxConvUTF8) { }
42 #ifdef OPAL_OPAL_MEDIAFMT_H
43 PwxString(
const OpalMediaFormat & fmt) : wxString((const char *)fmt.GetName(), wxConvUTF8) { }
46 PwxString(
const wchar_t * wstr) : wxString(wstr) { }
49 inline PwxString &
operator=(
const char * str) { *
this = wxString(str, wxConvUTF8);
return *
this; }
51 inline PwxString &
operator=(
const wchar_t * wstr) { wxString::operator=(wstr);
return *
this; }
56 inline bool operator==(
const char * other)
const {
return IsSameAs(wxString(other, wxConvUTF8)); }
58 inline bool operator==(
const wchar_t * other)
const {
return IsSameAs(other); }
60 inline bool operator==(
const wxString & other)
const {
return IsSameAs(other); }
61 inline bool operator==(
const PString & other)
const {
return IsSameAs(wxString((
const char *)other, wxConvUTF8)); }
63 #ifdef OPAL_OPAL_MEDIAFMT_H
64 inline bool operator==(
const OpalMediaFormat & other)
const {
return IsSameAs(wxString((
const char *)other.GetName(), wxConvUTF8)); }
67 inline bool operator!=(
const char * other)
const {
return !IsSameAs(wxString(other, wxConvUTF8)); }
69 inline bool operator!=(
const wchar_t * other)
const {
return !IsSameAs(other); }
71 inline bool operator!=(
const wxString & other)
const {
return !IsSameAs(other); }
72 inline bool operator!=(
const PString & other)
const {
return !IsSameAs(wxString((
const char *)other, wxConvUTF8)); }
74 #ifdef OPAL_OPAL_MEDIAFMT_H
75 inline bool operator!=(
const OpalMediaFormat & other)
const {
return !IsSameAs(wxString((
const char *)other.GetName(), wxConvUTF8)); }
80 inline operator PString()
const {
return ToUTF8().
data(); }
83 #if defined(PTLIB_PURL_H) && defined(P_URL)
84 inline operator PURL()
const {
return ToUTF8().data(); }
86 #if defined(PTLIB_IPSOCKET_H)
89 inline friend ostream &
operator<<(ostream & stream,
const PwxString &
string) {
return stream <<
string.ToUTF8(); }
90 inline friend wostream &
operator<<(wostream & stream,
const PwxString &
string) {
return stream <<
string.c_str(); }
93 inline operator PString()
const {
return c_str(); }
95 inline operator PFilePath()
const {
return c_str(); }
96 #if defined(PTLIB_PURL_H) && defined(P_URL)
97 inline operator PURL()
const {
return c_str(); }
99 #if defined(PTLIB_IPSOCKET_H)
102 inline friend ostream &
operator<<(ostream & stream,
const PwxString &
string) {
return stream <<
string.c_str(); }
103 inline friend wostream &
operator<<(wostream & stream,
const PwxString &
string) {
return stream <<
string.c_str(); }
106 #if !wxCHECK_VERSION(2,9,2)
115 #endif // PTLIB_WXSTRING_H
This class defines a class to bridge WX Widgets strings to PTLib strings.
Definition: wxstring.h:34
PwxString & operator<<(const char *str)
Definition: wxstring.h:107
__inline char * data()
Definition: pstring.h:1888
PString p_str() const
Definition: wxstring.h:92
PwxString(const PFilePath &fn)
Definition: wxstring.h:41
PwxString & operator=(const wxString &str)
Definition: wxstring.h:53
PwxString(const wxString &str)
Definition: wxstring.h:38
bool operator==(const PwxString &other) const
Definition: wxstring.h:62
This class describes a full description for a file on the particular platform.
Definition: filepath.h:61
PwxString & operator<<(const PString &str)
Definition: wxstring.h:108
bool operator!=(const PString &other) const
Definition: wxstring.h:72
PwxString & operator=(const char *str)
Definition: wxstring.h:49
This class is a variation of a string that ignores case.
Definition: pstring.h:2012
bool operator!=(const wxString &other) const
Definition: wxstring.h:71
bool operator==(const wxString &other) const
Definition: wxstring.h:60
bool operator!=(const char *other) const
Definition: wxstring.h:67
PwxString(const char *str)
Definition: wxstring.h:39
bool operator!=(const PwxString &other) const
Definition: wxstring.h:73
friend ostream & operator<<(ostream &stream, const PwxString &string)
Definition: wxstring.h:102
__inline wxString wxToString(const PwxString &str)
Definition: wxstring.h:113
PwxString & operator=(const PString &str)
Definition: wxstring.h:54
__inline bool wxFromString(wxString &s1, PwxString *&s2)
Definition: wxstring.h:112
PwxString(const PString &str)
Definition: wxstring.h:40
The character string class.
Definition: pstring.h:108
friend wostream & operator<<(wostream &stream, const PwxString &string)
Definition: wxstring.h:103
bool operator==(const PString &other) const
Definition: wxstring.h:61
A class describing an IP address.
Definition: ipsock.h:59
PwxString()
Definition: wxstring.h:37
This class describes a Universal Resource Locator.
Definition: url.h:56
bool operator==(const char *other) const
Definition: wxstring.h:56