~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/version/versionudf.cc

  • Committer: Jay Pipes
  • Date: 2009-08-20 21:45:52 UTC
  • mfrom: (1093.1.65 plugin-slot-reorg)
  • mto: This revision was merged to the branch mainline in revision 1121.
  • Revision ID: jpipes@serialcoder-20090820214552-qa2fg1ff508b61sm
Merge plugin slot reorganization from monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
#include <drizzled/server_includes.h>
21
21
#include <drizzled/function/str/strfunc.h>
22
 
#include <drizzled/function/create.h>
 
22
#include <drizzled/slot/function.h>
23
23
 
24
24
using namespace std;
 
25
using namespace drizzled;
25
26
 
26
27
class VersionFunction :public Item_str_func
27
28
{
48
49
  return str;
49
50
}
50
51
 
51
 
Create_function<VersionFunction> versionudf(string("version"));
 
52
plugin::Create_function<VersionFunction> *versionudf= NULL;
52
53
 
53
 
static int initialize(drizzled::plugin::Registry &registry)
 
54
static int initialize(plugin::Registry &registry)
54
55
{
55
 
  registry.add(&versionudf);
 
56
  versionudf= new plugin::Create_function<VersionFunction>("version");
 
57
  registry.function.add(versionudf);
56
58
  return 0;
57
59
}
58
60
 
59
 
static int finalize(drizzled::plugin::Registry &registry)
 
61
static int finalize(plugin::Registry &registry)
60
62
{
61
 
   registry.remove(&versionudf);
 
63
   registry.function.remove(versionudf);
 
64
   delete versionudf;
62
65
   return 0;
63
66
}
64
67