~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/collation_dictionary/dictionary.cc

Additional plugins.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* - mode: c; c-basic-offset: 2; indent-tabs-mode: nil; -*-
 
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
 
3
 *
 
4
 *  Copyright (C) 2010 Brian Aker
 
5
 *
 
6
 *  This program is free software; you can redistribute it and/or modify
 
7
 *  it under the terms of the GNU General Public License as published by
 
8
 *  the Free Software Foundation; either version 2 of the License, or
 
9
 *  (at your option) any later version.
 
10
 *
 
11
 *  This program is distributed in the hope that it will be useful,
 
12
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
 *  GNU General Public License for more details.
 
15
 *
 
16
 *  You should have received a copy of the GNU General Public License
 
17
 *  along with this program; if not, write to the Free Software
 
18
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
19
 */
 
20
 
 
21
#include "config.h"
 
22
#include "plugin/collation_dictionary/dictionary.h"
 
23
 
 
24
static CharacterSetsTool *character_sets;
 
25
static CollationsTool *collations;
 
26
 
 
27
static int init(drizzled::plugin::Registry &registry)
 
28
{
 
29
  character_sets= new(std::nothrow)CharacterSetsTool;
 
30
  collations= new(std::nothrow)CollationsTool;
 
31
 
 
32
  registry.add(character_sets);
 
33
  registry.add(collations);
 
34
  
 
35
  return 0;
 
36
}
 
37
 
 
38
static int finalize(drizzled::plugin::Registry &registry)
 
39
{
 
40
  registry.remove(character_sets);
 
41
  registry.remove(collations);
 
42
  delete character_sets;
 
43
  delete collations;
 
44
 
 
45
  return 0;
 
46
}
 
47
 
 
48
int foo(void);
 
49
int foo(void)
 
50
{
 
51
  drizzled::plugin::Registry &registry= drizzled::plugin::Registry::singleton();
 
52
  init(registry);
 
53
  finalize(registry);
 
54
 
 
55
  return 0;
 
56
}
 
57
 
 
58
#if 0
 
59
DRIZZLE_DECLARE_PLUGIN
 
60
{
 
61
  DRIZZLE_VERSION_ID,
 
62
  "schema_dictionary",
 
63
  "1.0",
 
64
  "Brian Aker",
 
65
  "Data Dictionary for schema, table, column, indexes, etc",
 
66
  PLUGIN_LICENSE_GPL,
 
67
  init,
 
68
  finalize,
 
69
  NULL,
 
70
  NULL,
 
71
  NULL
 
72
}
 
73
DRIZZLE_DECLARE_PLUGIN_END;
 
74
#endif