~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/handle.h

  • Committer: Padraig O'Sullivan
  • Date: 2009-07-30 02:39:13 UTC
  • mto: (1115.3.11 captain)
  • mto: This revision was merged to the branch mainline in revision 1121.
  • Revision ID: osullivan.padraig@gmail.com-20090730023913-o2zuocp32l6btnc2
Removing references to MY_BITMAP throughout the code base and updating calls
to MyBitmap in various places to use the new interface.

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
 
#ifndef DRIZZLED_PLUGIN_MODULE_H
21
 
#define DRIZZLED_PLUGIN_MODULE_H
22
 
 
23
 
/**
24
 
 * @file Defines a Plugin Module
25
 
 *
26
 
 * A plugin::Module is the fundamental functional element of the plugin system.
27
 
 * Plugins are inited and deinited by module. A module init can register one
28
 
 * or more plugin::Plugin objects. 
29
 
 */
30
 
 
31
 
#include <cassert>
32
 
 
33
 
#include "drizzled/plugin/manifest.h"
 
20
#ifndef DRIZZLED_PLUGIN_HANDLE_H
 
21
#define DRIZZLED_PLUGIN_HANDLE_H
 
22
 
 
23
#include <drizzled/lex_string.h>
 
24
#include <mysys/my_alloc.h>
 
25
 
 
26
class sys_var;
34
27
 
35
28
namespace drizzled
36
29
{
37
 
class sys_var;
38
 
 
39
30
namespace plugin
40
31
{
41
32
 
 
33
class Manifest;
42
34
class Library;
43
35
 
44
 
/* A plugin module */
45
 
class Module
 
36
/* A handle of a plugin */
 
37
class Handle
46
38
{
47
39
  const std::string name;
48
 
  const Manifest *manifest;
 
40
  Manifest *manifest;
49
41
public:
50
42
  Library *plugin_dl;
51
43
  bool isInited;
 
44
  MEM_ROOT mem_root;            /* memory for dynamic plugin structures */
52
45
  sys_var *system_vars;         /* server variables for this plugin */
53
 
  Module(const Manifest *manifest_arg, Library *library_arg)
 
46
  Handle(Manifest *manifest_arg, Library *library_arg)
54
47
    : name(manifest_arg->name), manifest(manifest_arg), plugin_dl(library_arg),
55
 
      isInited(false),
56
 
      system_vars(NULL)
57
 
  {
58
 
    assert(manifest != NULL);
59
 
  }
 
48
      mem_root(), system_vars(NULL) {}
60
49
      
61
 
  Module(const Manifest *manifest_arg)
 
50
  Handle(Manifest *manifest_arg)
62
51
    : name(manifest_arg->name), manifest(manifest_arg), plugin_dl(NULL),
63
 
      isInited(false),
64
 
      system_vars(NULL)
65
 
  {
66
 
    assert(manifest != NULL);
67
 
  }
 
52
      mem_root(), system_vars(NULL) {}
68
53
      
69
54
  const std::string& getName() const
70
55
  {
80
65
} /* namespace plugin */
81
66
} /* namespace drizzled */
82
67
 
83
 
#endif /* DRIZZLED_PLUGIN_MODULE_H */
 
68
#endif /* DRIZZLED_PLUGIN_HANDLE_H */