~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/math_functions/functions.cc

  • Committer: lbieber
  • Date: 2010-09-17 01:47:05 UTC
  • mfrom: (1770.1.2 build)
  • Revision ID: lbieber@orisndriz08-20100917014705-zzqek5l4x962z5tg
Merge Stewart - remove the unbalanced my_end() call from drizzledump
Merge Stewart - move math functions into plugin

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 */
20
20
 
21
21
#include "config.h"
 
22
#include <drizzled/plugin/function.h>
22
23
#include "plugin/math_functions/functions.h"
 
24
#include "plugin/math_functions/abs.h"
 
25
#include "plugin/math_functions/acos.h"
 
26
#include "plugin/math_functions/asin.h"
 
27
#include "plugin/math_functions/atan.h"
 
28
#include "plugin/math_functions/cos.h"
 
29
#include "plugin/math_functions/log.h"
 
30
#include "plugin/math_functions/sin.h"
 
31
#include "plugin/math_functions/pow.h"
23
32
 
24
33
using namespace drizzled;
25
34
 
 
35
plugin::Create_function<drizzled::Item_func_abs> *abs_function= NULL;
 
36
plugin::Create_function<drizzled::Item_func_acos> *acos_function= NULL;
 
37
plugin::Create_function<drizzled::Item_func_asin> *asin_function= NULL;
 
38
plugin::Create_function<drizzled::Item_func_atan> *atan_function= NULL;
 
39
plugin::Create_function<drizzled::Item_func_atan> *atan2_function= NULL;
 
40
plugin::Create_function<drizzled::Item_func_cos> *cos_function= NULL;
 
41
plugin::Create_function<drizzled::Item_func_log> *log_function= NULL;
 
42
plugin::Create_function<drizzled::Item_func_log2> *log2_function= NULL;
 
43
plugin::Create_function<drizzled::Item_func_log10> *log10_function= NULL;
 
44
plugin::Create_function<drizzled::Item_func_sin> *sin_function= NULL;
 
45
plugin::Create_function<drizzled::Item_func_pow> *pow_function= NULL;
 
46
plugin::Create_function<drizzled::Item_func_pow> *power_function= NULL;
 
47
 
26
48
static int init(drizzled::module::Context &context)
27
49
{
28
 
  (void)context;
29
 
  
 
50
  abs_function= new plugin::Create_function<Item_func_abs>("abs");
 
51
  acos_function= new plugin::Create_function<Item_func_acos>("acos");
 
52
  asin_function= new plugin::Create_function<Item_func_asin>("asin");
 
53
  atan_function= new plugin::Create_function<Item_func_atan>("atan");
 
54
  atan2_function= new plugin::Create_function<Item_func_atan>("atan2");
 
55
  cos_function= new plugin::Create_function<Item_func_cos>("cos");
 
56
  log_function= new plugin::Create_function<Item_func_log>("log");
 
57
  log2_function= new plugin::Create_function<Item_func_log2>("log2");
 
58
  log10_function= new plugin::Create_function<Item_func_log10>("log10");
 
59
  sin_function= new plugin::Create_function<Item_func_sin>("sin");
 
60
  pow_function= new plugin::Create_function<Item_func_pow>("pow");
 
61
  power_function= new plugin::Create_function<Item_func_pow>("power");
 
62
 
 
63
  context.add(abs_function);
 
64
  context.add(acos_function);
 
65
  context.add(asin_function);
 
66
  context.add(atan_function);
 
67
  context.add(atan2_function);
 
68
  context.add(cos_function);
 
69
  context.add(log_function);
 
70
  context.add(log2_function);
 
71
  context.add(log10_function);
 
72
  context.add(sin_function);
 
73
  context.add(pow_function);
 
74
  context.add(power_function);
 
75
 
30
76
  return 0;
31
77
}
32
78