~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/function.cc

  • Committer: Brian Aker
  • Date: 2010-07-29 00:35:25 UTC
  • mto: This revision was merged to the branch mainline in revision 1671.
  • Revision ID: brian@gaz-20100729003525-xy6vn530lg912zdv
Removed tolower usage, and did a small style thing with for() loop.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
/* This implements 'user defined functions' */
22
22
#include "config.h"
23
23
 
24
 
#include <boost/unordered_map.hpp>
 
24
#include <drizzled/unordered_map.h>
25
25
 
26
26
#include <drizzled/gettext.h>
27
27
#include "drizzled/plugin/function.h"
28
28
 
29
29
#include "drizzled/util/string.h"
30
30
 
 
31
using namespace std;
 
32
 
31
33
namespace drizzled
32
34
{
33
35
 
34
 
static plugin::Function::UdfMap udf_registry;
35
 
 
36
 
const plugin::Function::UdfMap &plugin::Function::getMap()
37
 
{
38
 
  return udf_registry;
39
 
}
 
36
typedef boost::unordered_map<string, const plugin::Function *, util::insensitive_hash, util::insensitive_equal_to> UdfMap;
 
37
static UdfMap udf_registry;
40
38
 
41
39
bool plugin::Function::addPlugin(const plugin::Function *udf)
42
40
{
47
45
                  udf->getName().c_str());
48
46
    return true;
49
47
  }
50
 
  std::pair<UdfMap::iterator, bool> ret=
 
48
  pair<UdfMap::iterator, bool> ret=
51
49
    udf_registry.insert(make_pair(udf->getName(), udf));
52
50
  if (ret.second == false)
53
51
  {