]> git.saurik.com Git - wxWidgets.git/blame - include/wx/listimpl.cpp
Fixed linking errors related to wxAnyButton in wxUniv.
[wxWidgets.git] / include / wx / listimpl.cpp
CommitLineData
fd3f686c 1/////////////////////////////////////////////////////////////////////////////
80fdcdb9 2// Name: wx/listimpl.cpp
fd3f686c 3// Purpose: second-part of macro based implementation of template lists
75c6c545 4// Author: Vadim Zeitlin
fd3f686c
VZ
5// Modified by:
6// Created: 16/11/98
75c6c545 7// RCS-ID: $Id$
fd3f686c 8// Copyright: (c) 1998 Vadim Zeitlin
65571936 9// Licence: wxWindows licence
fd3f686c 10/////////////////////////////////////////////////////////////////////////////
75c6c545 11
01871bf6 12#if wxUSE_STD_CONTAINERS
df5168c4 13
7d13fbc6
VZ
14#undef WX_DEFINE_LIST
15#define WX_DEFINE_LIST(name) \
16 void _WX_LIST_HELPER_##name::DeleteFunction( _WX_LIST_ITEM_TYPE_##name X )\
17 { \
18 delete X; \
19 } \
20 name::BaseListType name::EmptyList;
df5168c4 21
01871bf6 22#else // !wxUSE_STD_CONTAINERS
576adedb
VZ
23 #undef WX_DEFINE_LIST_2
24 #define WX_DEFINE_LIST_2(T, name) \
ed1288c1
VZ
25 void wx##name##Node::DeleteData() \
26 { \
27 delete (T *)GetData(); \
28 }
75c6c545 29
ed1288c1
VZ
30 // redefine the macro so that now it will generate the class implementation
31 // old value would provoke a compile-time error if this file is not included
32 #undef WX_DEFINE_LIST
576adedb 33 #define WX_DEFINE_LIST(name) WX_DEFINE_LIST_2(_WX_LIST_ITEM_TYPE_##name, name)
df5168c4 34
01871bf6 35#endif // wxUSE_STD_CONTAINERS/!wxUSE_STD_CONTAINERS
ed1288c1 36