~drizzle-trunk/drizzle/development

1237.13.15 by Padraig O'Sullivan
Used std::vector instead of List in the QuickRorUnionSelect class.
1
/* - mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
 *
1999.6.1 by kalebral at gmail
update Copyright strings to a more common format to help with creating the master debian copyright file
4
 *  Copyright (C) 2009 Sun Microsystems, Inc.
1237.13.15 by Padraig O'Sullivan
Used std::vector instead of List in the QuickRorUnionSelect class.
5
 *
6
 *  This program is free software; you can redistribute it and/or modify
7
 *  it under the terms of the GNU General Public License as published by
8
 *  the Free Software Foundation; either version 2 of the License, or
9
 *  (at your option) any later version.
10
 *
11
 *  This program is distributed in the hope that it will be useful,
12
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 *  GNU General Public License for more details.
15
 *
16
 *  You should have received a copy of the GNU General Public License
17
 *  along with this program; if not, write to the Free Software
18
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19
 */
20
21
#ifndef DRIZZLED_UTIL_FUNCTORS_H
22
#define DRIZZLED_UTIL_FUNCTORS_H
23
1280.1.10 by Monty Taylor
Put everything in drizzled into drizzled namespace.
24
namespace drizzled
25
{
26
1237.13.15 by Padraig O'Sullivan
Used std::vector instead of List in the QuickRorUnionSelect class.
27
class DeletePtr
28
{
29
public:
30
  template<typename T>
31
  inline void operator()(const T *ptr) const
32
  {
33
    delete ptr;
34
  }
35
};
36
1841.1.1 by Barry.Leslie at PrimeBase
Bug fix for memory leak in event_observer plugin.
37
class SafeDeletePtr
38
{
39
public:
40
  template<typename T>
41
  inline void operator()(const T *ptr) const
42
  {
43
    if (ptr)
44
			delete ptr;
45
  }
46
};
47
1280.1.10 by Monty Taylor
Put everything in drizzled into drizzled namespace.
48
} /* namespace drizzled */
49
1237.13.15 by Padraig O'Sullivan
Used std::vector instead of List in the QuickRorUnionSelect class.
50
#endif /* DRIZZLED_UTIL_FUNCTORS_H */