]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/private/string.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk/private/string.h
3 // Purpose: wxGtkString class declaration
4 // Author: Vadim Zeitlin
7 // Copyright: (c) 2006 Vadim Zeitlin <vadim@wxwindows.org>
8 // Licence: wxWindows licence
9 ///////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_GTK_PRIVATE_STRING_H_
12 #define _WX_GTK_PRIVATE_STRING_H_
14 // ----------------------------------------------------------------------------
15 // Convenience class for g_freeing a gchar* on scope exit automatically
16 // ----------------------------------------------------------------------------
21 explicit wxGtkString(gchar
*s
) : m_str(s
) { }
22 ~wxGtkString() { g_free(m_str
); }
24 const gchar
*c_str() const { return m_str
; }
26 operator gchar
*() const { return m_str
; }
31 DECLARE_NO_COPY_CLASS(wxGtkString
)
34 #endif // _WX_GTK_PRIVATE_STRING_H_