~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/module/module.h

  • Committer: Brian Aker
  • Date: 2010-06-02 06:19:59 UTC
  • mto: (1578.6.10 explain-drizzle)
  • mto: This revision was merged to the branch mainline in revision 1589.
  • Revision ID: brian@gir-2.local-20100602061959-buxitsrzet3z43l1
Modify cache to be a vector.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
 */
30
30
 
31
31
#include <cassert>
32
 
#include <vector>
33
 
#include <boost/program_options.hpp>
34
32
 
35
33
#include "drizzled/module/manifest.h"
36
 
#include "drizzled/module/registry.h"
37
 
 
38
34
 
39
35
namespace drizzled
40
36
{
41
 
class set_var;
 
37
class sys_var;
42
38
 
43
39
void module_shutdown(module::Registry &registry);
44
40
 
52
48
{
53
49
  const std::string name;
54
50
  const Manifest *manifest;
55
 
 
56
51
public:
57
 
  typedef std::vector<sys_var *> Variables;
58
52
  Library *plugin_dl;
59
53
  bool isInited;
60
 
  Variables system_vars;         /* server variables for this plugin */
61
 
  Variables sys_vars;
62
 
  Module(const Manifest *manifest_arg,
63
 
         Library *library_arg) :
64
 
    name(manifest_arg->name),
65
 
    manifest(manifest_arg),
66
 
    plugin_dl(library_arg),
67
 
    isInited(false),
68
 
    system_vars(),
69
 
    sys_vars()
70
 
  {
71
 
    assert(manifest != NULL);
72
 
  }
73
 
 
74
 
  ~Module();
75
 
 
 
54
  sys_var *system_vars;         /* server variables for this plugin */
 
55
  Module(const Manifest *manifest_arg, Library *library_arg)
 
56
    : name(manifest_arg->name), manifest(manifest_arg), plugin_dl(library_arg),
 
57
      isInited(false),
 
58
      system_vars(NULL)
 
59
  {
 
60
    assert(manifest != NULL);
 
61
  }
 
62
      
 
63
  Module(const Manifest *manifest_arg)
 
64
    : name(manifest_arg->name), manifest(manifest_arg), plugin_dl(NULL),
 
65
      isInited(false),
 
66
      system_vars(NULL)
 
67
  {
 
68
    assert(manifest != NULL);
 
69
  }
 
70
      
76
71
  const std::string& getName() const
77
72
  {
78
73
    return name;
82
77
  {
83
78
    return *manifest;
84
79
  }
85
 
 
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 */