Remove all lines containing cvs/svn "$Id$" keyword.
[wxWidgets.git] / include / wx / gtk / private / list.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk/private/list.h
3 // Purpose: wxGtkList class.
4 // Author: Vadim Zeitlin
5 // Created: 2011-08-21
6 // Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org>
7 // Licence: wxWindows licence
8 ///////////////////////////////////////////////////////////////////////////////
9
10 #ifndef _WX_GTK_PRIVATE_LIST_H_
11 #define _WX_GTK_PRIVATE_LIST_H_
12
13 // ----------------------------------------------------------------------------
14 // Convenience class for calling g_list_free() automatically
15 // ----------------------------------------------------------------------------
16
17 class wxGtkList
18 {
19 public:
20 explicit wxGtkList(GList* list) : m_list(list) { }
21 ~wxGtkList() { g_list_free(m_list); }
22
23 operator GList *() const { return m_list; }
24 GList * operator->() const { return m_list; }
25
26 protected:
27 GList* const m_list;
28
29 wxDECLARE_NO_COPY_CLASS(wxGtkList);
30 };
31
32 #endif // _WX_GTK_PRIVATE_LIST_H_