~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/module/module.h

  • Committer: Zimin
  • Date: 2010-06-30 06:36:56 UTC
  • mto: (1643.1.5 build)
  • mto: This revision was merged to the branch mainline in revision 1644.
  • Revision ID: ziminq@gmail.com-20100630063656-5oa531u1mfyn6ybl
move the comment of 'create' in TableList as well

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
 
52
51
{
53
52
  const std::string name;
54
53
  const Manifest *manifest;
 
54
  boost::program_options::variables_map vm;
55
55
 
56
56
public:
57
 
  typedef std::vector<sys_var *> Variables;
58
57
  Library *plugin_dl;
59
58
  bool isInited;
60
 
  Variables system_vars;         /* server variables for this plugin */
61
 
  Variables sys_vars;
 
59
  sys_var *system_vars;         /* server variables for this plugin */
62
60
  Module(const Manifest *manifest_arg,
63
61
         Library *library_arg) :
64
62
    name(manifest_arg->name),
65
63
    manifest(manifest_arg),
 
64
    vm(),
66
65
    plugin_dl(library_arg),
67
66
    isInited(false),
68
 
    system_vars(),
69
 
    sys_vars()
 
67
    system_vars(NULL)
70
68
  {
71
69
    assert(manifest != NULL);
72
70
  }
73
 
 
74
 
  ~Module();
75
 
 
 
71
      
76
72
  const std::string& getName() const
77
73
  {
78
74
    return name;
83
79
    return *manifest;
84
80
  }
85
81
 
86
 
  void addMySysVar(sys_var *var)
87
 
  {
88
 
    sys_vars.push_back(var);
89
 
    addSysVar(var);
90
 
  }
91
 
 
92
 
  void addSysVar(sys_var *var)
93
 
  {
94
 
    system_vars.push_back(var);
95
 
  }
96
 
 
97
 
  Variables &getSysVars()
98
 
  {
99
 
    return system_vars;
 
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;
100
90
  }
101
91
};
102
92