~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/function.h

  • Committer: patrick crews
  • Date: 2011-06-08 03:02:27 UTC
  • mto: This revision was merged to the branch mainline in revision 2329.
  • Revision ID: gleebix@gmail.com-20110608030227-updkyv2652zvfajc
Initial voodoo worked to give us a crashme mode.  Need docs still

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
3
 *
4
 
 *  Copyright (C) 2008 Sun Microsystems
 
4
 *  Copyright (C) 2008 Sun Microsystems, Inc.
5
5
 *
6
6
 *  This program is free software; you can redistribute it and/or modify
7
7
 *  it under the terms of the GNU General Public License as published by
17
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
18
 */
19
19
 
20
 
#ifndef DRIZZLED_PLUGIN_FUNCTION_H
21
 
#define DRIZZLED_PLUGIN_FUNCTION_H
22
 
 
23
 
 
24
 
#include "drizzled/plugin/plugin.h"
25
 
#include "drizzled/item/func.h"
 
20
#pragma once
 
21
 
 
22
 
 
23
#include <drizzled/item/func.h>
 
24
#include <drizzled/plugin.h>
 
25
#include <drizzled/plugin/plugin.h>
26
26
 
27
27
#include <string>
28
28
#include <vector>
29
29
#include <functional>
30
30
 
31
 
namespace drizzled
32
 
{
33
 
 
34
 
class Item_func;
35
 
 
36
 
namespace memory
37
 
{
38
 
  class Root;
 
31
#include <boost/unordered_map.hpp>
 
32
 
 
33
#include <drizzled/visibility.h>
 
34
 
 
35
namespace drizzled {
 
36
 
 
37
namespace util
 
38
{
 
39
struct insensitive_hash;
 
40
struct insensitive_equal_to;
39
41
}
40
42
 
41
 
namespace plugin
42
 
{
 
43
namespace plugin {
43
44
 
44
45
/**
45
46
 * Functions in the server: AKA UDF
46
47
 */
47
 
class Function
 
48
class DRIZZLED_API Function
48
49
  : public Plugin,
49
50
    public std::unary_function<memory::Root*, Item_func *>
50
51
{
69
70
   */
70
71
  static void removePlugin(const plugin::Function *function_obj);
71
72
 
72
 
  /**
73
 
   * Accept a new connection (Protocol object) on one of the configured
74
 
   * listener interfaces.
75
 
   */
76
 
  static const plugin::Function *get(const char *name, size_t len=0);
 
73
  static const plugin::Function *get(const std::string &name);
77
74
 
78
75
  typedef boost::unordered_map<std::string, const plugin::Function *, util::insensitive_hash, util::insensitive_equal_to> UdfMap;
 
76
  typedef boost::unordered_map<std::string, const plugin::Function *, util::insensitive_hash, util::insensitive_equal_to> Map;
79
77
 
80
78
  static const UdfMap &getMap();
81
79
};
99
97
} /* namespace drizzled */
100
98
 
101
99
 
102
 
#endif /* DRIZZLED_PLUGIN_FUNCTION_H */