]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/listimpl.cpp
only define globals when wxUSE_BASE to avoid duplicate definitions in wxBase and...
[wxWidgets.git] / include / wx / listimpl.cpp
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: listimpl.cpp
3// Purpose: second-part of macro based implementation of template lists
4// Author: Vadim Zeitlin
5// Modified by:
6// Created: 16/11/98
7// RCS-ID: $Id$
8// Copyright: (c) 1998 Vadim Zeitlin
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#if wxUSE_STL
13
14#undef WX_DEFINE_LIST
15#define WX_DEFINE_LIST(name)
16
17#else // if !wxUSE_STL
18
19#define _DEFINE_LIST(T, name) \
20 void wx##name##Node::DeleteData() \
21 { \
22 delete (T *)GetData(); \
23 }
24
25// redefine the macro so that now it will generate the class implementation
26// old value would provoke a compile-time error if this file is not included
27#undef WX_DEFINE_LIST
28#define WX_DEFINE_LIST(name) _DEFINE_LIST(_WX_LIST_ITEM_TYPE_##name, name)
29
30// don't pollute preprocessor's name space
31//#undef _DEFINE_LIST
32
33#endif