]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/listimpl.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/listimpl.cpp
3 // Purpose: second-part of macro based implementation of template lists
4 // Author: Vadim Zeitlin
8 // Copyright: (c) 1998 Vadim Zeitlin
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #if wxUSE_STD_CONTAINERS
15 #define WX_DEFINE_LIST(name) \
16 void _WX_LIST_HELPER_##name::DeleteFunction( _WX_LIST_ITEM_TYPE_##name X )\
20 _WX_LIST_HELPER_##name::BaseListType _WX_LIST_HELPER_##name::EmptyList;
22 #else // !wxUSE_STD_CONTAINERS
23 #undef WX_DEFINE_LIST_2
24 #define WX_DEFINE_LIST_2(T, name) \
25 void wx##name##Node::DeleteData() \
27 delete (T *)GetData(); \
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
33 #define WX_DEFINE_LIST(name) WX_DEFINE_LIST_2(_WX_LIST_ITEM_TYPE_##name, name)
35 #endif // wxUSE_STD_CONTAINERS/!wxUSE_STD_CONTAINERS