~ubuntu-dev/wxwidgets2.6/upstream-debian

« back to all changes in this revision

Viewing changes to include/wx/listimpl.cpp

  • Committer: Daniel T Chen
  • Date: 2006-06-26 10:15:11 UTC
  • Revision ID: crimsun@ubuntu.com-20060626101511-a4436cec4c6d9b35
ImportĀ DebianĀ 2.6.3.2.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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: listimpl.cpp,v 1.8.2.1 2006/01/17 19:02:24 JS Exp $
 
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
        void name::DeleteFunction( _WX_DELETEFUNCTIONCONST _WX_LIST_ITEM_TYPE_##name X )  \
 
17
        {                                                               \
 
18
            delete X;                                                   \
 
19
        }
 
20
 
 
21
#else // if !wxUSE_STL
 
22
 
 
23
    #define _DEFINE_LIST(T, name)         \
 
24
        void wx##name##Node::DeleteData() \
 
25
        {                                 \
 
26
            delete (T *)GetData();        \
 
27
        }
 
28
 
 
29
    // redefine the macro so that now it will generate the class implementation
 
30
    // old value would provoke a compile-time error if this file is not included
 
31
    #undef  WX_DEFINE_LIST
 
32
    #define WX_DEFINE_LIST(name) _DEFINE_LIST(_WX_LIST_ITEM_TYPE_##name, name)
 
33
 
 
34
    // don't pollute preprocessor's name space
 
35
    //#undef  _DEFINE_LIST
 
36
 
 
37
#endif
 
38