~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/generator/functions.cc

  • Committer: Brian Aker
  • Date: 2011-01-06 05:17:09 UTC
  • Revision ID: brian@tangent.org-20110106051709-oa0se8ur02uc6i9o
Added native functions into the function table.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#include "config.h"
22
22
 
23
23
#include "drizzled/generator.h"
 
24
#include "drizzled/function_container.h"
24
25
#include "drizzled/plugin/function.h"
25
26
#include "drizzled/session.h"
26
27
 
34
35
Functions::Functions(Session &arg) :
35
36
  session(arg)
36
37
{
37
 
  udf_iter= plugin::Function::getMap().begin();
 
38
  function_list.reserve(plugin::Function::getMap().size() + FunctionContainer::getMap().size());
 
39
 
 
40
  std::transform(FunctionContainer::getMap().begin(),
 
41
                 FunctionContainer::getMap().end(),
 
42
                 std::back_inserter(function_list),
 
43
                 boost::bind(&FunctionContainer::Map::value_type::first, _1) );
 
44
 
 
45
  std::transform(plugin::Function::getMap().begin(),
 
46
                 plugin::Function::getMap().end(),
 
47
                 std::back_inserter(function_list),
 
48
                 boost::bind(&plugin::Function::Map::value_type::first, _1) );
 
49
 
 
50
  iter= function_list.begin();
38
51
}
39
52
 
40
53
} /* namespace generator */