~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/module/module.h

  • Committer: Stewart Smith
  • Date: 2010-07-27 00:49:32 UTC
  • mto: (1720.1.1 drizzle)
  • mto: This revision was merged to the branch mainline in revision 1721.
  • Revision ID: stewart@flamingspork.com-20100727004932-basq3vx9szmmbswm
fix storing and manipulating foreign keys in the proto around ALTER TABLE, CREATE TABLE and ALTER TABLE ADD/DROP FOREIGN KEY. We also (mostly) emulate the naming of innodb foreign keys in the upper layer.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
18
 */
19
19
 
20
 
#ifndef DRIZZLED_PLUGIN_MODULE_H
21
 
#define DRIZZLED_PLUGIN_MODULE_H
 
20
#ifndef DRIZZLED_MODULE_MODULE_H
 
21
#define DRIZZLED_MODULE_MODULE_H
22
22
 
23
23
/**
24
24
 * @file Defines a Plugin Module
29
29
 */
30
30
 
31
31
#include <cassert>
32
 
 
33
 
#include "drizzled/plugin/manifest.h"
 
32
#include <boost/program_options.hpp>
 
33
 
 
34
#include "drizzled/module/manifest.h"
 
35
#include "drizzled/module/registry.h"
 
36
 
34
37
 
35
38
namespace drizzled
36
39
{
37
40
class sys_var;
38
41
 
39
 
namespace plugin
 
42
void module_shutdown(module::Registry &registry);
 
43
 
 
44
namespace module
40
45
{
41
46
 
42
47
class Library;
46
51
{
47
52
  const std::string name;
48
53
  const Manifest *manifest;
 
54
  boost::program_options::variables_map vm;
 
55
 
49
56
public:
50
57
  Library *plugin_dl;
51
58
  bool isInited;
52
59
  sys_var *system_vars;         /* server variables for this plugin */
53
 
  Module(const Manifest *manifest_arg, Library *library_arg)
54
 
    : name(manifest_arg->name), manifest(manifest_arg), plugin_dl(library_arg),
55
 
      isInited(false),
56
 
      system_vars(NULL)
57
 
  {
58
 
    assert(manifest != NULL);
59
 
  }
60
 
      
61
 
  Module(const Manifest *manifest_arg)
62
 
    : name(manifest_arg->name), manifest(manifest_arg), plugin_dl(NULL),
63
 
      isInited(false),
64
 
      system_vars(NULL)
 
60
  Module(const Manifest *manifest_arg,
 
61
         Library *library_arg) :
 
62
    name(manifest_arg->name),
 
63
    manifest(manifest_arg),
 
64
    vm(),
 
65
    plugin_dl(library_arg),
 
66
    isInited(false),
 
67
    system_vars(NULL)
65
68
  {
66
69
    assert(manifest != NULL);
67
70
  }
75
78
  {
76
79
    return *manifest;
77
80
  }
 
81
 
 
82
  const boost::program_options::variables_map &getVariableMap() const
 
83
  {
 
84
    return vm;
 
85
  }
 
86
 
 
87
  boost::program_options::variables_map &getVariableMap()
 
88
  {
 
89
    return vm;
 
90
  }
78
91
};
79
92
 
80
 
} /* namespace plugin */
 
93
} /* namespace module */
81
94
} /* namespace drizzled */
82
95
 
83
 
#endif /* DRIZZLED_PLUGIN_MODULE_H */
 
96
#endif /* DRIZZLED_MODULE_MODULE_H */