// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
+#ifndef __WX_CFSTRINGHOLDER_H__
+#define __WX_CFSTRINGHOLDER_H__
+
#ifdef __DARWIN__
#include <CoreFoundation/CFString.h>
#else
class wxMacCFStringHolder
{
public:
- wxMacCFStringHolder()
+ wxMacCFStringHolder()
+ : m_cfs(NULL) , m_release(false)
{
- m_cfs = NULL ;
- m_release = false ;
}
wxMacCFStringHolder(const wxString &str , wxFontEncoding encoding )
+ : m_cfs(NULL) , m_release(false)
{
- m_cfs = NULL ;
- m_release = false ;
Assign( str , encoding ) ;
}
wxMacCFStringHolder(CFStringRef ref , bool release = true )
+ : m_cfs(ref) , m_release(release)
{
- m_cfs = ref ;
- m_release = release ;
}
~wxMacCFStringHolder()
void Assign( const wxString &str , wxFontEncoding encoding ) ;
- operator CFStringRef () { return m_cfs; }
+ operator CFStringRef () const { return m_cfs; }
wxString AsString( wxFontEncoding encoding = wxFONTENCODING_DEFAULT ) ;
private:
CFStringRef m_cfs;
bool m_release ;
+
+ DECLARE_NO_COPY_CLASS( wxMacCFStringHolder )
} ;
+#endif //__WXCFSTRINGHOLDER_H__