~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/plugin.h

Merge with trunk.

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
 
 
21
 
20
22
#ifndef DRIZZLED_PLUGIN_PLUGIN_H
21
23
#define DRIZZLED_PLUGIN_PLUGIN_H
22
24
 
24
26
#include <vector>
25
27
#include <map>
26
28
 
 
29
#include "drizzled/visibility.h"
 
30
 
27
31
namespace drizzled
28
32
{
 
33
 
 
34
class Session;
 
35
 
29
36
namespace module
30
37
{
31
38
class Module;
34
41
namespace plugin
35
42
{
36
43
 
37
 
class Plugin
 
44
class DRIZZLED_API Plugin
38
45
{
39
46
private:
40
47
  const std::string _name;
46
53
  Plugin(const Plugin&);
47
54
  Plugin& operator=(const Plugin &);
48
55
public:
49
 
  typedef std::map<std::string, Plugin *> map;
 
56
  typedef std::pair<const std::string, const std::string> map_key;
 
57
  typedef std::map<const map_key, plugin::Plugin *> map;
50
58
  typedef std::vector<Plugin *> vector;
51
59
 
52
60
  explicit Plugin(const std::string &name, const std::string &type_name);
65
73
  virtual void prime()
66
74
  {
67
75
  }
 
76
 
 
77
  virtual void startup(drizzled::Session &)
 
78
  {
 
79
  }
68
80
 
69
81
  void activate()
70
82
  {
96
108
    return _type_name;
97
109
  }
98
110
 
 
111
  virtual bool removeLast() const
 
112
  {
 
113
    return false;
 
114
  }
 
115
 
99
116
  const std::string& getModuleName() const;
100
117
};
101
118
} /* end namespace plugin */