~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/module/module.h

Merge Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
 */
30
30
 
31
31
#include <cassert>
 
32
#include <vector>
32
33
#include <boost/program_options.hpp>
33
34
 
34
35
#include "drizzled/module/manifest.h"
53
54
  const Manifest *manifest;
54
55
 
55
56
public:
 
57
  typedef std::vector<sys_var *> Variables;
56
58
  Library *plugin_dl;
57
59
  bool isInited;
58
 
  sys_var *system_vars;         /* server variables for this plugin */
 
60
  Variables system_vars;         /* server variables for this plugin */
59
61
  Module(const Manifest *manifest_arg,
60
62
         Library *library_arg) :
61
63
    name(manifest_arg->name),
62
64
    manifest(manifest_arg),
63
65
    plugin_dl(library_arg),
64
66
    isInited(false),
65
 
    system_vars(NULL)
 
67
    system_vars()
66
68
  {
67
69
    assert(manifest != NULL);
68
70
  }
69
 
      
 
71
 
 
72
  // @todo why is this here? -B
 
73
#if 0 
 
74
  ~Module()
 
75
  {
 
76
    for (Variables::iterator iter= system_vars.begin();
 
77
         iter != system_vars.end();
 
78
         ++iter)
 
79
    {
 
80
      delete *iter;
 
81
    }
 
82
  }
 
83
#endif
 
84
 
70
85
  const std::string& getName() const
71
86
  {
72
87
    return name;
77
92
    return *manifest;
78
93
  }
79
94
 
 
95
  void addSysVar(sys_var *var)
 
96
  {
 
97
    system_vars.push_back(var);
 
98
  }
 
99
 
 
100
  Variables &getSysVars()
 
101
  {
 
102
    return system_vars;
 
103
  }
80
104
};
81
105
 
82
106
} /* namespace module */