~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/module/module.h

  • Committer: Brian Aker
  • Date: 2011-02-12 08:10:17 UTC
  • mto: This revision was merged to the branch mainline in revision 2161.
  • Revision ID: brian@tangent.org-20110212081017-7793i41ybt7gp5ty
More removal of session from includes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
18
 */
19
19
 
20
 
#pragma once
 
20
#ifndef DRIZZLED_MODULE_MODULE_H
 
21
#define DRIZZLED_MODULE_MODULE_H
21
22
 
22
23
/**
23
24
 * @file Defines a Plugin Module
27
28
 * or more plugin::Plugin objects. 
28
29
 */
29
30
 
30
 
#include <drizzled/common_fwd.h>
31
 
#include <string>
 
31
#include <cassert>
32
32
#include <vector>
33
 
 
34
 
namespace drizzled {
35
 
 
36
 
void module_shutdown(module::Registry&);
37
 
 
38
 
namespace module {
 
33
#include <boost/program_options.hpp>
 
34
 
 
35
#include "drizzled/module/manifest.h"
 
36
#include "drizzled/module/registry.h"
 
37
 
 
38
 
 
39
namespace drizzled
 
40
{
 
41
class set_var;
 
42
 
 
43
void module_shutdown(module::Registry &registry);
 
44
 
 
45
namespace module
 
46
{
 
47
 
 
48
class Library;
 
49
class VertexHandle;
39
50
 
40
51
/* A plugin module */
41
52
class Module
44
55
  typedef std::vector<sys_var *> Variables;
45
56
  typedef std::vector<std::string> Depends;
46
57
 
 
58
private:
 
59
  const std::string name;
 
60
  const Manifest *manifest;
 
61
  VertexHandle *vertex_;
 
62
 
 
63
public:
47
64
  Library *plugin_dl;
48
65
  bool isInited;
49
66
  Variables system_vars;         /* server variables for this plugin */
50
67
  Variables sys_vars;
51
68
  Depends depends_;
52
69
 
53
 
  Module(const Manifest *manifest_arg, Library *library_arg);
 
70
  Module(const Manifest *manifest_arg,
 
71
         Library *library_arg);
 
72
 
54
73
  ~Module();
55
74
 
56
75
  const std::string& getName() const
60
79
 
61
80
  const Manifest& getManifest() const
62
81
  {
63
 
    return manifest;
 
82
    return *manifest;
64
83
  }
65
84
 
66
85
  void addMySysVar(sys_var *var)
93
112
  {
94
113
    return vertex_;
95
114
  }
96
 
private:
97
 
  const std::string name;
98
 
  const Manifest &manifest;
99
 
  VertexHandle *vertex_;
100
115
};
101
116
 
102
117
} /* namespace module */
103
118
} /* namespace drizzled */
104
119
 
 
120
#endif /* DRIZZLED_MODULE_MODULE_H */