~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/module/module.h

  • Committer: lbieber
  • Date: 2010-10-01 13:06:31 UTC
  • mfrom: (1802.2.2 drizzle-bug-651948)
  • mto: This revision was merged to the branch mainline in revision 1805.
  • Revision ID: lbieber@orisndriz08-20101001130631-xubscnhmj7r5dn6g
Merge Andrew - Fix bug 651948 - Index lengths not retrieved using drizzledump

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
3
 *
4
 
 *  Copyright (C) 2009 Sun Microsystems, Inc.
 
4
 *  Copyright (C) 2009 Sun Microsystems
5
5
 *
6
6
 *  This program is free software; you can redistribute it and/or modify
7
7
 *  it under the terms of the GNU General Public License as published by
29
29
 */
30
30
 
31
31
#include <cassert>
32
 
#include <vector>
33
32
#include <boost/program_options.hpp>
34
33
 
35
34
#include "drizzled/module/manifest.h"
38
37
 
39
38
namespace drizzled
40
39
{
41
 
class set_var;
 
40
class sys_var;
42
41
 
43
42
void module_shutdown(module::Registry &registry);
44
43
 
46
45
{
47
46
 
48
47
class Library;
49
 
class VertexHandle;
50
48
 
51
49
/* A plugin module */
52
50
class Module
53
51
{
54
 
public:
55
 
  typedef std::vector<sys_var *> Variables;
56
 
  typedef std::vector<std::string> Depends;
57
 
 
58
 
private:
59
52
  const std::string name;
60
53
  const Manifest *manifest;
61
 
  VertexHandle *vertex_;
62
54
 
63
55
public:
64
56
  Library *plugin_dl;
65
57
  bool isInited;
66
 
  Variables system_vars;         /* server variables for this plugin */
67
 
  Variables sys_vars;
68
 
  Depends depends_;
69
 
 
 
58
  sys_var *system_vars;         /* server variables for this plugin */
70
59
  Module(const Manifest *manifest_arg,
71
 
         Library *library_arg);
72
 
 
73
 
  ~Module();
74
 
 
 
60
         Library *library_arg) :
 
61
    name(manifest_arg->name),
 
62
    manifest(manifest_arg),
 
63
    plugin_dl(library_arg),
 
64
    isInited(false),
 
65
    system_vars(NULL)
 
66
  {
 
67
    assert(manifest != NULL);
 
68
  }
 
69
      
75
70
  const std::string& getName() const
76
71
  {
77
72
    return name;
82
77
    return *manifest;
83
78
  }
84
79
 
85
 
  void addMySysVar(sys_var *var)
86
 
  {
87
 
    sys_vars.push_back(var);
88
 
    addSysVar(var);
89
 
  }
90
 
 
91
 
  void addSysVar(sys_var *var)
92
 
  {
93
 
    system_vars.push_back(var);
94
 
  }
95
 
 
96
 
  Variables &getSysVars()
97
 
  {
98
 
    return system_vars;
99
 
  }
100
 
 
101
 
  const Depends &getDepends() const
102
 
  {
103
 
    return depends_;
104
 
  }
105
 
 
106
 
  void setVertexHandle(VertexHandle *vertex)
107
 
  {
108
 
    vertex_= vertex;
109
 
  }
110
 
 
111
 
  VertexHandle *getVertexHandle()
112
 
  {
113
 
    return vertex_;
114
 
  }
115
80
};
116
81
 
117
82
} /* namespace module */