-// ----------------------------------------------------------------------------
-// wxCFString
-// ----------------------------------------------------------------------------
-
-class wxCFString
-{
-public:
- wxCFString(CFTypeRef ref, bool bRetain = wxCF_RELEASE) : m_Holder((CFStringRef)ref, bRetain == wxCF_RELEASE)
- {}
-
- wxCFString(const wxChar* szString) : m_Holder(wxString(szString), wxLocale::GetSystemEncoding())
- {}
-
- wxCFString(const wxString& sString) : m_Holder(sString, wxLocale::GetSystemEncoding())
- {}
-
- virtual ~wxCFString() {}
-
- operator CFTypeRef() const
- { return (CFTypeRef) ((CFStringRef) m_Holder); }
-
- bool IsOk()
- { return ((CFTypeRef)(*this)) != NULL; }
-
- wxString BuildWXString()
- { return m_Holder.AsString(); }
-
-private:
- wxMacCFStringHolder m_Holder;
-};
-