~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/plugin.h

  • Committer: Monty Taylor
  • Date: 2010-12-26 01:32:11 UTC
  • mto: This revision was merged to the branch mainline in revision 2038.
  • Revision ID: mordred@inaugust.com-20101226013211-c1tx52h7evovmijg
fixed dict and eval.

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