~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/library.h

Reverted my change to interval_list

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
#ifndef DRIZZLED_PLUGIN_LIBRARY_H
21
21
#define DRIZZLED_PLUGIN_LIBRARY_H
22
22
 
23
 
/**
24
 
 * @file Defines a Plugin Library Wrapper
25
 
 *
26
 
 * A plugin::Library is a wrapper object around a plugin .so file. It owns
27
 
 * the void * returned by dlopen and contains the knowledge of how to load
28
 
 * and unload plugin libraries via dlopen().
29
 
 */
30
 
 
31
 
#include <string>
 
23
#include <drizzled/lex_string.h>
32
24
 
33
25
namespace drizzled
34
26
{
40
32
/* A handle for the dynamic library containing a plugin or plugins. */
41
33
class Library
42
34
{
43
 
  std::string name;
 
35
public:
 
36
  LEX_STRING dl;
44
37
  void *handle;
45
 
  const Manifest *manifest;
46
 
 
47
 
  /* We don't want these */
48
 
  Library();
49
 
  Library(const Library &);
50
 
  Library& operator=(const Library &);
51
 
 
52
 
  /* Construction should only happen through the static factory method */
53
 
  Library(const std::string &name_arg,
54
 
          void *handle_arg,
55
 
          const Manifest *manifest_arg);
56
 
public:
57
 
  ~Library();
58
 
 
59
 
  const std::string &getName() const
60
 
  {
61
 
    return name;
62
 
  }
63
 
 
64
 
  const Manifest *getManifest() const
65
 
  {
66
 
    return manifest;
67
 
  }
68
 
 
69
 
  static Library *loadLibrary(const std::string &plugin_name);
 
38
  Manifest *plugins;
 
39
  Library() : dl(), handle(NULL), plugins(NULL) {}
70
40
};
71
41
 
72
42
} /* namespace plugin */