~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/module/module.h

  • Committer: Brian Aker
  • Date: 2010-09-09 21:45:53 UTC
  • mto: (1756.1.2 build) (1768.2.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 1757.
  • Revision ID: brian@tangent.org-20100909214553-e687rmf5zk9478on
Force unique to just use memory and let the OS handle paging.

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
 
54
53
  const Manifest *manifest;
55
54
 
56
55
public:
57
 
  typedef std::vector<sys_var *> Variables;
58
56
  Library *plugin_dl;
59
57
  bool isInited;
60
 
  Variables system_vars;         /* server variables for this plugin */
61
 
  Variables sys_vars;
 
58
  sys_var *system_vars;         /* server variables for this plugin */
62
59
  Module(const Manifest *manifest_arg,
63
60
         Library *library_arg) :
64
61
    name(manifest_arg->name),
65
62
    manifest(manifest_arg),
66
63
    plugin_dl(library_arg),
67
64
    isInited(false),
68
 
    system_vars(),
69
 
    sys_vars()
 
65
    system_vars(NULL)
70
66
  {
71
67
    assert(manifest != NULL);
72
68
  }
73
 
 
74
 
  ~Module();
75
 
 
 
69
      
76
70
  const std::string& getName() const
77
71
  {
78
72
    return name;
83
77
    return *manifest;
84
78
  }
85
79
 
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;
100
 
  }
101
80
};
102
81
 
103
82
} /* namespace module */